Deleting Shared Storage Files
Function
This API is used to delete shared storage files from the shared storage directory. This function is available only on cloud phones that support shared storage.
URI
POST /v1/{project_id}/cloud-phone/phones/share-files
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 |
---|---|---|---|
server_ids |
Yes |
Array of strings |
Specifies the ID list of cloud phone servers. |
file_paths |
Yes |
Array of strings |
Absolute path of the shared storage file to be deleted. The value starts with a slash (/) and contains a maximum of 4096 bytes. Currently, only uppercase letters, lowercase letters, digits, periods (.), slashes (/), hyphens (-), spaces, underscores (_), and equal signs (=) are supported. Chinese characters are not supported. The path cannot contain..upper-level directory path to prevent cross-directory attacks. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the unique request ID. |
jobs |
Array of ServerJob objects |
Specifies the task list. |
Parameter |
Type |
Description |
---|---|---|
server_id |
String |
Specifies the unique ID of a cloud phone server. This parameter is contained in tasks related to cloud phone servers. |
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
Deleting a shared storage file from the shared storage directory (This function is available only on cloud phones that support shared storage.)
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/share-files { "file_paths" : [ "/data/app", "/data/data/test.apk" ], "server_ids" : [ "1234567b8bab40ffb711234cb80d0234", "1678567b8bab40f93711234cb80d0764" ] }
Example Responses
Status code: 200
OK
{ "request_id" : "6837531fd3f54550927b930180a706bf", "jobs" : [ { "server_id" : "1234567b8bab40ffb711234cb80d0234", "job_id" : "1564567b8bab40f34711234cb80d0123" }, { "server_id" : "1678567b8bab40f93711234cb80d0764", "job_id" : "1564567b8bab40f34711234cb80d5678" } ] }
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