Listing Desktops of a Version
Function
Lists desktops by agent version, OS type, desktop name, and username. The query supports pagination.
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:listByVersion
List
desktop *
-
-
-
URI
GET /v2/{project_id}/desktops/list-by-version
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| agent_version | Yes | String | Desktop agent version (exact match). |
| os_type | Yes | String | Desktop OS type. |
| desktop_id | No | String | Desktop ID. |
| desktop_name | No | String | Desktop name (fuzzy match is supported). |
| username | No | String | Username (fuzzy match is supported). |
| offset | No | Integer | Where the pagination query starts. The value starts from 0. |
| limit | No | Integer | Number of records on each page. The default value is 10, and the maximum value is 100. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| desktops | Array of DesktopVersionInfo objects | Application object list. |
| total_count | Integer | Total quantity. |
| Parameter | Type | Description |
|---|---|---|
| desktop_id | String | Desktop ID. |
| sid | String | Desktop SID. |
| desktop_name | String | Desktop name. |
| username | String | Username. |
| status | String | Desktop status. |
| task_status | String | Status of the desktop task. |
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: 401
| 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. |
Example Requests
None
Example Responses
Status code: 200
List of application objects of the upgrade task.
{
"desktops" : [ {
"desktop_id" : "desktop-id-001",
"sid" : "desktop-001",
"desktop_name" : "Office-Desktop-01",
"username" : "user01",
"status" : "ACTIVE",
"task_status" : ""
}, {
"desktop_id" : "desktop-id-002",
"sid" : "desktop-001",
"desktop_name" : "Office-Desktop-02",
"username" : "user02",
"status" : "ACTIVE",
"task_status" : ""
} ],
"total_count" : 2
} Status Codes
| Status Code | Description |
|---|---|
| 200 | List of application objects of the upgrade task. |
| 400 | The request cannot be understood by the server due to malformed syntax. |
| 401 | Authorization failed. |
| 403 | No permissions. |
| 404 | Resource not found. |
| 500 | An internal service error occurred. For details, see the error code description. |
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