Updated on 2023-03-16 GMT+08:00

Querying Cloud Phones

Obtain the cloud phone list by referring to Querying Cloud Phones in the Cloud Phone Host API Reference.

Example API

GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones?phone_name={phone_name}&server_id={server_id}&status={status}&offset={offset}&limit={limit}&type={type}
Header:
Content-Type: application/json
X-Auth-Token: ${token}

Parameter descriptions:

  • CPH Endpoint indicates the CPH endpoint in each region in the endpoint list. For example, the CPH endpoint in the CN-Hong Kong region is cph.ap-southeast-1.myhuaweicloud.com.
  • project_id indicates the project ID of the region where the gaming cloud phone server is deployed, for example, 083e9f825e80f50c2f96c0045edc70e8. The project ID can be obtained by performing the following operations:
    1. Log in to the management console.
    2. Click the username in the upper right corner of the page, and choose My Credentials from the drop-down list.
    3. On the API Credentials page, obtain the project ID in the project list.
      Figure 1 Obtaining the project ID
  • The part after the question mark (?) in the URL is optional.
  • $token indicates the response of the API for Obtaining a User Token Through Password Authentication.

API Calling Example

GET https://cph.cn-north-4.myhuaweicloud.com/v1/083e9f825e80f50c2f96c0045edc70e8/cloud-phone/phones
Header:
Content-Type: application/json
X-Auth-Token: ${token}

Replace ${token} with the actual token.