Pushing the TAR Package of an Application to the Shared Space
Call the API to push the TAR package of an application in the OBS bucket to the shared space of the cloud phone server.
Example API
POST https://${CPH Endpoint}/v1/${projectId}/cloud-phone/phones/share-apps
Header:
Content-Type: application/json
X-Auth-Token: ${token}
Body:
{
"package_name": "${package_name}",
"bucket_name": "${bucket_name}",
"object_path": "apk/${package_name}_${version_name}.tar",
"pre_install_app": 0,
"server_ids": [
"${server_id1}",
"${server_id2}"
]
} Parameter descriptions:
- ${bucket_name} indicates the OBS bucket name, and object_path indicates the path for storing the TAR package of the application in the OBS bucket.
- If pre_install_app is set to 1, the application to be pushed is set as a pre-installed application. If pre_install_app is set to 0, the application is not pre-installed. (For details about the pre-installed applications, see Pre-installation of Applications on Cloud Phones.) If an application is set as a pre-installed application, the application will be automatically installed on a cloud phone after the cloud phone is reset.
- server_ids indicates the ID list of servers to which the TAR package of the application is to be pushed. You can specify multiple server IDs at a time.
- For details about this API, see Pushing a Shared Application.
- An application can be pushed for multiple times. The version pushed later is the latest version of the application. Multiple versions can coexist in the shared space.
- package_name indicates the actual package name of the application and cannot be modified. If the package is downloaded from non-official channels, the package may be suffixed with the channel name. You can view the actual package name on the cloud phone where the application has been installed in Querying Cloud Phones.
Example:
Package name downloaded from the official website: com.huawei.xxxx
Package name downloaded from other channels: com.huawei.xxxx.huawei
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot