Querying a Cloud Phone Image

Function Description

  • API Name

    ListPhoneImages

  • Function

    Query available cloud phone images by project ID.

URI

GET /v1/{project_id}/cloud-phone/phone-images

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.

Request

  • Request parameters

    None

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

Response

  • Parameter description

    Parameter

    Type

    Description

    request_id

    String

    Specifies the request ID, which is unique.

    phone_images

    Array of objects

    Specifies the cloud phone image information. For details, see Table 2.

    Table 2 phone_images field description

    Parameter

    Type

    Description

    image_name

    String

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

    os_type

    String

    Specifies the image OS type. The value can contain a maximum of 16 bytes.

    os_name

    String

    Specifies the cloud phone OS. The value can contain a maximum of 36 bytes.

    image_id

    String

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

    is_public

    Integer

    Specifies the image type.

    • 1: public image
    • 2: private image

    image_label

    String

    Specifies the cloud phone flavors to which the image is applicable.

    • cloud_phone: cloud phones
    • cloud_game: cloud games
    • qemu_phone: QEMU cloud phones
  • Example response
    {
        "phone_images": [
            {
                "image_name": "AOSP",
                "os_type": "aosp",
                "is_public": 1,
                "os_name": "AOSP7.1.1",
                "image_label": "cloud_game",
                "image_id": "20032420200401a60b0003a99684b8ea"
            },
            {
                "image_name": "AOSP",
                "os_type": "aosp",
                "is_public": 1,
                "os_name": "AOSP7.1.1",
                "image_label": "cloud_phone",
                "image_id": "20032120200330a20b000eae5b8c01e6"
            },
            {
                "image_name": "AOSP",
                "os_type": "aosp",
                "is_public": 1,
                "os_name": "AOSP7.0.0",
                "image_label": "qemu_phone",
                "image_id": "be4d231e44d2a4ccf612660a473fe1e3"
            }
        ],
        "request_id": "5aac6ab146ba76e5b12a3d00a03a9869"
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.