• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Desktops
  5. Querying the Desktop List

Querying the Desktop List

Function

This interface is used to query the desktop list of the users.

URI

  • URI format

    GET /v1.0/{project_id}/desktops

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

The following table lists the optional parameters for querying the desktop list.

Parameter

Mandatory

Type

Description

status

No

string

Specifies the desktop status. The value can be ACTIVESHUTOFF, or ERROR.

desktop_ip

No

string

Specifies the desktop IP address.

user_name

No

string

Specifies the desktop users.

computer_name

No

string

Specifies the computer name, which can be viewed on the OS information page.

marker

No

string

Starts from the next record of the desktop ID specified by marker during query by page.

limit

No

integer

Specifies the limits on the number of desktops that will be returned during query by page. If this parameter is not specified, all desktops that meet the search criteria are returned.

Request

  • Request example
GET /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/desktops?limit=10&status=ACTIVE

Response

  • Description

    Name

    Type

    Description

    desktops

    List data structure [1]

    Specifies the desktop information list.

[1] desktops field data structure description

Name

Type

Description

desktop_id

string

Specifies the desktop ID.

computer_name

string

Specifies the computer name, which can be viewed on the OS information page.

created

string

Specifies the time when the desktop is created. The format is 2016-08-20T21:11:09.000Z.

NOTE:

The time is in the Coordinated Universal Time (UTC) format.

ip_address

string

Specifies the desktop IP address (IP address of a user).

user_name

string

Specifies the desktop users.

user_group

string

Specifies the group to which a desktop user belongs.

ADMINISTRATORS: administrator group. Administrators have complete access to the desktop and can make any desired changes except for forbidden operations.

USERS: user group. Users in this group can use most software and change system settings that do not affect other users.

  • Response example
    { 
      "desktops": [ 
       { 
        "desktop_id": "f41fb23a-376e-475d-bcaa-8e9f827aad62", 
        "computer_name": "hyqdesk101", 
        "created": "2016-10-08T06:44:57.000Z", 
        "ip_address": "192.168.0.139", 
        "user_name": "hyqdesk1",
        "user_group": "USERS" 
       }, 
       { 
        "desktop_id": "b94a88e9-b67d-40d3-a3be-d207826ffdf2", 
        "computer_name": "huangyq301", 
        "created": "2016-10-06T11:39:22.000Z", 
        "ip_address": "192.168.0.34", 
        "user_name": "huangyq3",
        "user_group": "ADMINISTRATORS" 
       } 
      ] 
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The request syntax is incorrect and cannot be understood by the server.

    401 Unauthorized

    Authentication fails.

    403 Forbidden

    You are not authorized to perform the operation.

    404 Not Found

    The requested resource is not found.

    405 Method Not Allowed

    The method specified in the request is not allowed.

    500 Internal Server Error

    Internal service error. For details about error codes, see Error Code Description.

    503 Service Unavailable

    The service is unavailable.