You can call this operation to refresh the file content on the CDN nodes. Alibaba Cloud CDN supports refreshing content of multiple URLs at a time.

Alibaba Cloud CDN supports POST requests in which parameters are sent as a form.

Note
  • You can call the RefreshObjectCaches operation to refresh content and call the PushObjectCache operation to preload content.
  • You can submit up to 2,000 URLs and 100 directories for content refresh each day by using the same ID.
  • You can specify up to 1,000 URLs for each refresh request.
  • Up to 50 requests can be submitted per second.

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 RefreshObjectCaches

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

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

The URL to be refreshed. 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 be refreshed. Valid values: File and Directory. Default value: File.

Response parameters

Parameter Type Example Description
RefreshTaskId String 704222904

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

RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<RefreshObjectCaches>	
  <RefreshTaskId>704222904</RefreshTaskId>
	  <RequestId>D61E4801-EAFF-4A63-AAE1-FBF6CE1CFD1C</RequestId>
</RefreshObjectCaches>

JSON format

{
	"RefreshTaskId":"704222904",
	"RequestId":"D61E4801-EAFF-4A63-AAE1-FBF6CE1CFD1C"
}

Error codes

For more information about error codes, visit API Error Center.