Refreshes the cache that is written by calling the cache operation of EdgeRoutine. You can refresh multiple URLs in each request.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dcdn:RefreshErObjectCaches | none | *Domain acs:dcdn:*:{#accountId}:domain/{#DomainName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ObjectPath | string | Yes | The URL that you want to refresh. Note
| http://example.com/examplefile.txt |
ObjectType | string | Yes | The refresh type. Valid values:
Note
If you refresh the files in one or more directories, the resources in the directory that you want to refresh are marked as expired. You cannot delete the directory. If clients request resources on POPs that are marked as expired, Dynamic Content Delivery Network (DCDN) checks whether the resources on your origin server are updated. If resources are updated, DCDN retrieves the latest version of the resources and returns the resources to the clients. Otherwise, the origin server returns the 304 status code.
| File |
MergeDomainName | string | No | The domain names that are merged for refreshing. POPs that provide services for the domain names are refreshed. Note
Separate multiple domain names with commas (,).
| a.test.com,b.test.com |
RoutineId | string | No | The ID of the routine, which is in the format of "Name.Subdomain" and is the unique identifier of a custom routine. | test.mysubdomain |
Force | boolean | No | Specifies whether to refresh resources in a directory if the resources requested are different from the resources on the origin server. Default value: false.
| false |
Response parameters
Examples
Sample success responses
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 | QuotaExceeded.Refresh | Your refresh attempts have exceeded the daily limit. | The number of refresh tasks on the current day has reached the upper limit. You can call the refresh API operation to query the remaining number of refresh tasks that you want to run on the current day. |
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 | InvalidExtensiveDomain.ValueNotSupported | Extensive domain not supported. | - |
400 | PreloadQueueFull | Preload queue is full, please try again later! | - |
400 | QuotaPerMinuteExceeded.Refresh | You've exceeded the prescribed refresh limits per minute. | - |
400 | InvalidStations.Malformed | The specified Stations is invalid. | - |
400 | InvalidParameters | The parameters you provided are invalid. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|