Uninstalling an Application Version from a Server

Function Description

  • API Name

    UndeployAppVersionFromServer

  • Function

    Uninstall an application version from a server.

URI

POST /v1/{project_id}/cloud-phone/servers/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.

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    batch_undeploy_app_version

    Yes

    Object

    Specifies information about the application version to be uninstalled. For details, see Table 2.

    Table 2 batch_undeploy_app_version field description

    Parameter

    Mandatory

    Type

    Description

    server_ids

    Yes

    Array of strings

    Specifies the server ID list.

    app_version_ids

    Yes

    Array of strings

    Specifies the ID list of application versions.

  • Example request
    1
    2
    3
    4
    5
    6
    7
    POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/servers/action
    {
        "batch_undeploy_app_version" : {
            "server_ids": ["29156bdf4d5c4d65bca6cab8fae5b0ea"],
            "app_version_ids": ["1564567b8bab40f34711234cb80d0124"]
        }
    }
    

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 4, and Table 5.

    Table 3 job field description (1)

    Parameter

    Type

    Description

    job_type

    Integer

    Enumerated value 40: Indicates that the application is uninstalled from the server.

    job_id

    String

    Specifies the task ID.

    server_id

    String

    Specifies the server ID.

    Table 4 job field description (2)

    Parameter

    Type

    Description

    job_type

    Integer

    Enumerated value 41: Indicates the task of deleting an application version package from a server.

    job_id

    String

    Specifies the task ID.

    server_id

    String

    Specifies the server ID.

    app_version_id

    String

    Specifies the application version ID.

    Table 5 job field description (3)

    Parameter

    Type

    Description

    job_type

    Integer

    Enumerated value 42: Indicates the task of deleting the application version package on the cloud phone.

    job_id

    String

    Specifies the task ID.

    server_id

    String

    Specifies the server ID.

    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": 40,
                "server_id": "6837531fd3f54550927b930180a706bf",
                "job_id": "1564567b8bab40f34711234cb80d0129"
            },
            {
                "job_type": 41,
                "job_id": "1564567b8bab40f34711234cb80d0123",
                "server_id": "0da365fde47b439ea4bdd4085fb9c6ba",
                "app_version_id": "1564567b8bab40f34711234cb80d0124"  
            },
            {
                "job_type": 42,
                "job_id": "1564567b8bab40f34711234cb80d0123",
                "server_id": "0da365fde47b439ea4bdd4085fb9c6ba",
                "phone_id": "1564567b8bab40f34711234cb80d0124",
                "app_version_id": "1564567b8bab40f34711234cb80d0124"
            },
            {
                "job_type": 42,
                "job_id": "1564567b8bab40f34711234cb80d0177",
                "server_id": "0da365fde47b439ea4bdd4085fb9c6ba",
                "phone_id": "1564567b8bab40f34711234cb80d0188",
                "app_version_id": "1564567b8bab40f34711234cb80d0124"
            }
            ...
        ]
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.