Query Information of a Certificate

Query the detailed information of a specific certificate.

Request URL

GET {base_url}/{api_path}/certificate/get?access_token={access_token}

Request parameters

Parameter Required Type Description
id Yes String The ID of the certificate.
Note: You can query the certificate ID using Query Certificate List.

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.
certificate Object<Cert_Info> The information of the certificate.
Cert_Info
Parameter Type Description
id Integer Certificate ID.
name String Certificate name.
type String The type of the certificate.
  • trusted: Trusted CA certificate.
  • server: PBX server certificate.
issue_to String The domain name associated with the certificate.
expiration String The expiration time of the certificate.
ca_type String How the certificate was added.
Note: This parameter is only returned for PBX server certificate.
  • upload: The certificate was imported to the PBX.
  • apply: The certificate was requested via the PBX.
auto_renewal Integer Whether the certificate automatic-renewal is enabled.
Note: This parameter is only returned for PBX server certificate.
  • 0: Disabled.
  • 1: Enabled.
dns_provider String The DNS provider used for certificate application and auto-renewal.
Note: This parameter is only returned for PBX server certificate.
apply_status String
The current application status of the certificate.
  • issuing: In progress.
  • issuance_success: Successfully issued.
  • issuance_fail: Failed.
apply_tip_code Integer The tip code for a certificate application or renewal operation.
Note: This parameter is returned if certificate application or renewal fail, and the code is generated by the DNS provider.
auth_info_list Array<Auth_Info> The DNS authentication information required for certificate application and auto-renewal.
Auth_Info
Note: For the detailed description about the DNS authentication parameters, see Supported DNS Providers.
Parameter Type Description
k String The key for the authentication parameter as defined by the DNS provider.
iv Integer Return the integer-format value of the authentication parameter.
sv String Return the string-format value of the authentication parameter.
bv Boolean Return the boolean-format value of the authentication parameter.

Examples

Request example

GET /openapi/v1.0/certificate/get?access_token=mqVLmho7rAPjcXnKSFlv1k3IUhkgKwHH&id=4 HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "certificate":{
            "id": 3,
            "name": "docs.example.com.pem",
            "type": "server",
            "issue_to": "docs.example.com",
            "expiration": "-",
            "ca_type": "apply",
            "auto_renewal": 1,
            "dns_provider": "alidns",
            "apply_status": "issuance_success",
            "auth_info_list": [
                {
                    "k": "TTL",
                    "iv": 600
                },
                {
                    "k": "AccessKeyId",
                    "sv": "AKIAIXXXXXXXXXXAMPLE"
                },
                {
                    "k": "AccessKeySecret",
                    "sv": "wJalrXUXXXXXXXXXXLEKEY"
                },
                {
                    "k": "PropagationTimeout",
                    "iv": 300
                },
                {
                    "k": "PollingInterval",
                    "iv": 5
                }
            ]
        }
    ]
}