APIセンター

GetPrefetchStatus

更新時間: 2026-07-13 16:54:46

Query the prefetch task status. Use this API to check global network has prefetch successfully.

  • 単一ユーザーの使用頻度: 1/5min
  • 使用できるプロダクト: Content MGMT
API認証の詳細については、以下を参照してください:API認証の概要

リクエストパラメータ

Body パラメータ

パラメータ名説明
startTimeString

Query the start time of the task creation time, such as 2017-01-10 23:33:26. It is not allowed to query tasks before 7 days ago.

endTimeString

Query the end time of the task creation time, such as 2017-01-10 23:33:26,. The query time is no more than 1 days from the start time.

itemIdString

A unique identifier for the same batch of tasks. If you submit multiple urls from an API request, the ID is a unique number for these tasks. Query tasks by batch, such as submitting 10 url refreshes at a time. After the submission is successful, the content management system will return an itemId in the response message.

urlString

It is the url that you want to prefetch. This element only allows one url to be submitted per query.

statusString
選択可能な値:successfailurewaitrun

Task status. The system allows you to select a task status query. These states can be queried:

  1. success
  2. failure
  3. wait
  4. run
pageNoString
デフォルト値:1

Request page number. The default is 1.

pageSizeString
デフォルト値:20

The number of pages displayed. The default is 20.

レスポンスパラメータ

Body パラメータ

パラメータ名説明
countInteger

The number of tasks that match the query criteria. If 10 tasks meet the query criteria, the value of count is 10.

CodeInteger
選択可能な値:01

The status code of the task creation result:

  1. 1 means success
  2. 0 means failure.
MessageString

Content system response message after submitting the task.

pageNoInteger

The total number of pages for task query results.

pageSizeInteger

How many purge task data is displayed per page.

resultDetailList

Collection of task results.

beginTimeString

The time at which the content management system begins to get the file.

createTimeString

The time at which the content management system receive the request and creates a prefetch task.

finishTimeString

The time at which cdn cache the file and the content management system completes the summary task results.

rateString

The content management system handles the prefetch tasks's success rate. If the success rate is 98%, the value is 98.

statusString
選択可能な値:successfailurewaitrun

The status of the prefetch task. There are several states:

  1. success: Prefetch success.
  2. failure: Prefetch failed.
  3. wait: The prefetch task is waiting to be processed.
  4. run: The prefetch task is being executed.
urlString

Prefetched file URL.

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
1

success

200success
0

parse json error

200parse json error
0

username is invalid

200username is invalid
0

startTime or endTime must not be empty

200startTime or endTime must not be empty
0

query create time should not before 3 days

200query create time should not before 3 days
0

query time error

200query time error
0

endTime should not before startTime

200endTime should not before startTime
0

page size error

200page size error
0

page no error

200page no error
0

task status error,eg: init wait run success failure

200task status error,eg: init wait run success failure

入力例

JSON
XML
JSON
リクエスト例
コピー コピー完了
#!/bin/bash
username="username"
apiKey="apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/ccm/fetch/ItemIdQuery" \
-X "POST" \
-u "$username:$password" \
-H "Date:$date" \
-H "Content-Type: application/json" \
-d '{
    "startTime":"2017-05-01 00:00:00",
    "endTime":"2017-05-02 23:59:59",
    "itemId":"3ff59d129a2c40a39b9be8c9de9975d6",
    "url":"https://www.test.com/test/test.jpg",
    "status":"success",
    "pageNo":1,
    "pageSize":20
}'
レスポンス例
コピー コピー完了
HTTP/1.1 200 OK
Content-Type: charset=utf-8; charset=UTF-8
x-cnc-request-id: 23f9abf8-1f4a-498c_1493668625478
Server: xxx
Content-Length: 1355
{
   "count": 282,
   "Code": 1,
   "message":"success",
   "pageNo": 1,
   "pageSize": 20,
   "resultDetail": [
                    {
                    "beginTime": "2017-01-11 16:17:03",
                    "createTime": "2017-01-11 16:17:03",
                    "finishTime": "2017-01-11 16:17:04",
                    "rate": "100",
                    "status": "success",
                    "url": "http: //vodtest.lxdns.com/testdsfsdf1"
                    },
                    {
                    "beginTime": "2017-01-11 16:17:03",
                    "createTime": "2017-01-11 16:17:03",
                    "finishTime": "2017-01-11 16:17:04",
                    "rate": "100",
                    "status": "success",
                    "url": "https://vodtest.lxdns.com/testdsfsdf1"
                    }
                   ]
}