Skip to main content

Purge By URL

This API submits a request to purge (remove) cached content from edge nodes by specifying one or more URLs. A successful response indicates that the purge request has been accepted, not that the purge operation has been completed. Purging may take some time. Use the returned batchId to check the purge status through the Purge Status API.

Request​

Request-Line​

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

Request Parameters​

Path Parameters​

ParameterTypeRequiredDescription
serviceIdIntegerMandatoryThe unique identifier of the service.

Body Parameters​

ParameterTypeRequiredDescription
urlsArrayMandatoryList of URLs to be purged from edge servers. Each URL must be a complete path including protocol and domain.

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.UrlURL cannot be empty.
400InvalidPurge.PurgeFormatURL format is invalid. Must be a valid HTTP/HTTPS URL.

Examples​

Purge By URL​

Request​

POST /cdn/v1.0/services/228654/purgeURL HTTP/1.1

{
"urls": [
"https://cdn.example1.com/resources/load.js",
"https://cdn.example1.com/resources/load2.js",
"https://cdn.example1.com/resources/load3.js"
]
}

Successful Response Body​

{
"batchId": 2
}