Deploying an Application Version on a Server
Function Description
URI
POST /v1/{project_id}/cloud-phone/servers/action
|
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
Parameter
Mandatory
Type
Description
batch_deploy_app_version
Yes
Object
Specifies information about the application version to be deployed. For details, see Table 2.
- Example request
1 2 3 4 5 6 7
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/servers/action { "batch_deploy_app_version": { "app_version_ids": ["1564567b8bab40f34711234cb80d0124"], "server_ids": ["88b8449b896f3a4f0ad57222dd91909"] } }
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 30: Indicates that the application is deployed on 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 31: Indicates the task that the server pushes the application version package.
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 32: Indicates the task of installing 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": 30, "server_id": "6837531fd3f54550927b930180a706bf", "job_id": "1564567b8bab40f34711234cb80d0129" }, { "job_type": 31, "job_id": "1564567b8bab40f34711234cb80d0123", "server_id": "0da365fde47b439ea4bdd4085fb9c6ba", "app_version_id": "1564567b8bab40f34711234cb80d0124" }, { "job_type": 32, "job_id": "1564567b8bab40f34711234cb80d0123", "server_id": "0da365fde47b439ea4bdd4085fb9c6ba", "phone_id": "1564567b8bab40f34711234cb80d0124", "app_version_id": "1564567b8bab40f34711234cb80d0124" }, { "job_type": 32, "job_id": "1564567b8bab40f34711234cb80d0177", "server_id": "0da365fde47b439ea4bdd4085fb9c6ba", "phone_id": "1564567b8bab40f34711234cb80d0188", "app_version_id": "1564567b8bab40f34711234cb80d0124" } ... ] }
Returned Values
See Returned Values.
Error Codes
See Error Codes.
Last Article: Querying the List of Applications Deployed on the Server
Next Article: Deleting an Application Version from a Server
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.