cbs — Cloud Block Storage
cbs · 2017-03-12

DescribeSnapshots

POST

Query the details of snapshots.

Wire call

Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /cbs/DescribeSnapshots path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.

curl
curl -sS https://cbs.api3.convergecloud.com/ \
  -H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/cbs/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Host: cbs.api3.convergecloud.com' \
  -H 'X-TC-Action: DescribeSnapshots' \
  -H 'X-TC-Version: 2017-03-12' \
  -H 'X-TC-Timestamp: <unix-seconds>' \
  -H 'X-TC-Region: luzon' \
  -d '{"Limit":20,"Offset":0}'

Request parameters

FieldTypeRequiredDescription
SnapshotIdsstring[]—List of snapshot IDs to be queried. The parameter does not support specifying both `SnapshotIds` and `Filters`.
FiltersFilter[]—Filters. It cannot be specified together with `SnapshotIds`. snapshot-id - Array of String - Optional - Filters by snapshot ID, such as `snap-11112222`. snapshot-name - Array of String - Optional - Filters by snapshot name. snapshot-state - Array of String - Optional - Filters by snapshot state (NORMAL: normal | CREATING: creating | ROLLBACKING: rolling back). disk-usage - Array of String - Opt…
Offsetinteger—Offset. Default is 0. For more information on `Offset`, please see relevant sections in API Introduction.
Limitinteger—Number of results to be returned. Default is 20. Maximum is 100. For more information on `Limit`, please see relevant sections in API Introduction.
Orderstring—Outputs the ordering of the cloud disk list. Value range: ASC: Ascending order DESC: Descending order.
OrderFieldstring—The field by which the snapshot list is sorted. Value range: CREATE_TIME: sorted by the creation time of the snapshots By default, the snapshot list is sorted by the creation time of snapshots.

Response

Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.

FieldTypeDescription
TotalCountintegerNumber of snapshots.
SnapshotSetSnapshot[]List of snapshot details.
RequestIdstringThe unique request ID, which is returned for each request. RequestId is required for locating a problem.
Success
{
  "Response": {
    "TotalCount": …,
    "SnapshotSet": …,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/cbs.
Request bodyvalid JSONPOST cbs.api3.convergecloud.com · DescribeSnapshots
Read-only. Creates nothing.
Recorded example response
{
  "TotalCount": 0,
  "RequestId": "674a94ba-7f1c-06c0-2659-f09cc0fbcc37",
  "SnapshotSet": []
}