Skip to main content

Custom Purge

This API is used to refresh cached content on edge nodes based on a custom URL pattern.

Request​

Request-Line​

POST /cdn/v1.0/services/{serviceId}/customPurge HTTP/1.1

Request Parameters​

Path Parameters​

ParameterTypeRequiredDescription
serviceIdIntegerMandatoryThe unique identifier of the service.

Body Parameters​

ParameterTypeRequiredDescription
operatorStringMandatoryThe operator used to match the URL pattern. Supported values: startswith or endswith.
patternStringMandatoryThe URL pattern to purge. Must start with / when the operator is startswith.

Response​

Response Body​

ParameterTypeDescription
batchIdIntThe unique identifier of the purge batch.

Status Codes, Error Codes and Error Messages​

Status CodeError CodeError Message
400Request.BadRequestBad request.
400InvalidCustomer.IdEmptyCustomer ID cannot be empty or invalid.
400InvalidService.IdIncorrectService ID is empty or invalid.
400InvalidService.IdPermissionService ID cannot be found or unknown.
400InvalidPurge.PatternThe pattern is required.
400InvalidPurge.PatternFormatThe pattern must be start with '/' when operator is startswith.

Examples​

Create Purge​

Request​

POST /cdn/v1.0/services/97856/customPurge HTTP/1.1

{
"operator":"startswith",
"pattern":"/"
}

Successful Response Body​

{
"batchId": 2
}