Querying Details of a Cloud Phone

Function Description

  • API Name

    GetCloudPhoneDetail

  • Function

    Query details of a cloud phone.

URI

GET /v1/{project_id}/cloud-phone/phones/{phone_id}

For details, see Table 1.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

phone_id

Yes

String

Specifies the unique identifier of the cloud phone. You can obtain it by referring to Querying the Cloud Phones.

Request

  • Request parameters

    None

  • Example request
    1
    GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/1564567b8bab40f34711234cb80d8574
    

Response

  • Parameter description

    Parameter

    Type

    Description

    request_id

    String

    Specifies the unique identifier of the cloud phone. The value can contain a maximum of 32 bytes.

    server_id

    String

    Specifies the cloud phone server ID. The value can contain a maximum of 32 bytes.

    phone_name

    String

    Specifies the cloud phone name. The value can contain a maximum of 65 bytes.

    phone_id

    String

    Specifies the unique identifier of the cloud phone. The value can contain a maximum of 32 bytes.

    image_id

    String

    Specifies the cloud phone image ID. The value can contain a maximum of 32 bytes.

    vnc_enable

    String

    Specifies whether to enable VNC login on a cloud phone.

    • true: enable
    • false: disable

    phone_model_name

    String

    Specifies the cloud phone flavor. The value can contain a maximum of 64 bytes.

    For details, see Cloud Phone Flavor List.

    property

    jsonString

    Specifies the cloud phone attribute character string. The value can contain a maximum of 2048 bytes.

    For details, see Cloud Phone Attribute List.

    access_infos

    Array of objects

    Specifies the cloud phone access information.

    For details, see Table 2.

    status

    Integer

    Specifies the cloud phone status.

    • 0 and 1: Creating
    • 2: Running
    • 3: Resetting
    • 4: Restarting
    • 6: Frozen
    • 7: Stopping
    • 8: Stopped
    • -5: Reset failed
    • -6: Restart failed
    • -7: Abnormal
    • -8: Creation failed
    • -9: Stopping failed

    type

    Integer

    Specifies the cloud phone type.

    • 0: common cloud phone
    • 1: trial cloud phone

    metadata

    Object

    Specifies the order and product information. For details, see Table 3.

    create_time

    String

    Specifies the time when the cloud phone is created.

    The time format is UTC, YYYY-MM-DDTHH:MM:SSZ.

    update_time

    String

    Specifies the time when the cloud phone is updated.

    The time format is UTC, YYYY-MM-DDTHH:MM:SSZ.

    Table 2 access_info field description

    Parameter

    Type

    Description

    phone_ip (new)

    String

    Specifies the cloud phone IP address.

    server_ip (new)

    String

    Specifies the internal IP address of the cloud phone server.

    public_ip (new)

    String

    Specifies the public IP address of the cloud phone server.

    listen_port

    Integer

    Specifies the listening port of the cloud phone.

    access_port

    Integer

    Specifies the access port of Cloud Phone mapped to the public network.

    type

    String

    Specifies the user-defined port type. The value can contain a maximum of 16 bytes.

    device_ip (expired)

    String

    Specifies the cloud phone IP address.

    intranet_ip (expired)

    String

    Specifies the internal IP address of the cloud phone server.

    access_ip (expired)

    String

    Specifies the public IP address of the cloud phone server.

    The functions of new parameters are the same as those of expired parameters.

    Table 3 metadata field description

    Parameter

    Type

    Description

    order_id

    String

    Specifies the order ID. The value can contain a maximum of 64 bytes.

    product_id

    String

    Specifies the product ID. The value can contain a maximum of 64 bytes.

    probation_begin_time

    String

    Specifies the cloud phone trial start time.

    The time format is UTC, YYYY-MM-DDTHH:MM:SSZ.

    probation_end_time

    String

    Specifies the cloud phone trial end time.

    The time format is UTC, YYYY-MM-DDTHH:MM:SSZ.

  • Example response
    {
        "request_id": "70bb40bef50e4a14b116a5a527fd7432",
        "phone_name": "mobile-0049",
        "server_id": "88b8449b896f3a4f0ad57222dd91909",
        "phone_id": "1564567b8bab40f34711234cb80d8574",
        "image_id" : "88b8449b896f3a4f0ad57222dd91909",
        "vnc_enable": "true",
        "phone_model_name": "aphs1.large.2.aosp",
        "status": 2,
        "access_infos": [
            {
                "type": "server1",
                "device_ip": "10.237.0.61",
                "phone_ip": "10.237.0.61",
                "listen_port": 38080,
                "access_ip": "213.32.43.210",
                "public_ip": "213.32.43.210",
                "intranet_ip": "172.31.0.123",
                "server_ip": "172.31.0.123",
                "access_port": 14308
            },
            {
                "type": "server2",
                "device_ip": "10.237.0.61",
                "phone_ip": "10.237.0.61",
                "listen_port": 38081,
                "access_ip": "213.32.43.210",
                "public_ip": "213.32.43.210",
                "intranet_ip": "172.31.0.123",
                "server_ip": "172.31.0.123",
                "access_port": 14328
            }
        ],
        "property" : "{\"phone_num\":\"13666666666\",\"imsi\":\"460021624617113\",\"iccid\":\"42947a38410b137c\",\"wifi_name\":\"test_wifi\",}",
        "metadata": {
            "order_id": "CS1710111105S8IPB",
            "product_id": "00301-25217-0--0"
        },
        "create_time": "2017-10-10T00:00:00Z",
        "update_time": "2018-11-12T00:00:00Z"
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.