百度智能云

All Product Document

          CDN

          Query Preload Status

          Query the preload task status of specified conditions, and a maximum of 1,000 records can be returned for each request.

          Method Path Action
          GET /v2/cache/prefetch Query prefetch task

          URL parameters:

          Parameter Type Optional Description
          id String Yes Query the assigned prefetch task id
          endTime Timestamp Yes End value of the time range queried, the default is the current time, UTC time.
          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.
          url String Yes Query the prefetch request of the assigned 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

          Parameter Type Description
          details list type, PrefetchStatus content items are explained as follows:
          - status: String type, value is waiting/in-progress / completed / failed.
          - task: PrefetchTask type, indicating the task information.
          - createdAt: Timestamp type, indicating the time to create the prefetch task, UTC time.
          - startedAt: Timestamp type, indicating the time to start the prefetch task, UTC time.
          - finshedAt: Timestamp type, indicating the time to end the prefetch task, UTC time. The end may be Completed/Failed. If task is not completed, it does not return this item.
          - progress: Int type, indicating the progress percentage.
          Details of prefetch tasks submitted
          isTruncated Bool 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.

          Request example

          GET /v2/cache/prefetch?id=eJwNyMERABAMBMCKMnPicH5aiQz9l8A+l61VAFwqk9ToFrjbiBIWqbT0n76lQ3/vTArw HTTP/1.1 
          Host: cdn.baidubce.com 

          Response example

          HTTP/1.1 200 OK 
          Content-Length: 190
          Content-Type: application/json;utf-8
          x-bce-request-id: 81d0b05f-5ad4-1f22-8068-d5c9de60a1d7
          Server: BCE-CDN 
          { 
              "details": 
              [ 
                  { 
                      "status": "completed", 
                      "createdAt": "2015-08-24T12:20:32Z", 
                      "startedAt": "2015-08-24T12:20:32Z", 
                      "finishedAt": "2015-08-24T12:21:45Z", 
                      "progress": 100, 
                      "task": 
                      { 
                          "url": "http://my.domain.com/path/to/prefetch/1.data" 
                      } 
                  } 
                  { 
                      "status": "in-process", 
                      "createdAt": "2015-08-24T12:20:32Z", 
                      "startedAt": "2015-08-24T12:20:32Z", 
                      "finishedAt": "2015-08-24T12:21:49Z", 
                      "progress": 87, 
                      "task": 
                      { 
                          "url": "http://my.domain.com/path/to/prefetch/2.data" 
                      } 
                  } 
              ] 
          }
          Previous
          Preload Cache
          Next
          Query Refresh Status