Deploying Applications

Push the .tar package to the server. That is, push apk/${package_name}_${version_name}.tar to the shared storage of ${server_id1} and ${server_id2}.

Example API

POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/share-files
Header: 
Content-Type: application/json 
X-Auth-Token: ${token} 
Body: 
{
    "bucket_name": "${bucket_name}",
    "object_path": "apk/${package_name}_${version_name}.tar",
    "server_ids": [
        "${server_id1}",
        "${server_id2}"
    ]
}

Parameter descriptions:

  • Obtain the values of parameters such as CPH Endpoint, project_id, ${token}, bucket_name, and object_path by referring to Installing Applications on a Cloud Phone.
  • object_path indicates the path to which the .tar package is uploaded.
  • package_name and version_name indicate the package name and version number of the current application.

    apk is any existing folder. In ${package_name}_${version_name}.tar, package_name and version_name need to be modified as required.

  • server_ids indicates the ID list of servers where the application is deployed. You can enter multiple server IDs and obtain the server IDs by calling the API for Querying the Cloud Phone Servers.

Example

See Pushing Shared Storage Files in the Cloud Phone API Reference.

Follow-up Procedure

Reset all cloud phones in batches by referring to Resetting Cloud Phones in the Cloud Phone API Reference.