UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
A server running cPanel.
https://{host}:{port}/execute/
Query
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”).
Enum"system""rsa-2048""rsa-4096""ecdsa-prime256v1""ecdsa-secp384r1"
Example: type=ecdsa-prime256v1
- 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'Response
application/json
{ "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.
Security
BasicAuth
- 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'Response
application/json
{ "apiversion": 3, "func": "toggle_ssl_redirect_for_domains", "module": "SSL", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }