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/
Request
This function sets a new primary SSL website for a dedicated IP address.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/set_primary_ssl
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/set_primary_ssl
- 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_primary_ssl?servername=hostname.example.com'{ "apiversion": 3, "func": "set_primary_ssl", "module": "SSL", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function retrieves a certificate.
Note:
When you call this parameter, you must include either the id or the friendly_name parameter.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/show_cert
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/show_cert
- 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/show_cert?friendly_name=TestCert&id=example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041'{ "apiversion": 3, "func": "show_cert", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function retrieves a certificate signing request (CSR).
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
Note:
When you call this function, you must include either the id or the friendly_name parameter.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/show_csr
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/show_csr
- 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/show_csr?friendly_name=TestCSR&id=example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f'{ "apiversion": 3, "func": "show_csr", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }