Description
This function generates a Certificate Signing Request (CSR).
Note:
This function requires a valid key in the account's ssl directory.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
|
Parameter |
Type |
Description |
Possible values |
Example |
|
domains |
string |
Required The domain(s) for which to generate the certificate. |
A valid string. Note: If there is more than one domain, this parameter mustbe a comma-separated list. |
example.com |
|
countryName |
string |
Required The two-letter country code. |
A valid two-letter ISO-3166 country code. |
US |
|
stateOrProvinceName |
string |
Required The state's or locality's full name. |
A valid string. |
Texas |
|
localityName |
string |
Required The certificate's city name. |
A valid string. |
Houston |
|
organizationName |
string |
Required The certificate's organization. |
A valid string. |
Organization |
|
organizationalUnitName |
string |
The certificate's organizational unit or department name. This parameter defaults to an empty string. |
A valid string. |
Department |
|
emailAddress |
string |
A valid email address to associate with the certificate. This parameter defaults to an empty string. |
A valid email address. |
user@example.com |
|
key_id |
string |
Required The key's ID. |
A valid string. |
|
|
friendly_name |
string |
A friendly name for the new certificate. This parameter defaults to the domain name for which you generated the certificate. |
A valid string. |
TestCert |
Returns
|
Return |
Type |
Description |
Possible values |
Example |
|
modulus |
string |
The CSR's modulus. |
A valid string. |
|
|
created |
string |
When the CSR was created. |
A valid date in Unix time format. |
1366386445 |
|
domains |
string |
The domains that the CSR covers. |
A valid domain or domains. |
example.com |
|
commonName |
string |
The name that issued the CSR. |
Usually, a valid domain. |
example.com |
|
friendly_name |
string |
The CSR's friendly name. |
A valid string. |
TestCSR |
|
id |
string |
The CSR's ID. |
A valid string. |
|
|
text |
string |
The CSR's text. |
A valid CSR. |
|
