Web Application Firewall (WAF)

Manage WAF resources, modes, and custom rules through the Security API.

Use the WAF endpoints to create WAF-enabled CDN Resources, change WAF operating mode, and manage custom WAF rules.

Create WAF Resource

post

Creates a CDN Resource with Web Application Firewall (WAF) enabled.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organization_uuidstringRequired

Unique identifier of the organization.

Body
resource_typestringRequiredExample: dynamic
data_sourcestringRequiredExample: origin
protocolstringRequiredExample: https
origin_urlstringRequiredExample: test.com
server_namestringRequiredExample: domain.test.com
resource_namestringRequiredExample: waf-213105900
extensionsstringRequiredExample: waf
Responses
200

Returns the created WAF-enabled CDN Resource.

application/json
post
/api/v1/cdn/{organization_uuid}/resource
200

Returns the created WAF-enabled CDN Resource.

Update WAF Mode

put

Updates the operating mode of the Web Application Firewall (WAF) for the specified Resource.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organization_uuidstringRequired

Unique identifier of the organization.

resource_uuidstringRequired

Unique identifier of the WAF-enabled CDN Resource.

Body
resource_uuidstringRequired
waf_statusstring · enumRequired

WAF operating mode.

Possible values:
typestringRequiredExample: waf
Responses
200

Returns a confirmation indicating that the WAF mode was updated.

application/json
put
/api/v1/cdn/{organization_uuid}/resource/{resource_uuid}
200

Returns a confirmation indicating that the WAF mode was updated.

Create or Update Custom WAF Rules

put

Creates or updates custom WAF rules for the specified Resource.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organization_uuidstringRequired

Unique identifier of the organization.

resource_uuidstringRequired

Unique identifier of the WAF-enabled CDN Resource.

Body
resource_uuidstringRequired
waf_statusstring · enumRequiredPossible values:
typestringRequiredExample: waf
Responses
200

Returns a confirmation indicating that the custom WAF rules were applied.

application/json
put
/api/v1/cdn/{organization_uuid}/resource/{resource_uuid}/rules
200

Returns a confirmation indicating that the custom WAF rules were applied.

Delete All Custom WAF Rules

delete

Deletes all custom WAF rules associated with the specified Resource.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organization_uuidstringRequired

Unique identifier of the organization.

resource_uuidstringRequired

Unique identifier of the WAF-enabled CDN Resource.

Body
resource_uuidstringRequired
waf_statusstring · enumRequiredPossible values:
typestringRequiredExample: waf
waf_rulesobject[]Required

Provide an empty array to delete all custom WAF rules.

Responses
200

Returns a confirmation indicating that all custom WAF rules were deleted.

application/json
delete
/api/v1/cdn/{organization_uuid}/resource/{resource_uuid}/rules
200

Returns a confirmation indicating that all custom WAF rules were deleted.

Last updated

Was this helpful?