Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
After the source station content is updated, you want the update results to be mapped to the CDN service node in real time. Because the Azure Content Delivery Network has either default cache rules or cache rules set by the user, you must use the cache refresh function to clear the cached content on the node. If you access the file again, the file you obtain will be the updated file.
You can force a cache refresh for individual files or batches of files. Each subscription's daily file refresh quota is 2,000. The directory refresh quota is 500. If you need to adjust this, please contact the development team.
Method | Request URI
|
---|---|
POST | https://restapi.cdn.azure.cn/subscriptions/{subscriptionId}/endpoints/{endpointId}/purges?apiVersion=1.0 |
Parameter name | Description
|
---|---|
subscriptionId | Subscription unique identifier |
endpointId | Target node unique identifier |
Request header | Description |
---|---|
x-azurecdn-request-date | Required. Enter the current UTC request time in yyyy-MM-dd hh:mm:ss format. |
Authorization | Required. Refer to CDN API signing mechanism for authorization headers. |
content-type | Required. application/json |
To add a cache refresh, specify the following parameters. An example JSON file is provided here:
{
"Files": [
"http://example.com/pictures/city.png"
],
"Directories": [
"http://example.com/pictures/"
]
}
Parameter name | Description |
---|---|
Files | When refreshing the file list, the path must be an absolute path. For example: http://example.com/pictures/city.png |
Directories | When refreshing the directory list, the path must be an absolute path. For example: http://example.com/pictures/ |
A response comprises a status code, response headers, and a response body.
Status code | Description |
---|---|
202 | Indicates that the server has successfully accepted the request. |
Other | General response indicating that an error has occurred. |
Response header | Description |
---|---|
X-Correlation-Id | The request's unique identifier, which is used to track request information. |
JSON example for request succeeded:
{
"Succeeded": true,
"IsAsync": true,
"AsyncInfo": {
"TaskTrackId": "b520c544-ec34-4ac4-86f5-5394363919c3",
"TaskStatus": "Processing"
}
}
Parameter name | Description |
---|---|
TaskTrackId | Refresh operation unique identifier, which can be used to query refresh progress. |
TaskStatus | Task status
|
JSON example for request failed:
{
"Succeeded": false,
"ErrorInfo": {
"Type": "MissingAuthorizationHeader",
"Message": "Missing authorization header."
}
}
Parameter name | Description |
---|---|
Type | Error type
|
Message | Error information |