Querying EVS Snapshots
Function
Querying EVS Snapshots
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/snapshots
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
The project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
marker |
No |
String |
The ID of the resource from which the pagination query starts. It is the ID of the last resource on the previous page. |
offset |
No |
Integer |
The offset.
NOTE:
This parameter is used when snapshots are queried by page and is used together with the limit parameter. For example, there are a total of 30 snapshots. If you set offset to 11 and limit to 10, the query starts from the twelfth snapshot, and a maximum of 10 snapshots can be queried at a time. |
limit |
No |
Integer |
The maximum number of query results that can be returned. The value ranges from 1 to 1000, and the default value is 1000. The returned value cannot exceed this limit. 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 are provided as follows: Querying 1–50 snapshots: GET /v2/xxx/snapshots?limit=50; Querying 51–100 snapshots: GET /v2/xxx/snapshots?offset=50&limit=50 |
name |
No |
String |
The snapshot name. This parameter does not support fuzzy match. You can enter up to 255 characters. |
status |
No |
String |
The snapshot status. For details, see EVS Snapshot Status. |
volume_id |
No |
String |
The ID of the snapshot's source disk. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
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. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
snapshots_links |
Array of Link objects |
The query position marker in the snapshot list. This field is returned only when limit is specified in the request, and this field indicates that only some snapshots are returned in this query. |
snapshots |
Array of SnapshotSummary objects |
The snapshot information. |
Parameter |
Type |
Description |
---|---|---|
href |
String |
The corresponding shortcut link. |
rel |
String |
The shortcut link marker name. Default: next |
Parameter |
Type |
Description |
---|---|---|
created_at |
String |
The time when the snapshot was created. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
description |
String |
The snapshot description. |
id |
String |
The snapshot ID. |
metadata |
Map<String,String> |
The snapshot metadata. If metadata contains the __system__enableActive field, the snapshot is auto-generated snapshot created during a server backup. |
name |
String |
The snapshot name. |
size |
Integer |
The snapshot size, in GiB. |
status |
String |
The snapshot status. For details, see EVS Snapshot Status. |
updated_at |
String |
The time when the snapshot was updated. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
volume_id |
String |
The ID of the snapshot's source disk. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
The error message returned if an error occurs. |
Parameter |
Type |
Description |
---|---|---|
code |
String |
The error code returned if an error occurs. For details about error codes and their meanings, see Error Codes. |
message |
String |
The error message returned if an error occurs. |
Example Requests
GET https://{endpoint}/v2/{project_id}/snapshots
Example Responses
Status code: 200
OK
{ "snapshots" : [ { "created_at" : "2016-02-16T16:54:14.981520", "description" : null, "id" : "b836dc3d-4e10-4ea4-a34c-8f6b0460a583", "metadata" : { }, "name" : "test01", "size" : 1, "status" : "available", "volume_id" : "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at" : null }, { "created_at" : "2016-02-16T16:54:19.475397", "description" : null, "id" : "83be494d-329e-4a78-8ac5-9af900f48b95", "metadata" : { }, "name" : "test02", "size" : 1, "status" : "available", "volume_id" : "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at" : null }, { "created_at" : "2016-02-16T16:54:24.367414", "description" : null, "id" : "dd360f46-7593-4d35-8f2c-5566fd0bd79e", "metadata" : { }, "name" : "test03", "size" : 1, "status" : "available", "volume_id" : "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at" : null }, { "created_at" : "2016-02-16T16:54:29.766740", "description" : null, "id" : "4c29796a-8cf4-4482-9afc-e66da9a81240", "metadata" : { }, "name" : "test04", "size" : 1, "status" : "available", "volume_id" : "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at" : null } ], "snapshots_links" : null }
Status code: 400
Bad Request
{ "error" : { "message" : "XXXX", "code" : "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