• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Desktops
  5. Querying Desktop Details

Querying Desktop Details

Function

This interface is used to query desktop details.

URI

  • URI format

    GET /v1.0/{project_id}/desktops/{desktop_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

    desktop_id

    Yes

    string

    Specifies the desktop ID.

Request

  • Request example
GET /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/desktops/89738b45-8a1f-46f9-8e5d-006589b0b956

Response

  • Description

    Name

    Type

    Description

    desktop

    Dictionary data structure [1]

    Specifies the desktop details.

[1] desktop field data structure description

Name

Type

Description

desktop_id

string

Specifies the desktop ID.

computer_name

string

Specifies the computer name, which can be viewed on the OS information page.

status

string

Specifies the desktop status.

created

string

Specifies the time when the desktop is created. The format is 2016-08-20T21:11:09.000Z.

NOTE:

The time is in the UTC format.

addresses

Dictionary data structure [2]

Specifies the desktop IP address (for user's login).

flavor

Dictionary data structure [3]

Specifies the desktop specifications.

security_groups

List data structure [4]

Specifies the list of security groups to which the desktop belongs.

metadata

Dictionary data structure [5]

Specifies the metadata of the desktop.

user_name

string

Specifies the desktop users.

user_group

string

Specifies the group to which a desktop user belongs.

ADMINISTRATORS: administrator group. Administrators have complete access to the desktop and can make any desired changes except for forbidden operations.

USERS: user group. Users in this group can use most software and change system settings that do not affect other users.

login_status

string

Specifies the login status of the desktop.

  • UNREGISTER: specifies that the desktop is not registered (a desktop is automatically registered after being started up). After a desktop is shut down, it is in the unregistered state.
  • REGISTERED: specifies that the desktop is registered and is waiting for user connections.
  • CONNECTED: specifies that a user has successfully logged in to the desktop and is using the desktop.
  • DISCONNECTED: specifies that the desktop is disconnected from the client because the client window is closed or the network between the client and desktop is interrupted.

product_id

string

Specifies the product package ID.

root_volume

Dictionary data structure [8]

Specifies the desktop system disk information.

data_volumes

List data structure [9]

Specifies the desktop data disk information.

availability_zone

string

Specifies the availability zone.

license_type

string

Specifies the OS license type. Possible values are:

system: uses the license provided by the service.

byol: uses your own valid license.

os:scheduler_hints

List data structure [10]

Specifies the desktop scheduling data.

ou_name

string

Specifies the OU name.

[2] addresses field data structure description

Name

Type

Description

Virtual Private Cloud (VPC) ID

List data structure [6]

Specifies the ID of the VPC used by the desktop. The VPC name is a variable.

The value in the data structure is the list of assigned private IP addresses in the VPC.

[3] flavor field data structure description

Name

Type

Description

id

string

Specifies the ID of the desktop specifications.

links

List data structure [7]

Specifies the relevant and marked shortcut link of the desktop specifications.

[4] security_groups field data structure description

Name

Type

Description

id

string

Specifies the security group ID used by the desktop.

[5] metadata field data structure description

Name

Type

Description

__openstack_region_name

string

Specifies the name of the availability zone (AZ) where the desktop is located.

charging_mode

string

Specifies the reserved field.

image_name

string

Specifies the name of the image used to create the desktop.

metering.cloudServiceType

string

Specifies the cloud service type.

metering.image_id

string

Specifies the image ID.

metering.imagetype

string

Specifies the image type.

  • gold: public image
  • private: private image
  • market: market image

metering.resourcespeccode

string

Specifies the desktop resource code.

metering.resourcetype

string

Specifies the desktop resource type.

os_bit

string

Specifies the number of bits in the operating system. The value can be 32 or 64.

os_type

string

Specifies the operating system type: LinuxWindows, or others.

vpc_id

string

Specifies the ID of the VPC where the desktop is located.

op_svc_lockaction

string

Specifies the current operation type of the desktop:

  • 0: Being configured
  • 1: Deleting
  • 2: Modifying specifications
  • 3: Reinstalling the operating system
  • 4: Exporting
  • 5: Operating system installation failure

metering.billing

string

Specifies the reserved field.

desktop_gpu_type

string

Specifies the GPU type.

desktop_os_version

string

Specifies the OS version.

[6] VPC ID field data structure description

Name

Type

Description

addr

string

Specifies the IP address.

version

integer

Specifies the type of the IP address. The value can be 4 or 6.

  • 4: IPv4 addresses
  • 6: IPv6 addresses

OS-EXT-IPS-MAC:mac_addr

string

Specifies the MAC address. This is an extended attribute.

OS-EXT-IPS:type

string

Specifies the IP address assignment method. This is an extended attribute.

[7] links field data structure description

Name

Type

Description

rel

string

Specifies the shortcut link marker name.

href

string

Provides the shortcut link.

[8] root_volume field data structure description

Name

Type

Description

type

string

Specifies the system disk type of the desktop.

SATA: SATA disk

SSD: SSD disk

size

integer

Specifies the system disk size, expressed in GB.

[9] data_volumes field data structure description

Name

Type

Description

type

string

Specifies the data disk type of the desktop.

SATA: SATA disk

SSD: SSD disk

size

integer

Specifies the data disk size, expressed in GB.

[10] os:scheduler_hints field data structure description

Name

Type

Description

tenancy

string

Creates desktops on a dedicated or shared host.

The value of this parameter can be shared or dedicated.

dedicated_host_id

string

Specifies the desktop dedicated host ID.

  • Response example
    {  
      "desktop": {  
        "desktop_id": "b94a88e9-b67d-40d3-a3be-d207826ffdf2",  
        "computer_name": "huangyq301",  
        "status": "SHUTOFF",  
        "created": "2016-10-06T11:39:22.000Z",  
        "login_status": "UNREGISTER",  
        "user_name": "huangyq3",
        "user_group": "ADMINISTRATORS",  
        "security_groups": [  
          {  
            "id": "7293f9ba-91f4-466e-ac45-6550f46ea87e"  
          }  
        ],  
        "flavor": {  
          "id": "computev2-2",  
          "links": [  
            {  
              "rel": "bookmark",  
              "hrel": "https://compute.region.eu-de.otc-   
    tsi.de/60e0e898dc52459fb8e01cd0eca09e5a/flavors/computev2-2"  
            }  
          ]  
        },  
        "metadata": {  
          "metering.image_id": "fc14e223-84b5-48fe-90d6-853b462a1778",  
          "metering.imagetype": "private",  
          "metering.resourcespeccode": "s2.large.2",  
          "metering.cloudServiceType": "sys.service.type.ec2",  
          "image_name": "workspace-user-template-0927",  
          "metering.resourcetype": "1",  
          "os_bit": "64",  
          "vpc_id": "d8b3a219-8e0b-4435-ab47-1a8930c00037",  
          "os_type": "Windows",  
          "charging_mode": "0",
          "desktop_gpu_type": "M60-1Q(1GB)",
          "desktop_os_version": "Windows Server 2016 64bit with windows 10 experience"
        },  
        "addresses": {  
          "d8b3a219-8e0b-4435-ab47-1a8930c00037": [  
            {  
              "addr": "172.16.0.9",  
              "version": 4,  
              "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:1e:04:cb",  
              "OS-EXT-IPS:type": "fixed"  
            }
          ],  
          "bf00c6a1-2bca-4601-9a3e-597b08e9224d": [  
            {  
              "addr": "192.168.0.34",  
              "version": 4,  
              "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:c7:b7:05",  
              "OS-EXT-IPS:type": "fixed"  
            }  
          ]  
        }, 
        "product_id": "workspace.s.large.windows",
        "root_volume": { 
          "type": "SATA", 
          "size": 80 
        }, 
        "data_volumes": [ 
          { 
            "type": "SSD", 
            "size": 100
          }, 
          { 
            "type": "SATA", 
            "size": 100
          } 
        ],
        "availability_zone": "az01",
        "os:scheduler_hints": {
             "tenancy": "dedicated",
             "dedicated_host_id": "d6a3fcb5-8f1c-4bb8-86b1-997e5dccdefb"
         },
         "license_type": "system",
        "ou_name": "abc"
      }  
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The request syntax is incorrect and cannot be understood by the server.

    401 Unauthorized

    Authentication fails.

    403 Forbidden

    You are not authorized to perform the operation.

    404 Not Found

    The requested resource is not found.

    405 Method Not Allowed

    The method specified in the request is not allowed.

    500 Internal Server Error

    Internal service error. For details about error codes, see Error Code Description.

    503 Service Unavailable

    The service is unavailable.