Update Web Server Certificate Setting

Update the HTTPS certificate settings of the PBX web server.

Prerequisites

The PBX uses a self-signed certificate by default. To use a custom certificate, you need to complete the following prerequisites:
  1. Upload the desired certificate to the PBX.
  2. Add the certificate to the PBX's certificate list.

Request URL

POST {base_url}/{api_path}/webserver/update?access_token={access_token}

Request parameters

Parameter Required Type Description
https_cert Yes String The name of the desired certificate.
Note:
  • You can query the available HTTPS certificates using Get Menu Options (menu=certificate).
  • If you want to change back to the default self-signed certificate, set this parameter to default.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Example

Request parameter

POST /openapi/v1.0/webserver/update?access_token=GCTkIKhKvbF7DCmguyEN7qJnAO6SEjuD HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
  "https_cert": "example.domain.com.crt"
}

Response parameter

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}