All Products
Search
Document Center

ApsaraVideo VOD:DescribeVodRefreshTasks

Last Updated:May 11, 2024

Queries the information about one or more refresh or prefetch tasks.

Operation description

Note
  • This operation is available only in the China (Shanghai) region.
  • Note
  • If you do not specify the TaskId or ObjectPath parameter, the data in the last three days is returned on the first page. By default, one page displays a maximum of 20 entries. You can specify the TaskId and ObjectPath parameters at the same time.
  • Debugging

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

    Authorization information

    The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

    • Operation: the value that you can use in the Action element to specify the operation on a resource.
    • Access level: the access level of each operation. The levels are read, write, and list.
    • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
      • The required resource types are displayed in bold characters.
      • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
    • Condition Key: the condition key that is defined by the cloud service.
    • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
    OperationAccess levelResource typeCondition keyAssociated operation
    vod:DescribeVodRefreshTasksList
    • All Resources
      *
      none
    none

    Request parameters

    ParameterTypeRequiredDescriptionExample
    TaskIdstringNo

    The ID of the task that you want to query.

    70422****
    ObjectPathstringNo

    The path of the object. The path is used as a condition for exact matching.

    http://example.com/***.txt
    PageNumberintegerNo

    The number of the page to return.

    1
    ObjectTypestringNo

    The type of the task. Valid values:

    • file: refreshes one or more files.
    • directory: refreshes files in the specified directories.
    • preload: prefetches one or more files.
    Note If you specify the DomainName or Status parameter, you must also specify the ObjectType parameter.
    file
    DomainNamestringNo

    The domain name.

    example.com
    StatusstringNo

    The status of the task. Valid values:

    • Complete: The task is complete.
    • Refreshing: The task is in progress.
    • Failed: The task failed.
    Complete
    PageSizeintegerNo

    The number of entries to return on each page. Default value: 20. Maximum value: 50.

    20
    StartTimestringNo

    The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

    Note You can query data that is collected in the last three days.
    2017-01-01T12:12:20Z
    EndTimestringNo

    The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

    2017-01-01T12:30:20Z

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The ID of the request.

    174F6032-AA26-470D-****-36F0EB205BEE
    PageNumberlong

    The page number of the returned page.

    1
    PageSizelong

    The number of entries returned per page.

    10
    TotalCountlong

    The total number of entries returned.

    2
    Tasksobject []

    The information about the returned tasks.

    Statusstring

    The status of the task. Valid values:

    • Complete: The task is complete.
    • Refreshing: The task is in progress.
    • Failed: The task failed.
    • Pending: The task is pending.
    Complete
    CreationTimestring

    The time when the task was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

    2014-11-27T08:23:22Z
    ObjectTypestring

    The type of the task. Default value: file. Valid values:

    • file: refreshes one or more files.
    • directory: refreshes files in the specified directory.
    • preload: prefetches one or more files.
    file
    Processstring

    The progress of the task in percentage.

    100%
    Descriptionstring

    The type of error returned when the refresh or prefetch task failed. Valid values: Valid values:

    • Internal Error: An internal error occurred.
    • Origin Timeout: The response from the origin server timed out.
    • Origin Return StatusCode 5XX: The origin server returned an HTTP status code 5xx.
    Internal Error
    ObjectPathstring

    The URL of the object refreshed.

    http://example.com/****.txt
    TaskIdstring

    The ID of the task.

    704225667

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "174F6032-AA26-470D-****-36F0EB205BEE",
      "PageNumber": 1,
      "PageSize": 10,
      "TotalCount": 2,
      "Tasks": {
        "Task": [
          {
            "Status": "Complete",
            "CreationTime": "2014-11-27T08:23:22Z",
            "ObjectType": "file",
            "Process": "100%",
            "Description": "Internal Error",
            "ObjectPath": "http://example.com/****.txt",
            "TaskId": "704225667"
          }
        ]
      }
    }

    Error codes

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

    Common errors

    The following table describes the error codes 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.
    OperationDeniedYour account does not open VOD service yet.403The error message returned because ApsaraVideo VOD is not 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.
    InvalidTaskId.MalformedSpecified TaskId is malformed.400The error message returned because the value of the TaskId parameter is in an invalid format.