Refreshes caches written through the edge function Cache API and caches written through fetch subrequests. Supports batch URL refresh.
Operation description
Request method: POST requests are supported. Parameters are displayed in a form.
Related operations: Refresh operations include the RefreshDcdnObjectCaches operation.
URL refresh quota (daily): By default, each account can submit up to 10,000 URL refresh requests and 100 directory refresh requests per day. Directory refresh includes subdirectories.
Each request can contain up to 1,000 URL refresh requests or 100 directory refresh requests.
Each domain name supports up to 1,000 URL refresh requests per minute.
Maximum number of calls per user: 30 calls per second.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:RefreshErObjectCaches |
none |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ObjectPath |
string |
Yes |
The URLs to refresh. Note
|
http://example.com/examplefile.txt |
| ObjectType |
string |
Yes |
The refresh type. Valid values:
Note
Directory refresh marks resources as expired by default. You cannot delete a directory. Directory refresh marks the corresponding directory on POPs as expired. When a user subsequently accesses the directory, the DCDN POP performs back-to-origin validation with the origin server to check whether the directory has been updated. If updated, the POP retrieves the new version from the origin server and returns it to the user. If not updated, the origin server returns a 304 status code in the response. |
File |
| MergeDomainName |
string |
No |
The domain names to merge for refresh. When a refresh is performed, the scheduling node of the merged domain names is refreshed. Note
Separate multiple domain names with commas (,). |
a.test.com,b.test.com |
| RoutineId |
string |
No |
The routine ID of the edge function script, also known as the function ID. It is composed of "Name.Subdomain" and serves as the unique identifier for the edge function code. Note
|
test.mysubdomain |
| Force |
boolean |
No |
Specifies whether to refresh all resources in the corresponding directory when the back-to-origin content is inconsistent with the origin server resources. Default value: false.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F |
| RefreshTaskId |
string |
The ID of the refresh task. Multiple IDs are separated by commas (,). |
95248880 |
Examples
Success response
JSON format
{
"RequestId": "3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F",
"RefreshTaskId": "95248880"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | SingleRequest.OverLimit | A maximum of 1000 URLs are supported for each request. | |
| 400 | InvalidObjectType.Malformed | The specified ObjectType is invalid. | The ObjectType parameter is set to an invalid value. Specify a valid value and try again. |
| 400 | InvalidObjectPath.Malformed | The specified ObjectPath is invalid. | The ObjectPath parameter is set to an invalid value. Specify a valid value and try again. |
| 400 | InvalidObjectPath.Size.Malformed | The size of ObjectPath is bigger than 1000. | |
| 400 | QuotaExceeded.Refresh | You've exceeded the prescribed refresh limits. | |
| 400 | InvalidExtensiveDomain.ValueNotSupported | The specified ExtensiveDomain is not supported. | Wildcard domain names are not supported. |
| 400 | QuotaPerMinuteExceeded.Refresh | You tried to refresh too frequently; please try again later. | Refresh requests are submitted too frequently. Try again later. |
| 400 | TooMany.Refresh | The refresh queue is full; please try again later. | The maximum number of refresh requests for a domain name has been reached. Try again later. |
| 400 | PreloadQueueFull | Preload queue is full, please try again later! | |
| 400 | InvalidStations.Malformed | The specified Stations is invalid. | |
| 400 | InvalidParameters | The parameters you provided are invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.