All Products
Search
Document Center

ApsaraVideo VOD:RefreshVodObjectCaches

最終更新日:Jul 19, 2024

Refreshes files on Alibaba Cloud CDN nodes. You can refresh multiple files at a time based on URLs.

Operation description

  • This operation is available only in the China (Shanghai) region.

  • You can submit a maximum of 2,000 requests to refresh resources based on URLs and 100 requests to refresh resources based on directories each day by using an Alibaba Cloud account.

  • You can call the RefreshVodObjectCaches operation to refresh content and the PreloadVodObjectCaches operation to prefetch content.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ObjectPathstringYes

The URL of the file to be prefetched. Separate multiple URLs with line breaks (\n or \r\n).

abc.com/image/1.png
ObjectTypestringNo

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

  • File (default): refreshes one or more files.
  • Directory: refreshes the files in specified directories.
  • Regex: refreshes content based on regular expressions.
  • IgnoreParams: removes the question mark (?) and parameters after the question mark (?) in a request URL and refreshes content. After you call this operation with the request URL submitted, the system compares the submitted URL with the URL of the cached resource without specific parameters. If the URLs match, the POPs refresh the cached resource.
File
ForcebooleanNo

Specifies whether to purge resources in a directory if the resources requested are different from the resources on the origin server.

  • true: refreshes all resources in the directory. If you set this parameter to true, when the requested content matches the resource in the directory, the POP retrieves the resource from the origin server, returns the resource to the client, and caches the resource.
  • false (default): refreshes the changed resources in the directory. If you set this parameter to false, when the requested content matches the resource in the directory, the POP obtains the Last-Modified parameter of the resource from the origin server. If the value of the obtained Last-Modified parameter is the same as that of the cached resource, the cached resource is returned. Otherwise, the POP retrieves the resource from the origin server, returns the resource to the client, and caches the resource.
false

Response parameters

ParameterTypeDescriptionExample
object
RefreshTaskIdstring

The ID of the refresh task. Multiple IDs are separated by commas (,). Refresh tasks are merged based on the following rules:

If the tasks are set for the same accelerated domain name, submitted within the same second, and refresh content based on URLs instead of directories, the tasks IDs are merged into the same task ID (RefreshTaskId). If the number of these tasks exceeds 2,000, every 2,000 tasks IDs are merged into the same task ID (RefreshTaskId).

70422*****2904
RequestIdstring

The request ID.

D61E4801-EAFF-4A63-****-FBF6CE1CFD1C

Examples

Sample success responses

JSONformat

{
  "RefreshTaskId": "70422*****2904",
  "RequestId": "D61E4801-EAFF-4A63-****-FBF6CE1CFD1C"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-11The Error code has changed. The request parameters of the API has changedView Change Details

Common errors

The following table describes the common errors that this operation can return.

Error codeError messageHTTP status codeDescription
ThrottlingRequest was denied due to request throttling.503The error message returned because the request was denied due to throttling.
IllegalOperationIllegal domain operate is not permitted.403The error message returned because the domain name is invalid.
OperationDeniedYour account does not open VOD service yet.403The error message returned because ApsaraVideo VOD has not been activated for your Alibaba Cloud account.
OperationDenied.SuspendedYour VOD service is suspended.403The error message returned because your Alibaba Cloud account has overdue payments. Add funds to your account.
InvalidDomain.NotFoundThe domain provided does not belong to you.404The error message returned because the domain name does not exist or does not belong to you.
InvalidDomain.OfflineThe domain provided is offline.404The error message returned because the domain name has been disabled.
QuotaExceeded.RefreshYou’ve exceeded the prescribed refresh limits.400The error message returned because the number of requests to refresh or prefetch the content exceeds the upper limit on the current day.
ServiceBusyThe specified Domain is configuring, please retry later.403The error message returned because the domain name is being configured. Try again later.
InvalidDomain.Configure_failedFailed to configure the provided domain.500The error message returned because the system failed to configure the domain name and cannot refresh or prefetch the content.
MissingParameterThe input parameter “ObjectPath” that is mandatory for processing this request is not supplied.400The error message returned because the ObjectPath parameter is not specified.
InvalidObjectType.ValueNotSupportedThe specified value of "" is not supported.400The error message returned because the value of the ObjectType parameter is invalid.
InvalidObjectPath.MalformedThe specific value of parameter ObjectPath is malformed.400The error message returned because the value of the ObjectPath parameter is in an invalid format.
InvalidExtensiveDomain.ValueNotSupportedExtensive domain not supported.400The error message returned because the domain name contains a wildcard character.
QuotaPerMinuteExceeded.RefreshYou’ve exceeded the prescribed refresh limits per minute.400The error message returned because the number of requests to refresh the content exceeds the upper limit per minute.