Updated on 2022-11-30 GMT+08:00

Restarting the Encoding Server

Function Description

  • API name

    RestartEncodeServer

  • Function

    Restart the encoding server in batches.

URI

POST /v1/{project_id}/cloud-phone/encode-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

    encode_server_ids

    Yes

    Array of strings

    Specifies the ID of the encoding server to be restarted.

  • Example request
    POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/encode-servers/batch-restart
    {  
        "encode_server_ids": [
            "d5cfa92995da40168c39b38d2aa478b3",
            "00b00d1b35094f13b360cdfe15a9bfee"
        ]
    }

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 2.

    Table 2 Data structure description of job

    Parameter

    Type

    Description

    encode_server_id

    String

    Specifies the unique ID of the encoding server. This parameter is contained in tasks related to the encoding server.

    job_id

    String

    Specifies the unique ID of a task.

  • Example response
    {
        "jobs":
         [
            {
                "job_id": "e9d7b1a2572c4f2c9bf056a3d1b35e39",
                "encode_server_id": "d5cfa92995da40168c39b38d2aa478b3"
            }, 
           {
                "job_id": "4d0a42447cac4c9697b97f07934b74bd",
                "encode_server_id": "00b00d1b35094f13b360cdfe15a9bfee"
            }
        ],
        "request_id": "c775bdf09bc0400a9138199b346cab62"
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.