Restoring Data of Cloud Phones
Function
This asynchronous API is used to restore data to cloud phones in batches.
Data exported from a cloud phone running a later Android version cannot be restored on a cloud phone running an earlier Android version. Data exported from a cloud phone of an earlier Android version can be restored on a cloud phone of a later Android version. However, there may be compatibility issues in a few scenarios. It is recommended that you export and restore data between cloud phones of the same Android version.
When a cloud phone is in use, it stores data in its cache. If you try to run restored files without restarting the cloud phone, you may experience access issues or application crashes. To avoid this and ensure stable performance, restart the cloud phone after successful restoration.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
POST /v1/{project_id}/cloud-phone/phones/batch-restore
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Specifies the project ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an Identity and Access Management (IAM) API. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
restore_infos |
Yes |
Array of RestoreInfo objects |
Specifies the information about the cloud phone to which data will be imported. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
phone_id |
Yes |
String |
Specifies the cloud phone ID. |
|
bucket_name |
Yes |
String |
Specifies the name of the OBS bucket for storing the exported data. A valid OBS bucket name contains 3 to 63 characters, including only lowercase letters, digits, hyphens (-), and periods (.). |
|
object_path |
Yes |
String |
Specifies the OBS path for storing the exported data. The value must comply with the OBS path naming specifications and can contain a maximum of 1024 characters. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
request_id |
String |
Specifies the unique request ID. |
|
jobs |
Array of PhoneJob objects |
Task information |
|
Parameter |
Type |
Description |
|---|---|---|
|
phone_id |
String |
Specifies the unique ID of a cloud phone. This parameter is contained in tasks related to cloud phones. |
|
job_id |
String |
Specifies the unique ID of a task. |
|
error_code |
String |
Specifies the error code. |
|
error_msg |
String |
Specifies the error message. |
Example Requests
Restoring data from an OBS bucket to a cloud phone
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/batch-restore
{
"restore_infos" : [ {
"phone_id" : "1234567b8bab40ffb711234cb80d0234",
"bucket_name" : "mybucket",
"object_path" : "myimage/v1/xxxx.tar"
} ]
}
Example Responses
Status code: 200
OK
{
"request_id" : "6837531fd3f54550927b930180a706bf",
"jobs" : [ {
"phone_id" : "1234567b8bab40ffb711234cb80d0234",
"job_id" : "1564567b8bab40f34711234cb80d0123"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
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