Updating the Application Version on a Cloud Phone

Function Description

  • API Name

    UpdateAppVersionOfPhone

  • Function

    Update the application version on a cloud phone. Ensure that the application version has been pushed to the server.

URI

POST /v1/{project_id}/cloud-phone/phones/{phone_id}/action

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 cloud phone ID.

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    update_app_version

    Yes

    Object

    Specifies the application version to be updated. For details, see Table 2.

    Table 2 update_app_version field description

    Parameter

    Mandatory

    Type

    Description

    app_version_ids

    Yes

    Array of strings

    Specifies the ID list of application versions.

  • Example request
    1
    2
    3
    4
    5
    6
    POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/{phone_id}/action
    {
        "update_app_version" : {
    	"app_version_ids": ["xxxx","xxxx"]
        }
    }
    

Response

  • Response parameters

    Parameter

    Type

    Description

    request_id

    String

    Specifies the request ID, which is unique.

    jobs

    Array of objects

    Specifies the task information. For details, see Table 3.

    Table 3 job field description

    Parameter

    Type

    Description

    job_type

    Integer

    Enumerated value 32: Indicates the task of installing the application version package on the cloud phone.

    job_id

    String

    Specifies the unique ID of a task.

    phone_id

    String

    Specifies the cloud phone ID.

    app_version_id

    String

    Specifies the application version ID.

  • Example response
    {
    	"request_id": "6837531fd3f54550927b930180a706bf",
    	"jobs": [
            {
                "job_type": 32,
                "job_id": "1564567b8bab40f34711234cb80d0123",
                "phone_id": "1564567b8bab40f34711234cb80d0124",
                "app_version_id": "1564567b8bab40f34711234cb80d0124"
            },
            {
                "job_type": 32,
                "job_id": "1564567b8bab40f34711234cb80d0177",
                "phone_id": "1564567b8bab40f34711234cb80d0188",
                "app_version_id": "1564567b8bab40f34711234cb80d0124"
            }
        ]
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.