Help Center/ Workspace/ API Reference/ Workspace APIs/ Desktop/ Checking Whether Desktops Are Added to a Domain in Batches
Updated on 2026-07-24 GMT+08:00

Checking Whether Desktops Are Added to a Domain in Batches

Function

Checks whether desktops can be added to an AD domain again in batches.

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

    Write

    desktop *

    • g:ResourceTag/<tag-key>

    • g:EnterpriseProjectId

    -

    -

URI

POST /v2/{project_id}/desktops/batch-rejoin-domain/check

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 list.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total_count

Integer

Total quantity.

desktops

Array of BatchCheckRejoinDomainResult objects

Check result list.

Table 4 BatchCheckRejoinDomainResult

Parameter

Type

Description

desktop_id

String

Desktop ID.

desktop_name

String

Desktop name.

image_name

String

Image name.

domain_status

Integer

Domain joining status. |-

1: normal.

2: out-of-domain.

3: not reported.

rejoin_able

Boolean

Whether the desktop can be added to the domain.

product

ProductInfo object

Product information.

error_code

String

Error code.

error_msg

String

Error information.

Table 5 ProductInfo

Parameter

Type

Description

product_id

String

Product ID.

flavor_id

String

Specifications ID.

type

String

Product type.

  • BASE: basic product package. OS is the only commercial software product in the package. Only this type of package can be used for private images.

cpu

String

CPU.

memory

String

Memory.

descriptions

String

Product description.

charge_mode

String

Billing type of the package. 1 indicates yearly/monthly billing, and 0 indicates pay-per-use billing.

architecture

String

Product architecture.

is_gpu

Boolean

Whether the specifications are of the GPU type.

package_type

String

Package type.

  • ultimate: ultimate edition

  • enterprise: enterprise edition

  • general: general office edition

  • workstation: cloud workstation edition

  • dedicated: dedicated edition

  • solver: solver edition

  • agile: agile office edition

system_disk_type

String

System disk type.

system_disk_size

String

System disk size.

contain_data_disk

Boolean

Whether data disks are included in the package billing. off indicates no.

resource_type

String

Resource type.

cloud_service_type

String

Cloud service type.

volume_product_type

String

Disk type.

status

String

The status can be normal (by default, on sale), sellout (sold out), and abandon (unavailable).

Status code: 400

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

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

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

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.

Status code: 409

Table 10 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 11 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-rejoin-domain/check

{
  "desktop_ids" : [ "acbxxx0695-4b5c-a9a2-8xxxxd7f4998", "acbxxx0695-4b5c-a9a2-8xxxxd7f4999" ]
}

Example Responses

Status code: 200

Normal.

{
  "total_count" : 100,
  "desktops" : [ {
    "desktop_id" : "acbxxx0695-4b5c-a9a2-8xxxxd7f4999",
    "desktop_name" : "test-desktop2",
    "image_name" : "test-image2",
    "domain_status" : 2,
    "rejoin_able" : true,
    "error_code" : "XXXX",
    "error_msg" : "xxxx"
  } ]
}

Status Codes

Status Code

Description

200

Normal.

400

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

401

Authorization failed.

403

No permissions.

404

Resource not found.

409

Operation conflict.

500

An internal service error occurred. For details, see the error code description.

Error Codes

See Error Codes.