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:
uapi --output=jsonpretty \ --user=username \ SSL \ toggle_ssl_redirect_for_domains \ domains='main.example,addon.example,addon.main.example' \ state='1'
{- "apiversion": 3,
- "func": "toggle_ssl_redirect_for_domains",
- "module": "SSL",
- "result": {
- "data": [
- "main.example",
- "addon.example",
- "addon.main.example"
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}