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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| 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. |
| sort_type | No | String | Sorting type, which defaults to ascending order. This parameter must be used together with sort_field. |
| language | Yes | String | Language. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| task_id | String | Task ID. |
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: 403
| 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
/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.
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