All Products
Search
Document Center

RefreshObjectCaches

Last Updated: Jan 15, 2019

Description

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

It supports POST requests in which parameters are sent as a form.

Note:

  • You can submit a maximum of 2,000 URL refresh and push requests and 100 directory refresh requests for each account.
  • Relevant API operations are RefreshObjectCaches and PushObjectCache.
  • You can submit a maximum of 1,000 URL refresh by this interface. For each domain name, you can submit at maximum of 100 URL.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set the value to RefreshObjectCaches.
ObjectPath String Yes Example: example.com/image/1.png. Multiple URLs must be separated by a line break (\n or \r\n).
ObjectType String No The type of object to be refreshed. Valid values: File and Directory. Default value: File.

Response parameters

Name Type Description
RefreshTaskId String The ID of the refresh task. The tasks are separated with commas.

Examples

Sample requests

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

Sample responses

JSON format

  1. {
  2. "RefreshTaskId":"704222904","RequestId":"D61E4801-EAFF-4A63-AAE1-FBF6CE1CFD1C"
  3. }

XML format

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RefreshObjectCachesResponse>
  3. <RefreshTaskId>704225667</RefreshTaskId>
  4. <RequestId>AB14769A-A5F2-4CCD-B85B-3368DFF63C0A</RequestId>
  5. </RefreshObjectCachesResponse>

Error codes

Error code Error message HTTP status code Description
Throttling Request was denied due to request throttling. 503 The error message returned when the request is denied due to throttling.
IllegalOperation Illegal domain operate is not permitted. 403 The error message returned when the domain name is invalid.
OperationDenied Your account does not open CDN service yet. 403 The error message returned when the CDN service is not activated.
OperationDenied Your CDN service is suspended. 403 The error message returned when the CDN service is suspended.
InvalidDomain.NotFound The domain provided does not belong to you. 404 The error message returned when the domain name does not exist or does not belong to the current user.
InvalidDomain.Offline The domain provided is offline. 404 The error message returned when the domain name is offline.
QuotaExceeded.Refresh You’ve exceeded the prescribed refresh limits. 400 The error message returned when the refresh activities exceed the daily limit.
ServiceBusy The specified Domain is configuring, please retry later. 403 The error message returned when the domain name is being configured. Please try again later.
InvalidDomain.Configure_failed Failed to configure the provided domain. 500 The error message returned when the domain name configuration fails and cannot be refreshed.
MissingParameter The input parameter “ObjectPath” that is required for processing this request is not supplied. 400 The error message returned when the ObjectPath parameter is not specified.
InvalidObjectType.ValueNotSupported The specified value of ObjectType is not supported. 400 The error message returned when the value of the ObjectType is invalid.
InvalidObjectPath.Malformed The specific value of parameter ObjectPath is malformed. 400 The error message returned when the format of the ObjectPath value is incorrect.
InvalidExtensiveDomain.ValueNotSupported Extensive domain not supported. 400 The error message returned because wildcard domains are not supported.
QuotaPerMinuteExceeded.Refresh You’ve exceeded the prescribed refresh limits per minute. 400 The error message returned when you exceed the refresh limit per minute.