UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/rebuildssldb
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/rebuildssldb
- 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/cpanel.openapi/SSL/rebuildssldb{ "apiversion": 3, "func": "rebuildssldb", "module": "SSL", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
The key type to set.
system— Use the system’sssl_default_key_typevalue.rsa-2048— 2,048-bit RSA.rsa-4096— 4,096-bit RSA.ecdsa-prime256v1— ECDSA prime256v1 (“P-256”).ecdsa-secp384r1— ECDSA secp384r1 (“P-384”).
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/set_default_key_type
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/set_default_key_type
- 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/cpanel.openapi/SSL/set_default_key_type?type=ecdsa-prime256v1'{ "apiversion": 3, "func": "set_default_key_type", "module": "SSL", "result": { "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function enables or disables secure redirects (HTTPS) for the cPanel account's domains that you specify.
Important:
To call this function, one of the following conditions must exist:
- AutoSSL must exist on the domains for which you enable secure redirects.
- A valid SSL certificate must exist for each domain for which you wish to enable secure redirects.
- You must own the domains for which you wish to enable secure redirects.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/toggle_ssl_redirect_for_domains
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/toggle_ssl_redirect_for_domains
- 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/cpanel.openapi/SSL/toggle_ssl_redirect_for_domains?domains=main.example%2Caddon.example%2Caddon.main.example&state=1'{ "apiversion": 3, "func": "toggle_ssl_redirect_for_domains", "module": "SSL", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }