Deleting a Shared Storage File
Function Description
- API Name
- Function
Delete a shared storage file from the shared storage directory. This function is available only on cloud phones that support shared storage. You can use the extend_spec parameter in Querying the Cloud Phone Flavors to check whether shared storage is supported. (If the extend_spec parameter contains the max_share_disk_size_g field, shared storage is supported.)
URI
POST /v1/{project_id}/cloud-phone/phones/share-files
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request
- Request parameters
Parameter
Mandatory
Type
Description
file_paths
Yes
String
Specifies the absolute path of the shared storage file to be deleted.
The path starts with a slash (/) and contains a maximum of 4096 bytes. Currently, only uppercase letters, lowercase letters, digits, dots (.), slashes (/), hyphens (-), and spaces are supported.
The path cannot contain upper-level directory path to prevents cross-directory attacks.
server_ids
Yes
Array of strings
Specifies the ID list of the Cloud Phone servers.
Obtain it based on Querying the Cloud Phone Servers.
- Example request
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/share-files { "file_paths": [ "/data/app", "/data/data/test.apk" ], "server_ids": [ "1234567b8bab40ffb711234cb80d0234", "1678567b8bab40f93711234cb80d0764" ] }
Response
- Parameter description
Parameter
Type
Description
request_id
String
Specifies the request ID, which is unique.
jobs
Array of objects
Specifies the task information. For details, see Table 2.
- Example response
{ "request_id": "6837531fd3f54550927b930180a706bf", "jobs": [ { "server_id": "1234567b8bab40ffb711234cb80d0234", "job_id": "1564567b8bab40f34711234cb80d0123" }, { "server_id": "1678567b8bab40f93711234cb80d0764", "job_id": "1564567b8bab40f34711234cb80d5678" } ] }
Returned Values
See Returned Values.
Error Codes
See Error Codes.
Last Article: Querying Shared Storage Files
Next Article: Bandwidth Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.