Pushing the TAR Package of an Application to a Cloud Phone Server
When pushing or updating an application package for the first time, you need to call the API for pushing shared applications to push the TAR package of the application in the OBS bucket to the cloud phone server.
Example of the curl command
curl -i -k -X POST "https://${CPH Endpoint}/v1/${projectId}/cloud-phone/phones/share-apps" -H "Content-Type: application/json" -H "X-Auth-Token: $token" -d ' { "package_name": "com.miniteck.miniworld", "bucket_name": "your-bucket-name", "object_path": "your/dir/miniworld.tar", "pre_install_app": 1, "server_ids": ["1678567b8bab40f93711234cb8","1234567b8bab40ffb711234cb"] }'
Parameter descriptions:
- bucket_name and object_path are the same as those in 3.
- server_ids indicates IDs of servers that receive the file pushed. If multiple server IDs are specified, the application can be installed on cloud phones on multiple servers.
- If pre_install_app is set to 1, applications are preinstalled. If pre_install_app is set to 0, applications are not preinstalled. After a cloud phone is restarted or reset, if pre-installation is not enabled, the shared application will be "lost". In this case, run appctrl install or appctrl start again to use the application. If pre-installation is enabled, you can directly use the application.
- The push task created by this API is executed asynchronously. You need to invoke the Querying the Task Execution Status List API to check whether the task is successfully executed.
For details about this API, see Pushing a Shared Application.
Feedback
Was this page helpful?
Provide feedbackThank 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