All Products
Search
Document Center

ApsaraVideo VOD:RefreshVodObjectCaches

Last Updated:Jul 21, 2026

Purges file content on nodes. Specifies URL content to purge on cache nodes, and supports batch URL purging.

Operation description

  • Currently, the only supported service region is China (Shanghai).

  • Each account can submit up to 2,000 URL purge requests and 100 directory purge requests per day.

  • Purge and prefetch operations include the RefreshVodObjectCaches purge operation and the PreloadVodObjectCaches prefetch operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vod:RefreshVodObjectCaches

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ObjectPath

string

Yes

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

abc.com/image/1.png

ObjectType

string

No

The type of purge. Valid values:

  • File (default): file purge.

  • Directory: directory purge.

  • Regex: regular expression-based purge.

  • IgnoreParams: parameter-stripped purge. Parameter stripping refers to removing the question mark (?) and all characters after it from the request URL. Parameter-stripped purge means that you submit a parameter-stripped URL through the API, and the submitted URL is matched against cached resource URLs after parameter stripping. If a cached resource URL matches the submitted URL after parameter stripping, the CDN node purges the cached resource.

File

Force

boolean

No

Specifies whether to purge all resources in the corresponding directory when the back-to-origin content is inconsistent with the origin server resources. Default value: false.

  • true: purges all resources in the corresponding directory. When "Purge All Resources" is selected, if the requested content matches a resource in the directory, the CDN node fetches the new resource from the origin server, returns it to the user, and re-caches the resource.

  • false: purges only changed resources in the corresponding directory. When "Purge Changed Resources" is selected, if the requested content matches a resource in the directory, the CDN node retrieves the Last-Modified information of the resource from the origin server. If it matches the currently cached resource, the cached resource is returned directly. If it does not match, the CDN node fetches the new resource from the origin server, returns it to the user, and re-caches the resource.

false

Response elements

Element

Type

Description

Example

object

RefreshTaskId

string

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

Purge tasks (at URL granularity) submitted for the same domain name within the same second are merged into a single RefreshTaskId. If purge tasks (at URL granularity) submitted for the same domain name within the same second exceed 2,000, they are merged into one RefreshTaskId per 2,000 tasks.

70422*****2904

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 SingleRequest.OverLimit A maximum of 1000 URLs are supported for each request.
400 InvalidObjectType.Malformed The specified ObjectType is invalid.
400 QuotaExceeded.Refresh Your refresh attempts have exceeded the daily limit. The daily refresh quota has been exceeded.
400 InvalidObjectPath.Malformed The specified ObjectPath is invalid. The ObjectPath parameter is invalid.
400 InvalidExtensiveDomain.ValueNotSupported The specified ExtensiveDomain is not supported.
400 QuotaPerMinuteExceeded.Refresh You tried to refresh too frequently; please try again later.
400 TooMany.Refresh The refresh queue is full; please try again later.
404 InvalidDomain.NotFound The domain provided does not belong to you.
404 InvalidDomain.Offline The domain provided is offline.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.