Exporting Data from Cloud Phones
Function
This asynchronous API is used to export data from cloud phones in batches.
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-storage
|
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 |
|---|---|---|---|
|
storage_infos |
Yes |
Array of StorageInfo objects |
Specifies the information about the cloud phone whose data will be exported. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
phone_id |
Yes |
String |
Specifies the cloud phone ID. |
|
include_files |
Yes |
Array of strings |
Absolute path from which data is to be exported. The value can contain a maximum of 4,096 characters. Only data in the /data and cache directories can be exported. Only letters, digits, periods (.), slashes (/), hyphens (-), underscores (_), plus signs (+), number signs (#), asterisk (*), and equal signs (=) are allowed. |
|
exclude_files |
No |
Array of strings |
Specifies the path from which data cannot be exported. exclude_files has a higher priority than include_files. If the two parameters conflict with each other, exclude_files takes effect. The path requirements are the same as those for include_files. |
|
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. Currently, only uppercase letters, lowercase letters, digits, dots (.), slashes (/), hyphens (-), underscores (_), plus signs (+), number signs (#), and equal signs (=) are supported. |
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
Exporting data of cloud phones to an OBS bucket
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/batch-storage
{
"storage_infos" : [ {
"phone_id" : "1234567b8bab40ffb711234cb80d0234",
"include_files" : [ "/data/app", "/data/local", "/data/media" ],
"exclude_files" : [ "/data/app/com.xx.xx-*" ],
"bucket_name" : "mybucket",
"object_path" : "myimage/v1/xxxxx.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