We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - fetch_vhost_ssl_components
Skip to end of metadata
Go to start of metadata

Description


This function lists the components of each SSL certificate on the server's virtual hosts.

Warning:

  • On most servers, this function returns a large amount of output. We strongly recommend that you filter and sort the output.
  • The following example uses the filter and sort options:
https://hostname.example.com:2087/cpsess##########/json-api/fetch_vhost_ssl_components?api.version=1&api.filter.a.field=servername&api.filter.a.arg0=servername.com&api.filter.a.type=eq&api.filter.enable=1&api.sort.enable=1&api.sort.a.field=servername

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/fetch_vhost_ssl_components?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/fetch_vhost_ssl_components?api.version=1
 Command Line
whmapi1 fetch_vhost_ssl_components


Notes:

  • Unless otherwise noted, you must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
	"data": {
		"components": [{
			"servername": "example.com",
			"certificate": "-----BEGIN CERTIFICATE-----\nMIIDdzCCAl+gAwIBAgIFAhQDowAwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL\nZXhhbXBsZS5jb20wHhcNMTkxMTExMjAzNzUzWhcNMjAxMTEwMjAzNzUzWjAWMRQw\nEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBAK31N5qqd4BhMRm318tt7CP3thvJ9nXv5j3Hks8bfNggAgBmWwh/iGEoyB0e\nmKmFkomXYQejSCkFmwI5/I+H53LA1UrnWURAHaY8UCJMMeCe22E9fbmASNMhcnov\n/AOYBl3kEWEkKVBN3dQZFsWzj+PTTui1zHl8nrr1POPLZMS+t8D3HppNoUBwBkKR\nQ/MetqCaQ3HlgbknMi0/5DbuaV0GJNbXNX9uhnGqQFUI21sEVU4xcvtEDN88dT1d\nx5EhLXobDV/brXgFm85QK/lZt3aWlIJLs/WJJSK+152PO3HhfoHpkx+JflMYoev5\nLauXhZGYXCEG8sBLa2PPH9WlpgcCAwEAAaOByzCByDAdBgNVHQ4EFgQU/Vx4Cer1\nmY3SaijxdCsA2Jo7q84wCQYDVR0TBAIwADBCBgNVHSMEOzA5gBT9XHgJ6vWZjdJq\nKPF0KwDYmjurzqEapBgwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb22CBQIUA6MAMB0G\nA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjA5BgNVHREEMjAwggtleGFtcGxl\nLmNvbYIQbWFpbC5leGFtcGxlLmNvbYIPd3d3LmV4YW1wbGUuY29tMA0GCSqGSIb3\nDQEBCwUAA4IBAQCneJA732g7srfydkgG0XJ8b1RS3ffVlnG1ahCDfIpBTx2M7Oco\n0oa4QK4fEJnyh5Zc861aNrRHecLk4KV4QmDmLJVxTKNv3QXqgPJu+zN49x9ESwRs\nbqiaD+K6MYmlyRukxY+v8jyOhTKvZTOjuuGKhDRcNNgn/kPIjZw3v37vY4o1pUPL\nP1YBw2Caa01HstzouaVZlw05Viwo2AHJE5u7zW+VcA4VR8WAD/2SqdyWZIo+chwd\nr3hWlRyHephLCBhOLb1wPk3E+mOIyryXjLpGdVnWewMSEY8AGvv7IORkO5ufCz/c\n5UlG1r1+l5AhnFQPGoREI49hXVAETVInW9Uk\n-----END CERTIFICATE-----",
			"key_id": "adf53_5a607_8b949b2f1c817f60360afc3ae1f8f271",
			"cabundle": null,
			"cabundle_id": null,
			"key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEArfU3mqp3gGExGbfXy23sI/e2G8n2de/mPceSzxt82CACAGZb\nCH+IYSjIHR6YqYWSiZdhB6NIKQWbAjn8j4fncsDVSudZREAdpjxQIkwx4J7bYT19\nuYBI0yFyei/8A5gGXeQRYSQpUE3d1BkWxbOP49NO6LXM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knqdij0CgYA+btZnJFyTzMIWUOxJkPvUvFVntdSe9Z0jcWAA\nMvSpl+xTyTPCPwneIETGxhuNiS3GWIrFyg6fLZWfrzKqC/03d32gafMdU12G/Z2W\nEUdEx9dnm3scHYCVLILIwfTzoPg+rzaOpSRRHyXhPip+8SslKWRTwWY0RfxLIZqF\n6WpzDQKBgQDIFver+WSw/LTHt8LvYWyWi7pOIu6Df0ff1AYYSTMzsz9UewfRlSFw\n/ASp0dR6Po84oxIYRERxbu1ZoDhQxnGb5M1i+iFsOYBIRVmbWs4k7A0kghjGqciA\nyIbJNfSVmgNTXN4VqXW1rAqYDGDgE+huGEpnD08bPfEQm9tp0Mss5w==\n-----END RSA PRIVATE KEY-----",
			"certificate_id": "example_com_adf53_5a607_1605040673_e4fcb925265ec7f0feed05a8ef2eb3ff"
		}, {
			"certificate_id": "resell_com_ecfeb_5c8df_1608653403_1de5d524f287f7ec75531239a2f4a133",
			"key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpgIBAAKCAQEA7P61Bi25+M+z3lO4zB9S3jmBnPaJiAE7MRcJESVK+5IcQ2Xe\nfTGJtjc8C39V9u3HGKmBm6o5cMKQlk61r0vbwJqxagK/ucad9MN21YSqxPSvrWH1\nG+DG2NDfwrtB3zokg26NO0gKDqxjB1VWjyDTbNfnkObEcbCWAc//7TlGBCZa0AD7\nbYh297JOidd1b1gK7ZOfkOy+JSyksbT40JsMv9YVNkka9LZlZCGh++4jjjFr8Adq\nSGLEWIyro6dHhIKOxXYVCAQie/mamm2RxhqZv1EPo73iPN6qgf8Rw+GcQF+xilMh\nxs6fF8iD0xSzagGhljfCr/NPg2ZNpsu/LxXI3wIDAQABAoIBAQDEBRA5YgzWDQVa\nuKi6vJXQFIRuDURH56zLt5/aPJw+Y+VYoaNarWSYACt73wB9UsJAVcNLu4nzCBqL\nF+MScI38Sna/ljJ6OBth3WImzKpqaW/82m7fdhVCM9E/wZ6EQhT9WK0cAUPASzlF\nUYJcs+vrtNBle1m0Jzi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SYaz59XYB5Bo8vTl7Qn7u\nq2UsLqo9qroCpF+qdmbsqR8kFUltjycnVZ8g21Hu2QoeyOKEbuzohy5mtffchoV8\nzsifokwid0f+Zd88oYPQNNPib2P9Ef06DUHy2hBBe0Wunh2McjYckRTdYgIPVANj\n0DhtCcD76Q1VtmjkReirj4CY63/8wcQ2wk37qtUI5x2SzMIAuv49HAwD7atwQKgZ\n03hIrdHhFSIwTJMG1nqyO+h3X5En\n-----END CERTIFICATE-----",
			"servername": "resell.com",
			"key_id": "ecfeb_5c8df_35927dbac0386ff253c269a9cda4c6f3"
		}, {
			"servername": "examplexample.com",
			"key_id": "a3538_60c21_9fa3569d527212b1f177053e1cd69b02",
			"certificate": "-----BEGIN CERTIFICATE-----\nMIIDmzCCAoOgAwIBAgIFAKpkbaAwDQYJKoZIhvcNAQELBQAwHDEaMBgGA1UEAwwR\nZXhhbXBsZXhhbXBsZS5jb20wHhcNMjAwMTIyMTcxNjU2WhcNMjEwMTIxMTcxNjU2\nWjAcMRowGAYDVQQDDBFleGFtcGxleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEB\nBQADggEPADCCAQoCggEBAKNThvYA25bNfs9ciMz7C4H2+eWYFUq5dUClAkx+gRCc\njwSIhDl8W1n86whDlcgA+YnrwfFLWGkXAxMXwowXrrygvg4hN5bl89fC7qsYsnE1\nSGxjKAmzy4FguAGcGa/4rHvjQ9lXhN64YawdyKHek57HWW2LIAFsaG1x55Tx51IF\nVOwP3vhFDoNAZAOEdShUcE59SoguEFoNwh6QkbyMJzwJNU3PeOANDNluI4o7R2Ch\nOKh6joaSgHFpuAZj7s/XBtjfvIaCDmlC7KETlW9xFsmF5KQyUGydC3T4KUEJvbzw\ntlFHMdCgZ3qF+aoiNl1yhiUEUdiU3uBnyxt0kw+WDCECAwEAAaOB4zCB4DAdBgNV\nHQ4EFgQUWRCY0RJuWBQiXMhhPbhgbXHMpMEwCQYDVR0TBAIwADBIBgNVHSMEQTA/\ngBRZEJjREm5Y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rsCgYBMEOePOb6BefOiStGH3ViTmXhmrehAVB+FgZ+YKOwXWzEboSeiPQ1p\nDchCLFCHFHgMocZccPj4wHj3aDwEL7GnuHaHOBbCKbe78d3OH/GOk79mGQmkfmzS\nhXgVZCt92HwBVKCkfHTKxf96bMQA3Yw23baLE5Fma+0P5Goa6/35Lw==\n-----END RSA PRIVATE KEY-----",
			"certificate_id": "examplexample_com_a3538_60c21_1611249416_9c05761910ec26a9044755fc5a2dda02"
		}, {
			"cabundle_id": null,
			"key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEApP/UwHxQ8dsHH+rWY9Q6FoFzksnB8pbqgHaSfWab8sa/4x6e\nL8Oy4DGEkaaqcdsTl3EZMVJc0G3ekOF5veNiXXf6CU4vIXEL23HiglxehEiyyVJe\noir/2QSjEH00EBz8ZpLKuE2aatp0ccQqe15vVSf2mZnWDY/2s0DMuZoUffYlwDCI\nVKC3y/0YuwAW+Q70um8UBQifYsh1Tj8ZYehOsWKHGxJ3cKS5C5k9nVS293METUCd\nIR6Lw7eagw5kMswPcu00gL3jwTTrBUpd3ihjVf8QTDkL8MXABJNPptM9S/OPFjWF\n5rfdQJiFOMJ1xbF58nJppoYY5O5omHN5gKDX9wIDAQABAoIBABmuvJXtg8fxmM1O\nB2roiNYh9jRd9TNmbD/stOaSByol545ZoLO8mWYuLv1g3Nz2Bbmn4Az+TfYfc+pH\nPmThNNlpqGC0a7+f0gGpW2GBMTEUA8g0awiA+uvzvdH+OxFbAaqRpL5FTgjd0gw3\nRYmIbHnry4WjHV9lDjhemL83DYOBgdesQn1tg9gdKn6OHH6clL8wrWPqD3trXGbF\nzLPap/x/F89mmmWFUDtDFhypqq4En5/JyUv3xtJe7kMn9lNHgg3MvLcb9tNhgwI4\nKwVbCrmjWpInk7ECNnCJGmPx2xr3LW53fjJEhAkFGgEQZ13fOrRcZ9g3SdyyWEIa\naEJHoTECgYEA11iaNclXmaVvSBgn0GfugkG3ANVkh2ahDUDvSbaNE1PqzwScsONA\nV2qI8YAdxTEdlVSNH13obxRS3Pl/wFYf4i+7FJW6YuiQ/gUkh0q4kx+NfNIi2I0C\nbdPc1l2OMunzXSgbclO13LvwjyVrzACgcY75NWaO3CYAwd6zOjhnqx8CgYEAxCYI\n9Hf2Ps8rwFS7cIieEQ5nTYS6kcMD5pSfQHuQvVs7bouYib4cIy1KLvWYIYofL5HZ\nYingI87+vG5SpkpLUxlRB43XgyvmJKtYbMKDtkwGHI+wt9RYGfuFigyB0h99iZkO\nCf5mJp/7VAEPB5H0/I3BuaRx8+TK2EcysvSbkCkCgYEAzmOJsMEepxBKPkOAbRof\nGlIXLcJXTfoLouM4M2K1hO+pnO1jq5ixwtZFF4hdf++Z1dQqSQS8zzEgVc7+JH2m\noyZx28HA2CjjRcHyB4SSr9bOyPGxGfDTgiVKg104+w0EBKV64LDgHQU3AkqwLN3w\n58VKjWaUxuPZV/WzurnyiasCgYEAl3nUAo890EWHQRFuazpl70ATUM8GkZhrw77U\nuSRzo3f4DqepVf5FlnjcSCWLpaMX8FGO8frqyFyLZpNAKoFHaFYtuEq2uurE4V6d\ne+g/dSGCur3QuDY5D1+pQfHks5N0DDXxnJAk7QExQy9KHwt9iSgkCixPgA0ZBSr+\noSq7k/kCgYBHojm5neAM5C10d2olRXnWW/Lg1U7XFCvAweichFFsP31nnUgIN48Z\nGhRRYI+7Pu1jt8CcSS/HDaTU64UwcM1xihyvaQtxlLPqMbrM3ukKarORumYo1bQg\nHWKG5cjr7N+rcj14lSRwhTiXPwOcrf8jPEBiuTg8L9NimJpQBaEWyA==\n-----END RSA PRIVATE KEY-----",
			"certificate_id": "exampleaddon_example_com_a4ffd_0d7f7_1614876227_1d3f0d73f5550983c068cbabf25fa4cd",
			"servername": "exampleaddon.example.com",
			"certificate": "-----BEGIN CERTIFICATE-----\nMIID6DCCAtCgAwIBAgIFARprhsIwDQYJKoZIhvcNAQELBQAwIzEhMB8GA1UEAwwY\nZXhhbXBsZWFkZG9uLmV4YW1w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1eGm1rVPRuXfDUekIKXso7Vqs\n4OTxsNoKOxL+fpR7P63rl/3j+N37Ppvu01V9WKsLpWK/8kzx0qDRyOr9MIhumSaK\nxZh7Q3k2sVLS0MzC/Fu7zd6eGBsaEw/FZaT1DdpAIPSwMwpVeD4Tb+1kSxDuAIL3\nwAVoVEnTQxs3wScXGGAwLGSagG76SEdAJ2l1rqWV1UQ4cyGCC09kIo25gFo=\n-----END CERTIFICATE-----",
			"key_id": "a4ffd_0d7f7_d2d9eac09f3214a4864be979de5fdf59",
			"cabundle": null
		}]
	},
	"metadata": {
		"version": 1,
		"command": "fetch_vhost_ssl_components",
		"reason": "OK",
		"result": 1
	}
}
 Output (XML)
<result>
    <data>
        <components>
            <servername>example.com</servername>
            <key_id>e353a_5bc13_7ff85c8ae9750fbec0fbf7b30c1e0134</key_id>
            <certificate>
                -----BEGIN
 CERTIFICATE----- 
MIID3TCCAsWgAwIBAgIFANfp2rUwDQYJKoZIhvcNAQEFBQAwgYYxFTATBgNVBAMM 
DGV4YW1wbGUxLmNvbTELMAkGA1UEBhMCVVMxKDAmBgkqhkiG9w0BCQEWGWxhdXJl 
bmNlLnNpbW9uQGNwYW5lbC5uZXQxFDASBgNVBAoMC2NQYW5lbCBJbmMuMQ4wDAYD 
VQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjAeFw0xMzA4MTQxNjIzMDhaFw0x 
NDA4MTQxNjIzMDhaMIGGMRUwEwYDVQQDDAxleGFtcGxlMS5jb20xCzAJBgNVBAYT 
AlVTMSgwJgYJKoZIhvcNAQkBFhlsYXVyZW5jZS5zaW1vbkBjcGFuZWwubmV0MRQw 
EgYDVQQKDAtjUGFuZWwgSW5jLjEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hv 
dXN0b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjU6olzIrQXTIl 
YR5EEMAnDBGy1G+IcF09F5ojECqyTuFnwakHC59VToO63huEJW4RxaDLKslrlvKO 
gCsRxyHXP7/mHdmDmXSm/OTheRXA+/iFBW8YZWBBz3DbRgsiyrX9JQJJHkq58NLL 
cnSA4OvWLoOHCs2jG/otRiXv2CI0+XKfNR6gL7FiYJwWVMEbXexGhTmju4MHOoX3 
i89XfNi3GFARRczNidetsLsYyHLnMDoV4sdaarMVx/oJnkNRpPD/Emwmk/cdnyHZ 
95i5S7aJJ3CD/qjcwBtq8mjQrYt6SB+KF50HY5zfMpDJNyOTenZ8QAqM5LHKGfCn 
EXCE1bwTAgMBAAGjUDBOMB0GA1UdDgQWBBR67/hOWIfAZre2ibyF587wcJzGtjAf 
BgNVHSMEGDAWgBR67/hOWIfAZre2ibyF587wcJzGtjAMBgNVHRMEBTADAQH/MA0G 
CSqGSIb3DQEBBQUAA4IBAQCAaSmPEuZVRio0BqN4536pTkjpbezUrL3S3SD3ETuC 
0sbrCJxDLVejf7aWtpIKhL/N0LcIvbJnjcW7DWocPEVpktCqlOFUTb5V3Cy3Qc6n 
yxrWSrZtbWZEeZyERYfYEhNR5JTvLXJTVNdOoqI1Ty2oqRDMF/VQc9u8Iy46Syi3 
GfZLQAVVj9v9BwAS9ykXsxf5TZjNyl22C9OIR3gJhTYNUSu9jqUYbJ0LtTKT16Pg 
b9tBvR3YIEH4Cp+PtxgCRxCp6wSUKLpPVQ+KM+FxUbszt+G8KIM1I8OWgls/EEQ6 
ugr04bhDMRLGgLMypqkNOXCom3R6Zt0kh+FQ/vTMzfDT -----END CERTIFICATE-----
            </certificate>
            <cabundle_id/>
            <cabundle/>
            <certificate_id>
example_com_e353a_5bc13_1408033388_9a1d40aff655f98fed7206e5af466065
            </certificate_id>
            <key>
                -----BEGIN
 RSA PRIVATE KEY----- 
MIIEowIBAAKCAQEA41OqJcyK0F0yJWEeRBDAJwwRstRviHBdPReaIxAqsk7hZ8Gp 
BwufVU6Dut4bhCVuEcWgyyrJa5byjoArEcch1z+/5h3Zg5l0pvzk4XkVwPv4hQVv 
GGVgQc9w20YLIsq1/SUC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NjTuvLYNMzUroqffCzzsUGFOUk6 
/uDXf8da0MDUHxAJKk+CPQKBgQDkJWpgYgu9ATkoMmrMrIphM5rVjixEmXxvKF2E 
u0tLiZwEoZAhxLwHlKTUjxrWa3KUB+6t3poWqqsHy/L7G4iLPvgyX2htpLX+GYRs 
DwJOgBH0Ayf8tBXxZUeTyn0sI4vTuw8mEK1hP2+OaYuY/BmoO7ZMhslH8Uhst5Ua 
z2tfRQKBgEqz133drotPqWdnDIrlrVklLVOgBHA9VXqA3AxczOoJojK92P7/nRfb 
ziQjdFMMnAQgdLajiz2uhr5H6rZMUttYtb6U7zsqLcGSk2WxwPS3OlGSLwz2xZW8 
Rfp50juACvuE779rJQCLNbnuYcpkBZV/fM/8dGypDWZrKbafUmpL -----END RSA 
PRIVATE KEY-----
            </key>
        </components>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>fetch_vhost_ssl_components</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
componentshashA hash of the certificate information.

This hash includes the servername, key_id, certificate, cabundle_id, cabundle, certificate_id, and key returns.


servername

string

The domain or domains that the certificate covers.

The function returns this value in the components hash.

A valid domain name.example.com

key_id

string

The ID of the certificate's key.

The function returns this value in the components hash.

A valid string.
 Click to view...

e353a_5bc13_7ff85c8ae9750fbec0fbf7b30c1e0134

certificate

string

The certificate's text.

The function returns this value in the components hash.

A valid certificate in Base64 PEM format. 
 Click to view...
-----BEGIN CERTIFICATE----- 
MIIEEzCCAvugAwIBAgIJALF/jFpw6p1bMA0GCSqGSIb3DQEBBQUAMIGfMRYwFAYD 
VQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQswCQYD 
VQQGEwJVUzEoMCYGCSqGSIb3DQEJARYZbGF1cmVuY2Uuc2ltb25AY3BhbmVsLm5l 
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6HYuW7yWesBauCWnJNiKbjN/F+uCTurN3QMAeWf3ZJtsfkAgk8dyq 
R/83a3kDtSPrpt+jX+qdjKEpRtQ5Qpm6XT2gCOQPgnfiUtOCH419pp922P/AAGc+ 
ZUhYoWcRWKw/y6gI7Ru++9+8+wkadL9EbKMZxhVwD5qVm4ZlWK2a
-----END CERTIFICATE-----%0

cabundle_id

string

The ID of the certificate's CA bundle.

The function returns this value in the components hash.

A valid string or null.null

cabundle

string

The certificate's CA bundle.

The function returns this value in the  components  hash.

A valid CA bundle or null.

null

certificate_id

string

The certificate's ID.

The function returns this value in the  components  hash.

A valid string.
 Click to view...

example_com_e353a_5bc13_1408033388_9a1d40aff655f98fed7206e5af466065



key

string

The certificate's key.

The function returns this value in the components hash.

A valid private key in Base64 PEM format. 
 Click to view...
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAomhpdCKB+gPO5TaxKWqvWa7dGsaSnKkrdRtb4S6DQQM2EcW2Xevp1HGYZr5YK3h2SGQqhkeFG44xv\/eJCIIai8FCHV3ulWlzzt4W6akTHWET1q6bl\/aUq36OvMdsBCiZ5UkhI0+ZAEpCQWdUpBQFHxaxZuypaJbL1ITmAs\/k+x8=