WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_ssl_certificates_for_fqdns
- A server running WHM.
https://whm-server.tld:2087/json-api/fetch_ssl_certificates_for_fqdns
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_ssl_certificates_for_fqdns?domains=string'{ "data": { "payload": [ … ] }, "metadata": { "command": "fetch_ssl_certificates_for_fqdns", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_ssl_vhosts
- A server running WHM.
https://whm-server.tld:2087/json-api/fetch_ssl_vhosts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_ssl_vhosts{ "data": { "vhosts": [ … ] }, "metadata": { "command": "fetch_ssl_vhosts", "reason": "OK", "result": 1, "version": 1 } }
Request
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
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_vhost_ssl_components
- A server running WHM.
https://whm-server.tld:2087/json-api/fetch_vhost_ssl_components
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_vhost_ssl_components{ "data": { "components": [ … ] }, "metadata": { "command": "fetch_vhost_ssl_components", "reason": "OK", "result": 1, "version": 1 } }