Content MGMT
File Prefetch
QueryPrefetchStatus
Prefetch
Cache Refresh

QueryPrefetchStatus

갱신 시간: 2025-04-09 16:56:59

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

  • 단일 사용자 통화 빈도: 1/5min
  • 해당 상품(제품): Content MGMT

요청 파라미터

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
Task status. The system allows you to select a task status query. These states can be queried: 1.success 2.failure
pageNoString
Request page number. The default is 1.
pageSizeString
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
The status code of the task creation result. 1 means success, 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
The status of the prefetch task. There are several states: Success: Prefetch success. Failure: Prefetch failed. Wait: The prefetch task is waiting to be processed. Run: The prefetch task is being executed.
urlString
Prefetched file URL.

에러 코드

에러 코드(code)설명(message)HTTP 상태 코드설명
1success200success
0parse json error200parse json error
0username is invalid200username is invalid
0startTime or endTime must not be empty200startTime or endTime must not be empty
0query create time should not before 3 days200query create time should not before 3 days
0query time error200query time error
0endTime should not before startTime200endTime should not before startTime
0page size error200page size error
0page no error200page no error
0task status error,eg: init wait run success failure200task 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"
                    }
                   ]
}

디렉토리

  • 요청 파라미터
  • 응답 파라미터
  • 에러 코드
  • 예제
이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.