Help Center/ Workspace/ API Reference/ Workspace APIs/ Desktop/ Listing Desktops of a Version
Updated on 2026-07-24 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

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

Table 3 Response body parameters

Parameter

Type

Description

desktops

Array of DesktopVersionInfo objects

Application object list.

total_count

Integer

Total quantity.

Table 4 DesktopVersionInfo

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

Table 5 Response body parameters

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

Table 6 Response body parameters

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

Table 7 Response body parameters

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

Table 8 Response body parameters

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

Table 9 Response body parameters

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.