Restarting Cloud Phone Servers In Batches

Function Description

  • API Name

    RestartCloudPhoneServer

  • Function

    Restart Cloud Phone servers in batches.

URI

POST /v1/{project_id}/cloud-phone/servers/batch-restart

For details, see Table 1.
Table 1 Parameter description

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

    server_ids

    Yes

    Array of strings

    Specifies the unique identifier of the Cloud Phone server, which can be obtained by referring to Querying the Cloud Phone Servers.

  • Example request
    POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/servers/batch-restart 
    { 
        "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.

    Table 2 Job structure

    Parameter

    Type

    Description

    server_id

    String

    Specifies the unique identifier of the Cloud Phone server.

    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": [{ 
            "server_id": "1234567b8bab40ffb711234cb80d0234", 
            "job_id": "1564567b8bab40f34711234cb80d0123" 
            }, 
            { 
            "server_id": "1678567b8bab40f93711234cb80d0764", 
            "job_id": "1564567b8bab40f34711234cb80d5678" 
            }
        ]
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.