Deleting an Application Version from a Server

Function Description

  • API Name

    RemoveAppVersionFromServer

  • Function

    Delete 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_remove_app_version

    Yes

    Object

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

    Table 2 batch_remove_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_remove_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 3 job field description

    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.

  • Example response
    {
        "request_id": "6837531fd3f54550927b930180a706bf",
        "jobs": [
            {
                "job_type": 41,
                "job_id": "1564567b8bab40f34711234cb80d0123",
                "server_id": "0da365fde47b439ea4bdd4085fb9c6ba",
                "app_version_id": "1564567b8bab40f34711234cb80d0124"  
            },
            ...
        ]
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.