Querying Snapshots
Function
Queries snapshots.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
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, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:desktops:listSnapshots
List
-
-
-
-
URI
GET /v2/{project_id}/snapshots
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
desktop_id |
No |
String |
Desktop ID. |
|
desktop_ids |
No |
Array of strings |
List of desktop IDs. |
|
desktop_name |
No |
String |
Desktop name. |
|
desktop_names |
No |
Array of strings |
List of desktop names. |
|
snapshot_name |
No |
String |
Snapshot name. |
|
snapshot_names |
No |
Array of strings |
List of snapshot names. |
|
disk_type |
No |
String |
Snapshot type: |
|
create_type |
No |
String |
Snapshot creation method: |
|
status |
No |
String |
Snapshot status: |
|
sort_field |
No |
String |
Sorting field, which must be used together with sort_type. |
|
sort_type |
No |
String |
Sorting type, which defaults to ascending order. This parameter must be used together with sort_field. |
|
offset |
No |
Integer |
Where the pagination query starts. The value starts from 0. |
|
limit |
No |
Integer |
Used for pagination query. The value ranges from 1 to 1,000 (default). |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
desktop_snapshots |
Array of DesktopSnapshotDetailInfo objects |
Desktop snapshot detail list. |
|
total_count |
Integer |
Total number of desktop snapshots. |
|
Parameter |
Type |
Description |
|---|---|---|
|
snapshot_id |
String |
Desktop snapshot ID. |
|
snapshot_name |
String |
Desktop snapshot record name. |
|
desktop_id |
String |
ID of the desktop corresponding to the snapshot. |
|
desktop_name |
String |
Name of the desktop corresponding to the snapshot. |
|
desktop_sid |
String |
SID of the desktop corresponding to the snapshot. |
|
desktop_pool_id |
String |
ID of the desktop pool corresponding to the snapshot. |
|
is_system_disk |
Boolean |
Disk type corresponding to the snapshot. The value true indicates the system disk, and the value false indicates the data disk. |
|
status |
String |
Snapshot status: |
|
process |
Integer |
Snapshot task progress. The value ranges from 0 to 100, or is null. null indicates that there is no task on the snapshot. The value from 0 to 100 indicates the task progress percentage. |
|
description |
String |
Snapshot description. |
|
create_time |
String |
Snapshot creation time (UTC time, yyyy-MM-dd'T'HH:mm:ss'Z).' |
|
create_type |
String |
Snapshot creation method: |
|
last_restore_time |
String |
Latest snapshot restoration time (UTC time, yyyy-MM-dd'T'HH:mm:ss'Z). ' |
|
restore_fail_reason |
String |
Snapshot restoration failure cause. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: default
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Example Requests
/v2/bcae3e673fd04716a3b9dacdf58ca336/snapshots
Example Responses
Status code: 200
OK.
{
"total_count" : 2,
"desktop_snapshots" : [ {
"snapshot_id" : "eed156d9-02a5-46f5-8eb1-54f09ab9fbae",
"snapshot_name" : "sys0420_xzx03_1713602176593",
"desktop_id" : "7163a7ba-fc09-4238-ab73-0689ea7f54c3",
"desktop_name" : "xzx03",
"desktop_sid" : "22ad6780-3236-4838-b509-8068d254e9de",
"is_system_disk" : true,
"status" : "create_success",
"description" : "Description.",
"create_time" : "2024-04-20T08:36:16Z",
"create_type" : "MANUALLY"
}, {
"snapshot_id" : "a7e996da-20db-4de8-8aff-4c8e4c6d5ed3",
"snapshot_name" : "AUTOCREATED_AA_1713595811910",
"desktop_id" : "a3e8d0d0-79df-413d-a327-d702a4fb2e15",
"desktop_name" : "AA",
"desktop_sid" : "1346b13d-d3e4-4965-bfb4-5bb880bf7dbf",
"is_system_disk" : false,
"status" : "create_success",
"description" : "Description.",
"create_time" : "2024-04-20T06:50:11Z",
"create_type" : "AUTO"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK. |
|
400 |
The request cannot be understood by the server due to malformed syntax. |
|
403 |
No operation permissions. |
|
404 |
No resources found. |
|
500 |
An internal service error occurred. For details about the error code, see the error code description. |
|
default |
Default response to a failure. |
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