百度智能云

All Product Document

          Cloud Compute Service

          Query the List of Snapshot Chains

          This interface is used to query the snapshot chain list information of the user.

          Request structure

          GET /v{version}/snapshot/chain HTTP/1.1 
          Host: bcc.bj.baidubce.com 
          Authorization: authorization string 

          Request header

          There are no special headers except the common header.

          Request parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number
          orderBy String No Query parameter Sequencing attribute, optional: chainId (snapshot chain id, default value), chainSize (snapshot chain size), volumeSize (disk size)
          order String No Query parameter Sequencing mode, optional: asc (positive sequence, default value), desc (reverse sequence)
          pageSize int No Query parameter Capacity per page, default value 1000
          pageNo int No Query parameter Pages, default value 1
          volumeId String No Query parameter Disk id, if the field is non-null, the snapshot chain information of the disk only is returned.

          Return header

          There are no special headers except the common header.

          Return parameter

          Parameter name Type Description
          orderBy String Sequencing attribute
          totalCount int Total number of snapshot chains
          pageSize int Capacity of this page
          pageNo int Pages
          isTruncated boolean True means there are additional data in the following pages and false means the current page is the last page.
          snapchains List<SnapchainModel> Snapshot chain information, set composed by SnapchainModel

          Error code

          Error code Error description HTTP status code Chinese explanation
          BadRequest Bad request parameters or illegal request. 400 The request parameter is invalid.
          NoSuchObject The specified object is not found or resource do not exist. 404 The resource does not exist

          Request example

          GET /v2/snapshot/chain HTTP/1.1 
          Host: bcc.bj.baidubce.com 
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de 

          Return example

          HTTP/1.1 200 OK 
          x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
          Date: Wed, 03 Dec 2014 06:42:19 GMT 
          Content-Type: application/json;charset=UTF-8 
          Server: BWS 
          
          { 
            "orderBy": "chainSize", 
            "totalCount": 11, 
            "pageSize": 2, 
            "pageNo": 1, 
            "isTruncated": true, 
            "snapchains": [ 
              { 
                "status": "active", 
                "chainSize": "20.0", 
                "chainId": "sl-IvmGOxPc", 
                "instanceId": "i-DRqFcFu8", 
                "userId": "dcc4b11a97984b62baa65d4592f4d432", 
                "volumeId": "v-IvmGOxPc", 
                "volumeSize": 40, 
                "manualSnapCount": 1, 
                "createTime": "2019-12-23T14:35:07Z", 
                "autoSnapCount": 0 
              }, 
              { 
                "status": "active", 
                "chainSize": "0.0", 
                "chainId": "sl-dqH1rplQ", 
                "instanceId": "", 
                "userId": "dcc4b11a97984b62baa65d4592f4d432", 
                "volumeId": "v-dqH1rplQ", 
                "volumeSize": 50, 
                "manualSnapCount": 1, 
                "createTime": "2019-12-23T11:02:16Z", 
                "autoSnapCount": 0 
              } 
             ] 
          }
          Previous
          Delete a Snapshot
          Next
          Query Image List