Help Center/ Workspace/ API Reference/ Workspace APIs/ Desktops/ Adjusting the Desktop Ownership
Updated on 2026-11-20 GMT+08:00

Adjusting the Desktop Ownership

Function

Adjusts the desktop ownership.

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

    Write

    desktop *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    -

    workspace:availabilityZones:get

URI

POST /v2/{project_id}/desktops/batch-move

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

desktop_ids

Yes

Array of strings

Desktop ID array. A maximum of 100 desktop IDs are supported.

target_pool_id

Yes

String

ID of the target desktop pool, which must be a static pool.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Asynchronous task ID.

failed_desktops

Array of FailedDesktop objects

List of desktops that fail to be verified.

Table 4 FailedDesktop

Parameter

Type

Description

desktop_id

String

Desktop ID.

desktop_name

String

Desktop name.

error_code

String

Error code.

error_msg

String

Error message.

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

POST /v2/29dfe82ada564ac2b927e1ff036d9a9b/desktops/batch-move

{
  "desktop_ids" : [ "xxxx3bc6-1512-4386-81fb-20604fe6xxxx", "yyyy4bc6-1512-4386-81fb-20604fe6yyyy" ],
  "target_pool_id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Example Responses

Status code: 200

{
  "job_id" : "3979904c-7beb-4f34-835f-2fa989a5550a"
}

Status Codes

Status Code

Description

200

Desktop migration response.

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error. For details, see the error code description.

Error Codes

See Error Codes.