Querying Details About All Snapshots
Function
This API is used to query details about all snapshots. Standard snapshots are available only in some regions.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v5/{project_id}/snapshots/detail
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition The project ID. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
marker |
No |
String |
Definition The ID of the resource from which the pagination query starts. It is the ID of the last resource on the previous page. Constraints N/A Range N/A Default Value N/A |
|
volume_id |
No |
String |
Definition The ID of the snapshot's source disk. You can call the Querying Details About All EVS Disks API to obtain the disk ID. Constraints N/A Range N/A Default Value N/A |
|
availability_zone |
No |
String |
Definition The AZ of the snapshot's source disk. Constraints N/A Range N/A Default Value N/A |
|
limit |
No |
String |
Definition The maximum number of query results that can be returned. If the tenant has more than 50 snapshots in total, you are advised to use this parameter and set its value to 50 to improve the query efficiency. Examples: Querying 1–50 snapshots: GET /v2/xxx/snapshots/detail?limit=50; Querying 51–100 snapshots: GET /v2/xxx/snapshots/detail?offset=50&limit=50 Constraints N/A Range The value ranges from 1 to 1000, and the default value is 1000. The returned value cannot exceed this limit. Default Value N/A |
|
name |
No |
String |
Definition The snapshot name. Constraints N/A Range It can contain a maximum of 255 characters. Default Value N/A |
|
offset |
No |
String |
Definition The offset. This parameter is used together with the limit parameter to query snapshots by page. Assume that there are 30 snapshots. If you set offset to 11 and limit to 10, the query starts from the twelfth snapshot. A maximum of 10 snapshots can be queried at a time. Constraints Must be used together with limit. Range N/A Default Value N/A |
|
status |
No |
String |
Definition The snapshot status. Constraints N/A Range For details, see EVS Snapshot Status. Default Value N/A |
|
sort_key |
No |
String |
Definition The keyword based on which the returned results are sorted. Constraints N/A Range
-size: The snapshot size, in GiB. Default Value created_at |
|
sort_dir |
No |
String |
Definition The result sorting order. The default value is desc. Constraints N/A Range Default Value desc |
|
id |
No |
String |
Definition The snapshot ID. Constraints N/A Range N/A Default Value N/A |
|
ids |
No |
String |
Definition The snapshot IDs, which are separated with commas (,). The value is in the ids=id1,id2,...,idx format. Only snapshot information corresponding to valid IDs is returned. Invalid IDs will be ignored. Constraints A maximum of 60 IDs can be specified at a time. If both id and ids are specified in the request, id will be ignored. Range N/A Default Value N/A |
|
snapshot_type |
No |
String |
Definition The snapshot creation source. Constraints N/A Range N/A Default Value N/A |
|
enterprise_project_id |
No |
String |
Definition The ID of the enterprise project to which the snapshot belongs. For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide. Constraints N/A Range N/A Default Value N/A |
|
tag_key |
No |
String |
Definition The snapshot tag key. Constraints N/A Range N/A Default Value N/A |
|
tags |
No |
String |
Definition The key-value pairs of the snapshot tags, for example, [{"key":"bbb","value":"bbb"}]. Constraints N/A Range N/A Default Value N/A |
|
snapshot_chain_id |
No |
String |
Definition The snapshot chain ID. Constraints N/A Range N/A Default Value N/A |
|
snapshot_group_id |
No |
String |
Definition The snapshot consistency group ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition The user token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
snapshots |
Array of SnapshotDetailV5 objects |
Definition The snapshot information. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition The snapshot ID. Range N/A |
|
name |
String |
Definition The snapshot name. Snapshots whose names started with the autobk_snapshot_ prefix are automatically created by the system during backup creation. Such snapshots cannot be deleted or used to roll back data. Range N/A |
|
description |
String |
Definition The snapshot description. Range N/A |
|
created_at |
String |
Definition The time when the snapshot was created. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX Range N/A |
|
updated_at |
String |
Definition The time when the snapshot was updated. Range N/A |
|
volume_id |
String |
Definition The ID of the snapshot's source disk. Range N/A |
|
size |
String |
Definition The snapshot size, in GiB. Range N/A |
|
status |
String |
Definition The snapshot status. Range For details, see EVS Snapshot Status. |
|
project_id |
String |
Definition The project ID. Range N/A |
|
enterprise_project_id |
String |
Definition The ID of the enterprise project to which the snapshot belongs. Range N/A |
|
encrypted |
Boolean |
Definition Whether the snapshot is encrypted. Range N/A |
|
cmk_id |
String |
Definition The ID of the encryption key used by the snapshot's source disk. Range N/A |
|
category |
String |
Definition The snapshot type. Range standard or flash |
|
availability_zone |
String |
Definition The AZ to which the snapshot belongs. Range N/A |
|
tags |
Map<String,String> |
Definition The snapshot tags. Range N/A |
|
instant_access |
Boolean |
Definition Whether Instant Snapshot Restore is enabled. Range true: enabled. Only SSD-backed disks support this function. false: disabled. Snapshots with Instant Snapshot Restore disabled are standard snapshots. |
|
retention_at |
String |
Definition The snapshot retention duration. Range N/A |
|
instant_access_retention_at |
String |
Definition The retention duration of Instant Snapshot Restore. After the retention duration ends, Instant Snapshot Restore is automatically disabled for snapshots. Range By default, the value of this parameter is the same as that of retention_at. |
|
incremental |
Boolean |
Definition Whether the snapshot is an incremental snapshot. Range true or false |
|
snapshot_type |
String |
Definition The snapshot creation source. Range auto: automatically created user: manually created copy: replicated |
|
progress |
String |
Definition The snapshot creation progress, in percentage. Range N/A |
|
encrypt_algorithm |
String |
Definition The snapshot encryption algorithm. Range N/A |
|
snapshot_chains |
Array of SnapshotChains objects |
Definition The snapshot chain to which the snapshot belongs. Range N/A |
|
snapshot_group_id |
String |
Definition The ID of the snapshot consistency group to which the snapshot belongs. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition The snapshot chain ID. Range N/A |
|
availability_zone |
String |
Definition The AZ of the disk that the snapshot chain belongs to. Range N/A |
|
snapshot_count |
Integer |
Definition The number of snapshots on the snapshot chain. Range ≥ 0 |
|
capacity |
Integer |
Definition The snapshot chain storage usage. Range The value is greater than or equal to 0. |
|
project_id |
String |
Definition The project ID. Range N/A |
|
volume_id |
String |
Definition The ID of the disk that the snapshot chain belongs to. Range N/A |
|
category |
String |
Definition The snapshot chain type. Range The value can be standard or standard_copy. |
|
created_at |
String |
Definition The creation time. Range N/A |
|
updated_at |
String |
Definition The update time. Range N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Definition The error information returned if an error occurs. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition The error code returned if an error occurs. Range For details about the error code, see Error Codes. |
|
message |
String |
Definition The error message returned if an error occurs. Range N/A |
Example Requests
GET https://{endpoint}/v5/{project_id}/snapshots/detail
Example Responses
Status code: 200
OK
{
"snapshots" : [ {
"status" : "available",
"description" : null,
"created_at" : "2013-06-19T07:15:29.000000",
"volume_id" : "ae11e59c-bd56-434a-a00c-04757e1c066d",
"size" : 5,
"id" : "6cd26877-3ca3-4f4e-ae2a-38cc3d6183fa",
"name" : "name_xx2-snap",
"updated_at" : null,
"category" : "flash",
"enterprise_project_id" : "0",
"encrypted" : false,
"availability_zone" : "az1.dc1",
"tags" : { }
}, {
"status" : "available",
"description" : null,
"created_at" : "2013-06-19T09:08:08.000000",
"volume_id" : "ae11e59c-bd56-434a-a00c-04757e1c066d",
"size" : 5,
"id" : "b3253e26-5c37-48dd-8bf2-8795dd1e848f",
"name" : "name_xx2-snap",
"updated_at" : null,
"category" : "flash",
"enterprise_project_id" : "0",
"encrypted" : false,
"availability_zone" : "az1.dc1",
"tags" : { }
} ]
}
Status code: 400
Bad Request
{
"error" : {
"message" : "XXXX",
"code" : "EVS.XXX"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot