Queries desktops
Function
Queries desktop VMs.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/desktops
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
user_name |
No |
Array of strings |
User to whom the desktop belongs. |
computer_name |
No |
String |
Desktop name. |
desktop_ip |
No |
String |
Desktop IP address. |
offset |
No |
Integer |
Start position for pagination query. The value starts from 0. |
limit |
No |
Integer |
Pagination query. The value ranges from 0 to 1000 and defaults to 1000. |
pool_id |
No |
String |
Desktop pool ID. Use commas (,) to separate multiple desktop pool IDs. |
enterprise_project_id |
No |
String |
Enterprise project ID. |
desktop_type |
No |
String |
Desktop type. If this parameter is left empty, all desktops are queried. Use commas (,) to separate multiple types.
|
is_share_desktop |
No |
Boolean |
Whether the desktop is a collaborative desktop. |
subnet_id |
No |
String |
Subnet ID of the desktop. |
status |
No |
String |
Desktop running status. |
desktop_id |
No |
Array of strings |
Desktop ID. Up to 100 desktop IDs can be queried. |
tag |
No |
String |
Desktop tag. Examples:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
No |
String |
MIME type of the request body. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Total number of desktops. |
desktops |
Array of SimpleDesktopInfo objects |
Desktop information. |
Parameter |
Type |
Description |
---|---|---|
domain_id |
String |
Domain ID. |
project_id |
String |
Project ID. |
desktop_id |
String |
Desktop ID. |
computer_name |
String |
Computer name. |
os_host_name |
String |
Computer name in the OS. |
created |
String |
Creation time. |
ip_address |
String |
Desktop IP address. |
user_name |
String |
Username. |
attach_user_infos |
Array of AttachInstancesUserInfo objects |
List of users to whom desktops have been assigned. |
user_group |
String |
Permission group. |
sid |
String |
SID of the desktop. |
ou_name |
String |
OU name. |
enterprise_project_id |
String |
Enterprise project ID. |
tags |
Array of Tag objects |
Tag list. |
in_maintenance_mode |
Boolean |
In administrator maintenance mode or not. |
share_resource_sku |
String |
Desktop collaboration resource SKU code. |
desktop_type |
String |
Desktop type. |
subnet_id |
String |
Subnet ID of the desktop. |
bill_resource_id |
String |
Billing resource ID of the desktop. |
status |
String |
Desktop running status. |
task_status |
String |
Task status of the desktop. |
Parameter |
Type |
Description |
---|---|---|
user_id |
String |
If type is set to USER, enter the user ID. If type is set to GROUP, enter the user group ID. The backend service checks whether the group ID exists. |
user_name |
String |
Name of the object assigned with a desktop. If type is set to USER, enter the username. If type is set to GROUP, enter the user group name.
|
user_group |
String |
Specifies the user group to which the desktop user belongs.
|
type |
String |
Object type. Options:
|
Parameter |
Type |
Description |
---|---|---|
key |
String |
Specifies the tag key. This parameter cannot be left blank and can contain a maximum of 128 Unicode characters. The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). The value cannot contain the following characters: =*<>,|/. |
value |
String |
Value of a tag, which can contain a maximum of 43 Unicode characters. The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). The value cannot contain the following characters: =*<>,|/. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, which is returned upon failure. |
error_msg |
String |
Error description. |
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 description. |
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 description. |
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 description. |
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 description. |
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/desktops
Example Responses
Status code: 200
Response to the request for querying cloud desktops.
{ "total_count" : 2, "desktops" : [ { "desktop_id" : "a6f6e2d1-cc62-46f3-865b-9ae6ae0afde0", "computer_name" : "ZRYUAN107", "created" : "2022-02-23 04:02:07", "ip_address" : "10.0.9.25", "user_name" : "zryuan1", "user_group" : "administrators", "sid" : "3db90102-d11d-4d13-9a96-104696d3c6a3", "in_maintenance_mode" : false, "share_resource_sku" : "workspace.collaborativedesktop.6party.standard" }, { "desktop_id" : "248077ea-bb64-4e58-b5e8-6b686600920e", "computer_name" : "CHENYC01", "created" : "2022-02-22 12:14:59", "ip_address" : "10.0.9.103", "user_name" : "chenyc", "user_group" : "administrators", "sid" : "352cf09d-ee15-4ef1-aa49-8d673972b4e6", "in_maintenance_mode" : true, "share_resource_sku" : "workspace.collaborativedesktop.6party.standard" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to the request for querying cloud desktops. |
400 |
The request cannot be understood by the server due to malformed syntax. |
401 |
Authentication failed. |
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. |
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