Purge Status
This API is used exclusively to retrieve the purge status of URLs submitted through the Purge by URL operation, identified by the purge batch ID. It does not apply to other types of purge operations.
Request
Request-Line
GET /cdn/v1.0/services/{serviceId}/purgeStatus/{batchId} HTTP/1.1
Request Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceId | Integer | Mandatory | The unique identifier of the service. |
| batchId | Integer | Mandatory | The unique identifier of the purge batch. |
Response
Response Body
| Parameter | Type | Description |
|---|---|---|
| batch | Object | Batch information object. See BatchVO for details. |
Object: BatchVO
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Unique identifier of the purge batch. |
| totalUrls | Integer | Total number of URLs submitted for purging. |
| failedUrlNum | Integer | Number of URLs that failed to purge. |
| succeedUrlNum | Integer | Number of URLs that were successfully purged. |
| createdAt | String | Timestamp when the purge batch was created (ISO 8601 UTC format). |
| finishedAt | String | Timestamp when the purge batch completed processing (ISO 8601 UTC format ). |
| urlInfo | Map | Status information for each URL in the batch. See Map for details. |
Object: Map
| Parameter | Type | Description |
|---|---|---|
| key | String | The URL string serving as the map key. |
| value | Object | URL status information. See UrlInfoVO for details. |
Object: UrlInfoVO
| Parameter | Type | Description |
|---|---|---|
| status | String | Current processing status of the URL. Supported values: PENDING, COMPLETE, FAILED. |
| finishedAt | String | Timestamp when the URL processing was completed (ISO 8601 UTC format). |
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.BatchId | The batch ID cannot be empty or invalid. |
Examples
Purge By URL
Request
GET /cdn/v1.0/services/228856/purgeStatus/697 HTTP/1.1
Successful Response Body
{
"batch": {
"id": 697,
"createdAt": "2025-11-17T03:26:32.417Z",
"totalUrls": 3,
"failedUrlNum": 0,
"succeedUrlNum": 0,
"urlInfo": {
"http://fdhfhj.com/1.jpg": {
"status": "PENDING"
},
"http://fdhfhj.com/2.jpg": {
"status": "PENDING"
},
"http://fdhfhj.com/3.jpg": {
"status": "PENDING"
}
}
}
}