Help Center/ Workspace/ API Reference/ Workspace APIs/ Workspace host/ Exporting the Workspace Host List
Updated on 2026-07-24 GMT+08:00

Exporting the Workspace Host List

Function

Exporting Details About the Workspace Host List

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:export

    List

    wdh *

    -

    -

    -

    -

    g:EnterpriseProjectId

URI

GET /v2/{project_id}/hosts/export

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

No

String

Workspace host name.

availability_zone

No

String

Workspace host region.

host_id

No

String

Workspace host ID.

enterprise_project_id

No

String

Enterprise project ID.

host_type

No

String

Type.

host_type_name

No

String

Name of the Workspace host type.

state

No

String

Workspace host status. The value can be available, fault, or released.

limit

No

Integer

Number of records displayed on each page.

offset

No

Integer

Where the pagination query starts. The value starts from 0.

marker

No

String

ID of the last record on the previous page. This parameter does not take effect when it is used together with offset.

changes_since

No

String

Filters dedicated hosts whose status changes after a specified time.

The date and timestamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm.

If the hh:mm value is included, the time zone is returned as the UTC offset, for example, 2015-08-27T09:49:58-05:00. If you omit the time zone, the UTC time zone is assumed.

sort_field

No

String

Sorting field, which must be used together with sort_type.

  • instance_total: total number of instances on Workspace computers.

  • available_vcpus: number of available vCPU cores on Workspace computers.

  • available_memory: available memory size on Workspace computers.

sort_type

No

String

Sorting type, which defaults to ascending order. This parameter must be used together with sort_field.

  • ASC: ascending order.

  • DESC: descending order.

language

Yes

String

Language.

  • zh_CN: Chinese.

  • en_US: English.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

task_id

String

Task ID.

Status code: 400

Table 4 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 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: 403

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: 404

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: 500

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.

Example Requests

/v2/9c53a566cb3443ab910cf0daebca90c4/hosts?state=available

Example Responses

Status code: 200

Task ID returned.

{
  "task_id" : "string"
}

Status Codes

Status Code

Description

200

Task ID returned.

400

The request cannot be understood by the server due to malformed syntax.

401

Authorization failed.

403

No permissions.

404

Resource not found.

500

Internal server error.

Error Codes

See Error Codes.