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
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceId | Integer | Mandatory | The unique identifier of the service. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| urls | Array | Mandatory | List of URLs to be purged from edge servers. Each URL must be a complete path including protocol and domain. |
Response
Response Body
| Parameter | Type | Description |
|---|---|---|
| batchId | Int | The unique identifier of the purge batch. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | Request.BadRequest | Bad request. |
| 400 | InvalidCustomer.IdEmpty | Customer ID cannot be empty or invalid. |
| 400 | InvalidService.IdIncorrect | Service ID is empty or invalid. |
| 400 | InvalidService.IdPermission | Service ID cannot be found or unknown. |
| 400 | InvalidPurge.Url | URL cannot be empty. |
| 400 | InvalidPurge.PurgeFormat | URL 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
}