Baidu AI Cloud
中国站

百度智能云

CDN

Operation Record

This interface is used to query the purging and preloading records under the specified condition.

Method Path Action
GET /v2/cache/records Query purging and preloading records

URL parameter

Parameter Type Optional Description
type String Yes Record type, 1) purge —purge record 2) prefetch – prefetch record 3) all – all records It defaults to all.
startTime Timestamp Yes Start time of the time range queried, the default is 24 hours ahead of the endTime, UTC time. The maximum time span between endTime and startTime is 30 days.
endTime Timestamp Yes End value of the time range queried, the default is the current time, UTC time.
url String Yes Query the purging and preloading record of a url
marker String Yes The nextMarker value returned when the user recalls this interface last time is taken as the starting point of query this time.

Response body(Response Body)

Parameter Type Description
details list Details of the task submitted
isTruncated Boolean True means there are additional data in the following pages and false means the current page is the last page.
nextMarker String The domain doesn't appear when isTruncated is false. The user can access the subsequent lists by specifying the marker the next time this interface is called.

RecordStatus content

Parameter Type Description
status String in-progress|completed|failed
url String URL record
type String Record types 1) directoryPurge directory refresh 2) filePurge URL refresh 3) prefetch pre-record
createdAt Timestamp Creation time of the task, UTC time
startedAt Timestamp The time to start the execution of task, UTC time
finishedAt Timestamp End time of the task, UTC time If task is not completed, it does not return this item.
progress Int Process percentage
reason String Reasons for failed preloading tasks
operator String Operate the account

Request example

GET /v2/cache/records?type=all HTTP/1.1 
Host: cdn.baidubce.com 

Response example

HTTP/1.1 200 OK 
Content-Length: 691
Content-Type: application/json;utf-8
x-bce-request-id: 81d0b05f-5ad4-1f22-8068-d5c9de60a1d7
Server: BCE-CDN 

{ 
    "details":[ 
        { 
            "url":"http://www.example.com/test.mp4", 
            "createdAt":"2019-07-29T06:33:42Z", 
            "startedAt":"2019-07-29T06:33:42Z", 
            "type":"prefetch", 
            "finishedAt":"2019-07-29T06:33:45Z", 
            "progress":100, 
            "status":"completed", 
            "operator":"5f9c3bc8d407e8b49d310ac49096ded4" 
        }, 
        { 
            "url":"http://www.example.com/test.mp4", 
            "type":"filePurge", 
            "createdAt":"2019-07-29T06:33:35Z", 
            "progress":100, 
            "status":"failed", 
            "operator":"5f9c3bc8d407e8b49d310ac49096ded4" 
        } 
    ], 
    "isTruncated":false 
} 
Previous
Query Refresh Status
Next
Refresh Cache