All Products
Search
Document Center

ApsaraVideo VOD:DescribeVodRefreshTasks

Last Updated:Nov 09, 2022

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

Operation Description

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

    The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

    • 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 keyword: refers to the condition keyword defined by the cloud product itself.
    • 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.
    Operateaccess levelResource typeconditional keywordAssociation operation
    vod:DescribeVodRefreshTasksList
    • VOD
      acs:vod:*:{#accountId}:*/*
      without
    without

    Request parameters

    ParameterTypeRequiredDescriptionExample
    TaskIdstringNo

    The task ID based on which the query is performed.

    70422****
    ObjectPathstringNo

    The object URL based on which the query is performed. The URL is used as a condition for an exact match.

    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 the files under one or more directories.
    • preload: prefetches one or more files.
    NoteIf you specify the DomainName or TaskStatus parameter, you must also specify the ObjectType parameter.
    file
    DomainNamestringNo

    The domain name.

    example.com
    StatusstringNo

    The status of the task. Valid values:

    • Complete: indicates that the task is complete.
    • Refreshing: indicates that the task is in progress.
    • Failed: indicates that 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.

    NoteYou 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
    Tasksarray

    The information about the returned tasks.

    object
    Statusstring

    The status of the task. Valid values:

    • Complete: indicates that the task is complete.
    • Refreshing: indicates that the task is in progress.
    • Failed: indicates that the task failed.
    • Pending: indicates that 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. Valid values:

    • file: refreshes one or more files. This is the default value.
    • directory: refreshes the files under one or more directories.
    • preload: prefetches one or more files.
    file
    Processstring

    The progress of the task, in percentage.

    100%
    Descriptionstring

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

    • Internal Error: indicates that an internal error occurred.
    • Origin Timeout: indicates that the response from the origin server timed out.
    • Origin Return StatusCode 5XX: indicates that the origin server returned a 5XX error.
    Internal Error
    ObjectPathstring

    The URL of the object to which the refresh or prefetch task is applied.

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

    The ID of the task.

    704225667

    Example

    Normal return example

    JSONFormat

    {
      "RequestId": "174F6032-AA26-470D-****-36F0EB205BEE",
      "PageNumber": 1,
      "PageSize": 10,
      "TotalCount": 2,
      "Tasks": [
        {
          "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 API error center.

    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.
    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.
    InvalidTaskId.MalformedSpecified TaskId is malformed.400The error message returned because the value of the TaskId parameter is in an invalid format.