All Products
Search
Document Center

CDN:DescribePreloadDetailById

Last Updated:Nov 29, 2024

Queries the prefetch details of a task, including the prefetch progress of all resources in the task. Only users who are included in the whitelist can use this operation. If your bandwidth is greater than 100 Gbit/s, contact your business manager to apply for the whitelist.

Operation description

  • You can query data within the last 3 days.
  • You can call this operation up to 30 times per second per account.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
cdn:DescribePreloadDetailByIdget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringYes

Queries the details of a preload task by task ID. You can query one task ID at a time.

15423123921

Response parameters

ParameterTypeDescriptionExample
object
TotalCountlong

The number of queried tasks.

1
RequestIdstring

The ID of the request. You can use the ID to query logs and troubleshoot issues.

E9D3257A-1B7C-414C-90C1-8D07AC47BCAC
UrlDetailsarray<object>

The details of the task, including the task ID, start time, end time, domain name, success rate, status, returned error code, and completion details of all URL resources.

UrlDetailobject
TaskIdstring

The ID of the task that you want to query.

You can call the PushObjectCache operation to query task IDs. Then, you can use the task IDs to query task status.

You can query one task ID at a time.

14286878547
Domainstring

The domain name for prefetching resources.

example.com
CreationTimestring

The time when the task was created. The time is displayed in UTC.

2022-11-23T02:26:56Z
EndTimestring

The time when the task ended. The time is displayed in UTC.

2022-11-23T02:27:00Z
RetCodestring

The turned error code. A value of 0 indicates that the task succeeded.

0
Processstring

The progress of the prefetch task, which indicates the number of points of presence (POPs) on which the prefetch task is completed.

100%
Statusstring

The status of the task. Valid values:

  • Complete
  • Refreshing
  • Failed
Complete
Urlsarray<object>

The completion details of all URL resources in the task.

Urlobject
Urlstring

The URL of the prefetched resource.

/abc.jpg
Successstring

The success percentage, which indicates the number of POPs on which the resource is prefetched.

47%
Descriptionstring

The details of resource prefetch.

  • If the resource is prefetched on all POPs, "Successfully preloaded" is returned.
  • If the resource fails to be prefetched on some POPs, the failure details separated by vertical bars (|) are returned.
Successfully preloaded

Examples

Sample success responses

JSONformat

{
  "TotalCount": 1,
  "RequestId": "E9D3257A-1B7C-414C-90C1-8D07AC47BCAC",
  "UrlDetails": [
    {
      "TaskId": "14286878547",
      "Domain": "example.com",
      "CreationTime": "2022-11-23T02:26:56Z",
      "EndTime": "2022-11-23T02:27:00Z",
      "RetCode": "0",
      "Process": "100%",
      "Status": "Complete",
      "Urls": [
        {
          "Url": "/abc.jpg\n",
          "Success": "47%",
          "Description": "Successfully preloaded"
        }
      ]
    }
  ]
}

Error codes

HTTP status codeError codeError message
400InvalidTaskId.MalformedThe specified TaskId is invalid.
400DomainNameOverLimitA maximum of 500 domains are supported for each request.
400InvalidTaskId.MalformedThe count of taskIds should be 1.
400InvalidParametersThe parameters you provided are invalid.
400InvalidTimeThe query time cannot exceed the last 3 days.
429TooManyRequestsToo many requests, please try again later

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

Change history

Change timeSummary of changesOperation
2023-03-23The Error code has changedView Change Details