You can call this operation to refresh specific objects on cache nodes. You can specify one or more URLs in one request.

When you call this operation, follow these rules:
  • You can submit refresh requests for a maximum of 2,000 URLs and 100 directories by using the same account each day.
  • You can specify a maximum of 1,000 URLs in one refresh request, among which a maximum of 100 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 object to refresh in the format of a URL. You can specify multiple URLs and separate them with line breaks (\n or \r\n).

ObjectType String No File

The type of the object to refresh. Valid values:

  • File (default): the file with the specified URL
  • 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

HTTP status code Error code Error message Description
400 SingleRequest.OverLimit A maximum of 1000 URLs are supported for each request. The error message returned because you can only 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 ObjectType parameter is not supported.
400 InvalidObjectPath.Malformed The specified ObjectPath is invalid. The error message returned because the specified ObjectPath parameter is invalid.
400 QuotaExceeded.Refresh Your refresh attempts have exceeded the daily limit. The error message returned because your daily objects to refresh exceeds the upper limit. You can call the DescribeDcdnRefreshQuota operation to query the remaining quota of the refresh objects for the day.
400 InvalidExtensiveDomain.ValueNotSupported The specified ExtensiveDomain is not supported. The error message returned because wildcard domains are not supported.
400 QuotaPerMinuteExceeded.Refresh You tried to refresh too frequently; please try again later. The error message returned because you have submitted refresh requests too frequently. Try again later.
400 TooMany.Refresh The refresh queue is full; please try again later. The error message returned because the number of domain names being refreshed has reached the upper limit. Try again later.

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