Edit a Certificate
Edit a PBX server certificate.
Request URL
POST {base_url}/{api_path}/certificate/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | Certificate ID. Note: You can query the certificate ID using Query Certificate List. |
| name | No | String | Certificate file name. Note: To replace the current certificate, you need to Upload a Certificate first, then obtain the file name from the file field in the response. |
| issue_to | No | String | The domain name to be associated with the certificate. Note: This parameter only takes effect on an applied certificate (ca_type=apply). |
| auto_renewal | No | Integer | Whether to enable auto-renewal for the certificate. Valid value:
|
| dns_provider | No | String | The DNS provider used for certificate application and auto-renewal. Note:
|
| auth_info_list | No | Array<Auth_Info> | The DNS authentication information required for certificate application and auto-renewal. Note: This parameter is required in the following scenarios:
|
Auth_Info
Note:
- You MUST provide the complete set of parameters required by the selected DNS provider; otherwise, the request will fail.
- For the authentication parameters and their value types of each DNS provider, see Supported DNS Providers.
| Parameter | Required | Type | Description |
|---|---|---|---|
| k | Yes | String | The key for the authentication parameter as defined by the DNS provider. |
| iv | No | Integer | The integer-format value of the authentication parameter. |
| sv | No | String | The string-format value of the authentication parameter. |
| bv | No | Boolean | The boolean-format value of the authentication parameter. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
|
| errmsg | String | Returned message.
|
Examples
Request example
Disable the auto-renewal for an imported certificate (id: 5).
POST /openapi/v1.0/certificate/update?access_token=wOODrqhysk0aELacF87qd4lBvmbBY4IZ HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"id":5,
"auto_renewal": 0
}Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}