Return domains with installed SSL certificates

This function lists the server's domains with installed SSL certificates.

SecurityBasicAuth
Request
query Parameters
registered
integer
Default: 0

Whether to limit the results to certificates registered with a certificate authority (CA).

  • 1 — Registered certificates only.
  • 0 — All certificates.
Enum: 1 0
Example: registered=1
user
string <username>

The cPanel username.

If you do not use this parameter, the function returns certificates for all accounts on the server.

Example: user=username
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/listcrts
Request samples
whmapi1 --output=jsonpretty \
  listcrts
Response samples
application/json
{
  • "data": {
    • "crt": [
      • {
        • "domain": "example.com",
        • "domain_owners": [
          • "username"
          ],
        • "domains": [
          • "example.com"
          ],
        • "ecdsa_curve_name": null,
        • "friendly_name": "TestCertificate",
        • "id": "example._com_d13b4_362b9_1400343187_b05e5c3e443dda9a8869c4cf7457829e",
        • "is_self_signed": 1,
        • "issuer.organizationName": "Organization",
        • "key_algorithm": "rsaEncryption",
        • "modulus_length": 2048,
        • "not_after": 1601467200,
        • "registered": 1,
        • "signature_algorithm": "sha256WithRSAEncryption",
        • "validation_type": "dv"
        }
      ]
    },
  • "metadata": {
    • "command": "listcrts",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}