Querying Details About EVS Snapshots
Function
This API is used to query details about EVS snapshots.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/snapshots/detail
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. |
volume_id |
No |
String |
The ID of the snapshot's source disk. |
availability_zone |
No |
String |
The AZ of the snapshot's source disk. |
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/detail?limit=50; Querying 51–100 snapshots: GET /v2/xxx/snapshots/detail?offset=50&limit=50 |
name |
No |
String |
The snapshot name. You can enter up to 255 characters. |
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. |
status |
No |
String |
The snapshot status. For details, see EVS Snapshot Status. |
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 SnapshotDetail 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 |
---|---|---|
id |
String |
The snapshot ID. |
name |
String |
The snapshot name. Snapshots whose names started with the autobk_snapshot_ prefix are automatically created by the system when backups are created. Such snapshots cannot be deleted or used to roll back data. |
description |
String |
The snapshot description. |
created_at |
String |
The time when the snapshot was created. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
updated_at |
String |
The time when the snapshot was updated. |
metadata |
Map<String,String> |
The snapshot metadata. |
volume_id |
String |
The ID of the snapshot's source disk. |
size |
String |
The snapshot size, in GiB. |
status |
String |
The snapshot status. For details, see EVS Snapshot Status. |
os-extended-snapshot-attributes:progress |
String |
The reserved field. |
os-extended-snapshot-attributes:project_id |
String |
The tenant ID. The tenant ID is the same as the project ID. |
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/detail
Example Responses
Status code: 200
OK
{ "snapshots": [ { "status": "available", "os-extended-snapshot-attributes:progress": "100%", "description": null, "created_at": "2013-06-19T07:15:29.000000", "metadata": {}, "volume_id": "ae11e59c-bd56-434a-a00c-04757e1c066d", "os-extended-snapshot-attributes:project_id": "d6c277ba8820452e83df36f33c9fa561", "size": 5, "id": "6cd26877-3ca3-4f4e-ae2a-38cc3d6183fa", "name": "name_xx2-snap", "updated_at": null, }, { "status": "available", "os-extended-snapshot-attributes:progress": "100%", "description": null, "created_at": "2013-06-19T09:08:08.000000", "metadata": {}, "volume_id": "ae11e59c-bd56-434a-a00c-04757e1c066d", "os-extended-snapshot-attributes:project_id": "d6c277ba8820452e83df36f33c9fa561", "size": 5, "id": "b3253e26-5c37-48dd-8bf2-8795dd1e848f", "name": "name_xx2-snap", "updated_at": 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