Skip to main content

Purge By URL

This API is used to refreshes the cached content at edge nodes by URL.

request

Request-Line

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

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
serviceIdIntegerMandatoryservice id.

Body Parameters

ParameterTypeRequiredDescription
urlsString[]MandatoryThe URLs path to be purged on edge server.

Response

Response Body

ParameterTypeDescription
batchIdIntThe id of batch purge.

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400InvalidCustomer.IdEmptyCustomer id can be empty or invalid.
400InvalidService.IdIncorrectService id is empty or invalid.
400ServiceId.IdPermissionServiceId can not be found or unknown.
400InvalidPurge.UrlUrl cannot be empty.
400InvalidPurge.PurgeFormatPurge format is incorrect.

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
}