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/
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 } }