Updated on 2025-10-28 GMT+08:00

Querying Shared Storage Files

Function

This API is used to query files in a specified path of shared storage. This function is supported only by cloud phones that support shared storage.

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

GET /v1/{project_id}/cloud-phone/servers/share-files

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

If the offset is 0 (default value) or an integer greater than 0, all resources after the offset will be queried.

limit

No

Integer

Specifies the number of returned records on each page. The value ranges from 1 to 50. The default value is 50.

server_ids

Yes

String

Specifies the ID list of cloud phone servers. Use commas (,) to separate IDs.

path

Yes

String

Name of the directory to be queried,

The value can contain uppercase letters, lowercase letters, digits, periods (.), plus signs (+), hyphens (-), underscores (_), slashes (/), and equal signs (=). The value must start with a slash (/) and cannot contain only slashes (/). The value cannot contain ../ or //.

Example: /data/data

Request Parameters

Table 3 Request header 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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the unique request ID.

jobs

Array of ServerJob objects

Specifies the task list.

Table 5 ServerJob

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

Querying the content in the /data/data directory of servers

GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/servers/share-files?path=/data/data&server_ids=xxxxxxx,xxxxxxx&limit=100&offset=0

Example Responses

Status code: 200

OK

{
  "request_id" : "6837531fd3f54550927b930180a706bf",
  "jobs" : [ {
    "server_id" : "203a7243181646b190047ade6bfd882d",
    "job_id" : "1564567b8bab40f34711234cb80d0123"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.