DescribeCertificates

1. API Description

This API is used to query the list of certificates.

2. Request Parameters

The following list includes the request parameters required by the API:

Parameter NameRequiredTypeDescription

certificateIds

No

Array of String

Certificate IDs.

Supports querying up to 100 IDs.

certificateLabel

No

String

Custom certificate label

san

No

String

Subject Alternative Name (domain associated with the certificate)

resourceGroupId

No

String

ID of the resource group.

If not provided, returns instances from all visible resource groups for the user.

expired

No

Boolean

Whether the certificate is expired

pageSize

No

Integer

Page size of the results.

Defaults to 20, maximum is 1000.

pageNum

No

Integer

Page number of the results.

Defaults to 1.

3. Output Parameters

Parameter NameTypeDescription

requestId

String

Unique request ID. Returned with every request. This request's requestId is needed when troubleshooting.

totalCount

Integer

Total number of items that match the criteria.

dataSet

Result set

4. Code Example

  1. Paginate query for certificate list

POST / HTTP/1.1
Host: console.zenlayer.com/api/v2/cdn
Content-Type: application/json
X-ZC-Action: DescribeCertificates
<Common Request Params>

Request:
{
  "pageNum": 1,
  "pageSize": 1
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "totalCount": 6,
    "dataSet": [
      {
        "certificateId": "certificateIdxxxxx",
        "certificateLabel": "certificatexxx",
        "common": "*.xx.com",
        "fingerprint": "1D7801BBE772D5DE55CBF1F88AEB41A42402DA07",
        "issuer": "TrustAsia TLS RSA CA",
        "sans": ["xx.cn"],
        "algorithm": "RSA",
        "createTime": "2023-04-19T09:11:27Z",
        "startTime": "2023-04-18T09:27:30Z",
        "endTime": "2023-07-18T09:27:30Z",
        "resourceGroupId":"xxx-xx",
        "expired": false
      }
    ]
  }
}

5. Error Codes

The following includes error codes encountered in business logic. For other error codes, see Common Error Codes.

Last updated