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 generates a self-signed SSL certificate.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
A comma-separated list of domains for which to generate the certificate.
The key's ID.
The certificate's Organization Name.
The two-letter state or locality abbreviation.
An email address to associate with the certificate.
A friendly name for the new certificate.
This parameter defaults to the domain's name for which you generated the certificate.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/generate_cert
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/generate_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/generate_cert?countryName=US&domains=string&key_id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3&localityName=Houston&organizationName=Organization&stateOrProvinceName=TX&emailAddress=username%40example.com&friendly_name=TestCert&organizationalUnitName=Department'{ "apiversion": 3, "func": "generate_cert", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": [ … ], "metadata": {}, "status": 1, "warnings": null } }
Request
This function generates a certificate signing request (CSR).
Note:
This function requires a valid key in the account's ssl directory. You can generate a key with UAPI's SSL::generate_key function.
Important:
When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and WebServer roles, the system disables this function.
A comma-separated list of the domains for which to generate the certificate.
The key's ID.
The certificate's organization.
The certificate's state or locality name.
An email address to associate with the certificate.
A friendly name for the new certificate.
This parameter defaults to the domain name for which you generated the certificate.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/generate_csr
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/generate_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/generate_csr?countryName=US&domains=string&key_id=example_com_cb497_a394d_1397249671_d1272da8f13a1fd837493a5ad1f0a0f3&localityName=Houston&organizationName=Organization&stateOrProvinceName=Texas&emailAddress=username%40example.com&friendly_name=TestCert&organizationalUnitName=Department'{ "apiversion": 3, "func": "generate_csr", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": [ … ], "metadata": {}, "status": 1, "warnings": null } }
Request
This function generates a private key.
Important:
- You cannot call both the
keytypeandkeysizeparameters in a single call. - When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.
A friendly name for the new key.
This parameter defaults to the key's type, creation date, and creation time.
The key's type.
system— The system's default value.rsa-2048— 2,408-bit RSA.rsa-4096— 4,096-bit RSA.ecdsa-prime256v1— ECDSA prime256v1 ("P-256").ecdsa-secp384r1— ECDSA secp384r1 ("P-384").
This parameter defaults to the user's default SSL/TLS key type.
Note:
If you do not use this parameter, the system defaults to the keysize parameter's default value.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/SSL/generate_key
- A server running cPanel.
https://cpanel-server.tld:2083/execute/SSL/generate_key
- 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/generate_key?friendly_name=TestKey&keytype=rsa-2048&keysize=2048'{ "apiversion": 3, "func": "generate_key", "module": "SSL", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }