百度智能云

All Product Document

          CDN

          Usage Query

          Usage Query

          The interface is used to view resource packages details.

          Method Path Description
          POST /v2/package/usagelist Resource Packages Usage Query

          Request Body

          Parameters Optional Type Description
          pageNo Required uint Number of pages. The first page is represented by 1.
          pageSize Required uint Page size, whose maximum size is 3000.
          status Optional String RUNNING, CREATED, EXPIRED, INITIAL, USED_UP, and DESTROYED
          orderBy Optional String Creation time: create_time; Activation time: active_time; Expiration time: expire_time, Total capacity: capacity; and Status: status;
          order Optional String Ascending:asc; descending:desc

          Response Body

          Parameters Type Description
          totalCount uint Total number of resource packages
          pageNo uint Page No.
          pageSize uint Page size
          orderBy String Sorting Field
          order String Ascending/descending order
          result List Resources packages details

          Package :

          Parameters Type Description
          capacity BigDecimal Total capacity
          usedCapacity BigDecimal Usage
          status String Status parameter input
          packageType String Packet types such as traffic packets
          activeTime DateTime Effective time (UTC)
          expireTime DateTime Expiration time (UTC)

          Request Example

          POST /v2/package/usagelist HTTP/1.1
          Host: cdn.baidubce.com
          {"pageNo":1,"pageSize":10}

          Return Example

          HTTP/1.1 200
          Content-Length: 190
          Content-Type: application/json;utf-8
          x-bce-request-id: 81d0b05f-5ad4-1f22-8068-d5c9de60a1d7
          Server: BCE-CDN
           
          {
          "totalCount": 42,
          "pageNo": 1,
          "pageSize": 10,
          "result": [
              {
                  "capacity": 107374182400,
                  "usedCapacity": 0,
                  "activeTime": "2019-12-10T14:32:51Z",
                  "expireTime": "2020-03-10T14:32:51Z",
                  "status": "RUNNING",
                  "packageType": "OutBytes"
              },
              ....
          ],
          "orderBy": "expire_time",
          "order": "ASC"

          }

          Previous
          Log Interface
          Next
          Tool Interface