Updating Cloud Phone Attributes
Function Description
- API Name
- Function
Only some cloud phone attributes can be updated. Some attributes take effect only after the cloud phone is restarted. For details about the attribute restrictions, see Cloud Phone Attribute List. If the cloud phone is in the abnormal state, the updated attributes take effect only after the cloud phone is restored to the running state. This API is an asynchronous API. You can call APIs in Querying the Task Execution Status and Querying the Task Execution Status List to query the task execution result.
URI
POST /v1/{project_id}/cloud-phone/phones/batch-update-property
|
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
- Parameter description
Parameter
Mandatory
Type
Description
phones
Yes
Array of objects
Specifies the cloud phone information. For details, see Table 2.
Table 2 phones field description Parameter
Mandatory
Type
Description
phone_id
Yes
String
Specifies the cloud phone ID. The value can contain a maximum of 32 bytes.
property
Yes
jsonString
Specifies the cloud phone attribute list. For details, see Cloud Phone Attribute List.
- Example request
1 2 3 4 5 6 7 8 9 10 11 12 13
POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/batch-update-property { "phones": [ { "phone_id": "a7f3a1c5258347d6b6f1def79e11f2bc", "property": "{\"phone_num\":\"13666666666\",\"imsi\":\"460021624617113,\"wifi_name\":\"test_wifi\",}" }, { "phone_id": "1678567b8bab40f93711234cb80d0764", "property": "{\"phone_num\":\"13666666666\",\"imsi\":\"460021624617113\",\"wifi_name\":\"test_wifi\",}" } ] }
Response
- Response parameters
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 3.
Table 3 Job structure Parameter
Type
Description
phone_id
String
Specifies the unique ID of a cloud phone. This parameter is contained in tasks related to cloud phones.
job_id
String
Specifies the unique ID of a task.
error_code
String
Specifies the error code. For details, see Error Codes.
error_msg
String
Specifies the error description.
- Example response
{ "request_id": "6837531fd3f54550927b930180a706bf", "jobs": [ { "phone_id": "1234567b8bab40ffb711234cb80d0234", "job_id": "1564567b8bab40f34711234cb80d0123" }, { "phone_id": "1678567b8bab40f93711234cb80d0764", "error_code": "CPS.0004", "error_msg": "Parameter: phone_id is invalid." } ] }
Returned Values
See Returned Values.
Error Codes
See Error Codes.
Last Article: Changing the Cloud Phone Name
Next Article: Task Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.