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 installs an SSL certificate.
Note:
Due to their inherent complexities, SSL-related functions often present problems for third-party developers. For the additional steps required to successfully call this function, read our Call UAPI's SSL::install_ssl Function in Custom Code documentation.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
The certificate to install.
Note:
You must URI-encode this value.
You can use a Perl command to URI-encode your SSL certificate for this parameter. For example, you can use the following string, where
CERT.FILEis the SSL certificate file:$(perl -MURI::Escape -ne 'print uri_escape($_);' CERT.FILE)
The certificate's key.
Note:
You must URI-encode this value.
You can use a Perl command to URI-encode your SSL certificate for this parameter. For example, you can use the following string, where
KEY.FILEis the SSL certificate file:$(perl -MURI::Escape -ne 'print uri_escape($_);' KEY.FILE)
The Certificate Authority (CA) bundle data, if the certificate requires it.
Note:
You must URI-encode this value.
You can use a Perl command to URI-encode your SSL certificate for this parameter. For example, you can use the following string, where
CABUNDLE.FILEis the SSL certificate file:$(perl -MURI::Escape -ne 'print uri_escape($_);' CABUNDLE.FILE)
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/install_ssl
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/install_ssl
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty --user=username SSL install_ssl domain='example.com' cert='-----BEGIN%20CERTIFICATE-----%0AMIIEEzCCAvugAwIBAgIJALF%2FjFpw6p1bMA0GCSqGSIb3DQEBBQUAMIGfMRYwFAYD%0AVQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQswCQYD%0AVQQGEwJVUzEoMCYGCSqGSIb3DQEJARYZbGF1cmVuY2Uuc2ltb25AY3BhbmVsLm5l%0AdDEUMB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module": "SSL", "result": { "data": { … }, "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function changes a certificate's friendly name.
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_cert_friendly_name
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/set_cert_friendly_name
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
SSL \
set_cert_friendly_name \
friendly_name='TestCert' \
new_friendly_name='TestCert2'{ "apiversion": 3, "func": "set_cert_friendly_name", "module": "SSL", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function changes a certificate signing request's (CSR) friendly name.
Important:
- You must call either the
friendly_nameoridparameter. - 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_csr_friendly_name
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/set_csr_friendly_name
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
SSL \
set_csr_friendly_name \
friendly_name='TestCSR' \
id='example_com_eda9d_543fb_a3009b4b01a592390866ab3a47c0df18' \
new_friendly_name='TestCSR2'{ "apiversion": 3, "func": "set_csr_friendly_name", "module": "SSL", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }