Querying Cloud Phones
Function
This API is used to query cloud phones by page. The cloud phones are sorted by creation time in descending order. You can specify offset and limit. If no cloud phone is found, an empty list will be returned.
URI
GET /v1/{project_id}/cloud-phone/phones
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
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 resources returned on each page. Value range: 1 to 200 (default value). Generally, this parameter is set to 10, 20, or 50. |
phone_name |
No |
String |
Specifies the cloud phone name. Fuzzy query is supported. |
server_id |
No |
String |
Specifies the unique identifier of the cloud phone server. |
status |
No |
Integer |
Specifies the cloud phone status.
|
type |
No |
Integer |
Cloud phone type.
|
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. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
phones |
Array of Phone objects |
Specifies the information about cloud phones. |
request_id |
String |
Specifies the unique request ID. |
count |
Integer |
Specifies the total number of cloud phones. |
Parameter |
Type |
Description |
---|---|---|
phone_name |
String |
Specifies the cloud phone name, which can contain a maximum of 65 bytes. |
server_id |
String |
Specifies the cloud phone server ID, which can contain a maximum of 32 bytes. |
phone_id |
String |
Specifies the unique identifier of the cloud phone. The value can contain a maximum of 32 bytes. |
phone_model_name |
String |
Specifies the cloud phone flavor. The value can contain a maximum of 64 bytes. |
image_id |
String |
Specifies the cloud phone image ID, which can contain a maximum of 32 bytes. |
image_version |
String |
Specifies the image version. |
vnc_enable |
String |
Specifies whether to enable the VNC service on the cloud phone. - true: enable
|
status |
Integer |
Specifies the cloud phone status.
|
type |
Integer |
Cloud phone type.
|
imei |
String |
Specifies the International Mobile Equipment Identity (IMEI) of the cloud phone. |
traffic_type |
String |
Specifies the cloud phone route type.
|
volume_mode |
Integer |
Specifies whether the cloud phone disk is independent.
|
availability_zone |
String |
Specifies the AZ where the cloud phone server is deployed. |
metadata |
metadata object |
Specifies the order and product information. |
has_encrypt |
Boolean |
Specifies whether file-level encryption is enabled on the cloud phone. |
create_time |
String |
Creation Time, The time format is UTC. |
update_time |
String |
Update Time, The time format is UTC. |
Example Requests
Querying cloud phones
GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones
Example Responses
Status code: 200
OK
{ "request_id" : "6a63a18b8bab40ffb71ebd9cb80d0085", "count" : 1, "phones" : [ { "phone_name" : "mobile-0001", "server_id" : "88b8449b896f3a4f0ad57222dd91909", "phone_id" : "1234567b8bab40ffb711234cb80d0234", "phone_model_name" : "AOSP-1U4G15G-001", "image_version" : "AOSP 7.0", "image_id" : "88b8449b896f3a4f0ad57222dd91909", "vnc_enable" : "true", "status" : 2, "type" : 0, "imei" : "869287243397729", "availability_zone" : "cn-southwest-242b", "traffic_type" : "direct", "volume_mode" : 0, "metadata" : { "order_id" : "CS1710111105S8IPB", "product_id" : "00301-25217-0--0" }, "create_time" : "2017-10-10T00:00:00Z", "update_time" : "2018-10-10T00:00:00Z" } ] }
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