Refreshes the specified objects on cache nodes. The objects can be included in the content of files or URLs. You can specify one or more URLs in one request.

Before you call this operation, pay attention to the following notes:
  • You can use an account to submit refresh requests for a maximum of 2,000 URLs and 100 directories each day.
  • You can specify a maximum of 1,000 URLs in one refresh request. A maximum of 100 URLs among the 1,000 URLs can have the same domain name.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RefreshDcdnObjectCaches

The operation that you want to perform. Set the value to RefreshDcdnObjectCaches.

ObjectPath String Yes example.com/image/1.png

The path of the objects that you want to refresh. You can specify multiple URLs and separate them with line breaks (\n or \r\n).

ObjectType String No File

The type of the objects that you want to refresh. Valid values:

  • File: the file with the specified URL. The default value is File.
  • Directory: the files under the specified directory.

Response parameters

Parameter Type Example Description
RefreshTaskId String 95248880

The ID of the refresh task returned. If multiple tasks are returned, the IDs are separated with commas (,).

RequestId String E5BD4B50-7A02-493A-AE0B-97B9024B4135

The ID of the request.

Examples

Sample requests

https://dcdn.aliyuncs.com?Action=RefreshDcdnObjectCaches
&ObjectPath=example.com/example.txt
&ObjectType=File
&<Common request parameters>

Sample success responses

XML format

<RefreshDcdnObjectCachesResponse>
	  <PushTaskId>95248880</PushTaskId>
	  <RequestId>E5BD4B50-7A02-493A-AE0B-97B9024B4135</RequestId>
</RefreshDcdnObjectCachesResponse>

JSON format

{
  "PushTaskId": "95248880",
  "RequestId": "E5BD4B50-7A02-493A-AE0B-97B9024B4135"
}

Error codes

HttpCode Error code Error message Description
400 SingleRequest.OverLimit A maximum of 1000 URLs are supported for each request. The error message returned because the maximum number of URLs in one request has been reached. You can specify a maximum of 1,000 URLs in one refresh request.
400 InvalidObjectType.Malformed The specified ObjectType is invalid. The error message returned because the specified value of the ObjectType parameter is invalid. Specify another value.
400 InvalidObjectPath.Malformed The specified ObjectPath is invalid. The error message returned because the specified value of the ObjectPath parameter is invalid. Specify a valid value.
400 QuotaExceeded.Refresh Your refresh attempts have exceeded the daily limit. The error message returned because the maximum number of refresh requests on the current day has been reached. The quota of refresh requests on the current day is exhausted. You can call the DescribeDcdnRefreshQuota operation to query the remaining quota of refresh requests for the current day.
400 InvalidExtensiveDomain.ValueNotSupported The specified ExtensiveDomain is not supported. The error message returned because wildcard domain names are not supported.
400 QuotaPerMinuteExceeded.Refresh You tried to refresh too frequently; please try again later. The error message returned because refresh requests are submitted at a high frequency. Try again later.
400 TooMany.Refresh The refresh queue is full; please try again later. The error message returned because the maximum number of domain names that are being refreshed has been reached. Try again later.

For a list of error codes, visit the API Error Center.