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
| Field | Type | Required | Description |
|---|---|---|---|
| SnapshotIds | string[] | — | List of snapshot IDs to be queried. The parameter does not support specifying both `SnapshotIds` and `Filters`. |
| Filters | Filter[] | — | 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… |
| Offset | integer | — | Offset. Default is 0. For more information on `Offset`, please see relevant sections in API Introduction. |
| Limit | integer | — | Number of results to be returned. Default is 20. Maximum is 100. For more information on `Limit`, please see relevant sections in API Introduction. |
| Order | string | — | Outputs the ordering of the cloud disk list. Value range: ASC: Ascending order DESC: Descending order. |
| OrderField | string | — | 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.
| Field | Type | Description |
|---|---|---|
| TotalCount | integer | Number of snapshots. |
| SnapshotSet | Snapshot[] | List of snapshot details. |
| RequestId | string | The 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": []
}