GetPurgeStatus

Update time: 2026-07-28 19:04:08

Applicable Products

Content MGMT

API Description

Query the purge task status. Use this API to check if the task has been completed successfully throughout the global CDN.

Call frequency

Single user trigger frequency: 10/5min

Request parameter(s)

Body Params

NameDescription
startTimeString
Start time of task creation,The format is yyyy-MM-dd HH:MM:ss; For example 2017-01-10 06:33:26,Can only query refresh tasks within 3 days.
endTimeString
End time of task creation,The format is yyyy-MM-dd HH:MM:ss; For example 2017-01-10 06:33:26
itemIdString
A unique identifier for the same batch of tasks. If you submit multiple URLs from an API request, the ID is a unique number for these tasks.Query tasks by batch, such as submitting 10 url refreshes at a time. After successful submission, the content management system will return an itemId in the response message.
urlString
The cached url needs to be refreshed (url type could be directory, regular file, tag, and common file), and a single call allows only one url to be entered
statusString
Task status. The system allows you to select a task status query. These states can be queried: success: Purge success. failure: Purge failed. wait: The purge task is waiting to be processed. run: The purge task is being executed.
pageNoInteger
Request page number. The default is 1.
pageSizeInteger
The number of pages displayed. The default is 20.

Response parameter(s)

Body Params

NameDescription
countInteger
The number of results for this query, count for 10 if 10 tasks are eligible for a query
CodeInteger
After the task commits, the system's response code: 1) 0 means failure 2) 1 means success
MessageString
System response message after task submit.
pageNoInteger
Total page count of task query results
pageSizeInteger
How many refresh task data per page
resultDetailList
Set of task results
beginTimeString
Time for content management system to start cache refresh task
createTimeString
Time the content management system creates a cache refresh task
finishTimeString
Content management system executes and summarizes the completion time of cache refresh tasks
rateString
Success rate for performing cache refresh tasks, such as 98%, the value is 98
statusString
Cache refresh task execution status, which has the following states: 1) success: Indicates that the task that refreshes the file cache has performed successfully 2) failure: Indicates that the task that refreshes the file cache has performed failed 3) wait: Indicates that the task of refreshing the cache is in the queue 4) run: Indicates that the task of refreshing the cache is in progress
urlString
Refresh the cache of a file or directory.
isDirInteger
The operation type of the purge task: 1) 0: Refresh a specific file 2) 1: regular file 3) 2: Refresh all files in a directory 4) 3: Refresh a tag

Error code

Error code(code)Description(message)HTTP statusSemantic
0The end time of the query cannot be earlier than the start time200The end time of the query cannot be earlier than the start time
0Page number cannot be negative200Page number cannot be negative
0Page size cannot be negative or greater than 1000200Page size cannot be negative or greater than 1000
0Error resolving json200Error resolving json
0Querying tasks up to 3 days ago is not allowed200Querying tasks up to 3 days ago is not allowed
0Error in time format200Error in time format
0Start time or end time not allowed to be empty200Start time or end time not allowed to be empty
1Success200Success
0Error in the status of the query200Error in the status of the query
0Invalid user name (user name is empty or user name is not allowed to push)200Invalid user name (user name is empty or user name is not allowed to push)

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/bin/bash
username="username"
apiKey='apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.atomile.com/ccm/purge/ItemIdQuery" \
-X "POST" \
-u "$username:$password" \
-H "Date:$date" \
-H "Content-Type: application/json" \
-d '{
    "startTime":"2017-05-01 00:00:00",
    "endTime":"2017-05-02 23:59:59",
    "itemId":"3ff59d129a2c40a39b9be8c9de9975d6",
    "url":"https://www.test.com/test/test.jpg",
    "status":"success",
    "pageNo":1,
    "pageSize":20
}'
Response example
Copy Copy success
HTTP/1.1 200 OK
Content-Type: charset=utf-8; charset=UTF-8
x-cnc-request-id: 23f9abf8-1f4a-498c_1493668625478
Server: xxx
Content-Length: 1355
{
   "count": 282,
   "Code": 1,
   "Message":"success",
   "pageNo": 1,
   "pageSize": 20,
   "resultDetail": [
                    {
                    "beginTime": "2017-01-11 16:17:03",
                    "createTime": "2017-01-11 16:17:03",
                    "finishTime": "2017-01-11 16:17:04",
                    "isDir":0,
                    "rate": "100",
                    "status": "success",
                    "url": "http: //www.abc.com/testdsfsdf1"
                    },
                    {
                    "beginTime": "2017-01-11 16:17:03",
                    "createTime": "2017-01-11 16:17:03",
                    "finishTime": "2017-01-11 16:17:04",
                    "isDir":1,
                    "rate": "100",
                    "status": "success",
                    "url": "http: //www.abc.com/test/"
                    }
                   ]
}