Help Center/ Workspace/ API Reference/ Workspace APIs/ Desktop/ Querying Desktop Networks in Batches
Updated on 2026-02-10 GMT+08:00

Querying Desktop Networks in Batches

Function

Queries desktop VPCs, subnets, private IP addresses, EIPs, and security groups.

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

    List

    desktop *

    -

    -

    • vpc:vpcs:get
    • vpc:subnets:get
    • vpc:networks:get
    • vpc:ports:get
    • vpc:securityGroups:get
    • eip:publicIps:list

URI

GET /v2/{project_id}/desktops/networks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

desktop_ids

No

Array of strings

Desktop IDs. The value ranges from 1 to 100.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

networks

Array of DesktopNetworkResult objects

Desktop network information list.

Table 4 DesktopNetworkResult

Parameter

Type

Description

computer_name

String

Desktop name.

computer_id

String

Desktop ID.

computer_ip

String

Desktop IP address.

network_infos

Array of NetworkInfo objects

Desktop network information.

Table 5 NetworkInfo

Parameter

Type

Description

vpc_info

Vpc object

VPC information.

subnet_info

DesktopSubnet object

Subnet information.

port_info

Port object

Private IP address information.

public_ip_info

PublicIp object

EIP information.

security_groups

Array of SecurityGroupInfo objects

Security groups bound to the desktop.

Table 6 Vpc

Parameter

Type

Description

id

String

ID of the VPC where the desktop is located.

name

String

Name of the VPC where the desktop is located.

cidr

String

VPC CIDR block where the desktop is located.

Table 7 DesktopSubnet

Parameter

Type

Description

id

String

ID of the subnet where the desktop is located.

name

String

Name of the subnet where the desktop is located.

cidr

String

Subnet CIDR block where the desktop is located.

Table 8 Port

Parameter

Type

Description

id

String

Unique ID of the private IP address.

ip_address

String

Private IP address.

Table 9 PublicIp

Parameter

Type

Description

id

String

Unique ID of the EIP.

public_ip_address

String

EIP.

Table 10 SecurityGroupInfo

Parameter

Type

Description

id

String

Security group ID.

name

String

Security group name.

Status code: 400

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.

Status code: 401

Table 12 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 13 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 14 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 15 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 16 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

Normal.

{
  "networks" : [ {
    "computer_name" : "string",
    "computer_id" : "string",
    "computer_ip" : "string",
    "network_infos" : [ {
      "vpc_info" : {
        "id" : "string",
        "name" : "string",
        "cidr" : "string"
      },
      "subnet_info" : {
        "id" : "string",
        "name" : "string",
        "cidr" : "string"
      },
      "port_info" : {
        "id" : "string",
        "ip_address" : "string"
      },
      "public_ip_info" : {
        "id" : "string",
        "public_ip_address" : "string"
      },
      "security_groups" : [ {
        "id" : "string",
        "name" : "string"
      } ]
    } ]
  } ]
}

Status Codes

Status Code

Description

200

Normal.

400

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

401

Authentication failed.

403

No operation permissions.

404

No resources found.

409

Operation conflict.

500

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

Error Codes

See Error Codes.