Querying Desktops of a Workspace Host
Function
Queries desktops of a Workspace host. This API is provided for the console.
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:wdh:listDesktops
List
wdh *
-
-
-
-
g:EnterpriseProjectId
URI
GET /v2/{project_id}/hosts/{host_id}/servers
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
host_id |
Yes |
String |
Workspace host ID. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
servers |
Array of servers objects |
Computer list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Type. render-desktop indicates the rendering desktop, and wdh-desktop indicates the dedicated host desktop. |
|
created |
String |
Creation time. |
|
desktop_id |
String |
Desktop ID. |
|
computer_name |
String |
Machine name. |
|
status |
String |
Machine status. |
|
tenant_id |
String |
Tenant ID. |
|
updated |
String |
Update time. |
|
task_state |
String |
Task status. |
|
image_id |
String |
Image ID. |
|
image_name |
String |
Image name. |
|
vcpu |
Integer |
Number of vCPUs. |
|
memory |
Integer |
Memory size, in MB. |
|
ip_addresses |
Array of strings |
IP address. |
|
availability_zone |
String |
Region. |
|
process |
Integer |
Desktop task progress. The value ranges from 0 to 100, or is null. null indicates that there is no task on the desktop. The value from 0 to 100 indicates the task progress percentage. |
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: 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
Desktop list of the Workspace host, which is used to switch to the desktop details.
{
"servers" : [ {
"type" : "render-desktop",
"created" : "2012-09-07T16:56:37Z",
"desktop_id" : "05184ba3-00ba-4fbc-b7a2-03b62b884931",
"computer_name" : "new-server-test",
"status" : "ACTIVE",
"tenant_id" : "openstack",
"updated" : "2012-09-07T16:56:37Z",
"task_state" : "",
"image_id" : "1ce5800a-e487-4c1b-b264-3353a39e2b4b",
"ip_addresses" : [ "172.16.112.218", "192.168.0.215" ],
"availability_zone" : "cn-north-7c"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Desktop list of the Workspace host, which is used to switch to the desktop details. |
|
400 |
The request cannot be understood by the server due to malformed syntax. |
|
401 |
Authentication failed. |
|
404 |
No resources found. |
|
500 |
Internal server error. |
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