Return server vhosts and SSL certificates

This function lists the server's virtual hosts (vhosts) and their installed SSL certificates.

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/fetch_ssl_vhosts
Request samples
whmapi1 --output=jsonpretty \
  fetch_ssl_vhosts
Response samples
application/json
{
  • "data": {
    • "vhosts": [
      • {
        • "crt": {
          • "created": 1538308800,
          • "domains": [
            • "example.com",
            • "subdomain.example.com"
            ],
          • "ecdsa_curve_name": null,
          • "ecdsa_public": null,
          • "encryption_algorithm": "rsaEncryption",
          • "id": "example1_com_e353a_5bc13_1408033388_9a1d40aff655f98fed7206e5af466065",
          • "is_self_signed": 1,
          • "issuer.commonName": "example.com",
          • "issuer.organizationName": "Organization",
          • "issuer_text": "commonName\nsubdomain.example.com",
          • "modulus": "e353aa25cc8ad05d3225611e4410c0270c11b2d46f88705d3d179a23102ab24ee167c1a9070b9f554e83bade1b84256e11c5a0cb2ac96b96f28e802b11c721d73fbfe61dd9839974a6fce4e17915c0fbf885056f18656041cf70db460b22cab5fd2502491e4ab9f0d2cb727480e0ebd62e83870acda31bfa2d4625efd82234f9729f351ea02fb162609c1654c11b5dec468539a3bb83073a85f78bcf577cd8b718501145cccd89d7adb0bb18c872e7303a15e2c75a6ab315c7fa099e4351a4f0ff126c2693f71d9f21d9f798b94bb689277083fea8dcc01b6af268d0ad8b7a481f8a179d07639cdf3290c93723937a767c400a8ce4b1ca19f0a7117084d5bc13",
          • "modulus_length": 2048,
          • "not_after": 1601467200,
          • "not_before": 1569844800,
          • "public_exponent": "010001",
          • "signature_algorithm": "sha256WithRSAEncryption",
          • "subject.commonName": {
            • "commonName": "example.com"
            },
          • "subject_text": "commonName\nsubdomain.example.com",
          • "validation_type": "dv"
          },
        • "docroot": "/home/example/public_html",
        • "domains": [
          • "example.com"
          ],
        • "ip": "192.168.0.20",
        • "iptype": "dedicated",
        • "ipv6": "2001:0db8:0:0:1:0:0:1",
        • "is_primary_on_ip": 1,
        • "mail_sni_status": 1,
        • "needs_sni": 0,
        • "servername": "example.com",
        • "type": "sub",
        • "user": "example"
        }
      ]
    },
  • "metadata": {
    • "command": "fetch_ssl_vhosts",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}