Purge Content
API Endpoint
Request URL: cache/refresh (POST)
API Host:
cdn.api.edgenext.comAPI Version:
v2
Description
Deletes specified cached resources from all CDN nodes across the network. When the resources are requested again, they will be fetched from the origin server and re-cached.
Note: The daily limit per user is 10,000 URL refreshes and 100 directory refreshes. The configuration takes effect across the network within seconds. For API rate limits, see Response Headers.
Note: Refresh task records are retained for 1 month only. Please query and save the relevant refresh status within this period.
Input Parameters
Public Parameters: Contact the on-duty support engineer to obtain your API token.
Request Parameters (POST)
Parameters support formats including form-data, x-www-form-urlencoded, and JSON.
| Parameter | Type | Required | Description |
|---|---|---|---|
urls |
array | Yes | List of URLs or directories to refresh. Maximum 500 entries per request. |
type |
string | Yes | Type of resources to refresh.dir — Directoryurl — URL |
Request Example
curl -X POST "https://cdn.api.edgenext.com/v2/cache/refresh?token=xxx"\
-H "Content-Type: application/json"\
-d '{"urls":["http:\/\/aa.qingcdn.com\/resources\/abc\/images\/logo.png","http:\/\/portal.qingcdn.com\/theme\/bsc1.7\/images\/username-caret.png","http:\/\/bb.qingcdn.com\/resources\/dfas\/images\/bsc-icons.png","http:\/\/bb.qingcdn.com\/resources\/rew\/images\/body-bg.jpg"],"type":"url"}'
Response Example
{
"code": 0, // A value of 0 indicates that the request was successful. A non-zero value indicates an error.
"data": {
"task_id": "2400003", // Task ID for this submission. Use this ID to query the status of the submitted URLs/directories.
"count": 4, // Number of successfully submitted URLs
// The err_urls field is returned when some entries fail to be submitted. Common causes:
// 1. Invalid URL format
// 2. The domain of the URL does not belong to your account
// 3. The domain is suspended or deleted
"err_urls":["http://xxxx.com/xx","http://test.com/xxx"]
}
}
Response Headers
HTTP/1.0 200 OK
Api-Id: 70944777
Content-Type: application/json; charset=utf-8
X-Ratelimit-Grad: minute // Rate limit interval (minute/hour/day)
X-Ratelimit-Limit: 150 // Maximum requests allowed during the current interval
X-Ratelimit-Remaining: 99 // Remaining requests available during the current interval
X-Retry-After: 14 // Number of seconds until the rate limit resets
X-Refresh-Url-Remaining: 9996 // Remaining daily quota for URL/directory pushes (X-Refresh-Url-Remaining for URLs, X-Refresh-Dir-Remaining for directories)
HTTP Status Codes
| Status Code | Description |
|---|---|
200 |
Request completed successfully. |
400 |
Invalid request parameters. |
401 |
Authentication failed. The API token is invalid, or your account does not have permission to access this API. |
404 |
The requested URL could not be found. |
5xx |
Internal server error. Please contact the on-duty support engineer. |
Need help? Contact our support team at support@edgenext.com.
Back to documentation home