- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function lists the server's domains with installed SSL certificates.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/listcrts?api.version=1®istered=1&user=username
https://hostname.example.com:2087/cpsess##########/xml-api/listcrts?api.version=1®istered=1&user=username
whmapi1 listcrts registered=1 user=username
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "data": { "crt": [ { "is_self_signed": 1, "validation_type":"dv", "signature_algorithm":"sha256WithRSAEncryption", "registered": 1, "issuer.organizationName": "Acme, Inc.", "modulus_length": "2048", "not_after": "1400343187", "domain": "example.com", "domains": [ "example.com" ], "domain_owners": [ "example" ], "id": "example._com_d13b4_362b9_1400343187_b05e5c3e443dda9a8869c4cf7457829e", "friendly_name": "TestCertificate" } ] }, "metadata": { "version": 1, "reason": "OK", "result": 1, "command": "listcrts" } }
<result> <data> <crt> <is_self_signed>1</is_self_signed> <validation_type>dv</validation_type> <signature_algorithm>sha256WithRSAEncryption</signature_algorithm> <registered>1</registered> <issuer.organizationName>Acme, Inc.</issuer.organizationName> <modulus_length>2048</modulus_length> <not_after>1400343187</not_after> <domain>example.com</domain> <domains>example.com</domains> <domain_owners>example</domain_owners> <id> example._com_d13b4_362b9_1400343187_b05e5c3e443dda9a8869c4cf7457829e </id> <friendly_name>TestCertificate</friendly_name> </crt> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>listcrts</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
registered | Boolean | Whether to limit the results to certificates registered with a certificate authority (CA). This parameter defaults to |
| 1 |
user | string | The user's username. If you do not use this parameter, the function returns certificates for all accounts on the server. | A valid username. | username |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
crt | hash | A hash of each certificate's information. | The hash includes the domain , is_self_signed , registered , issuer.organizationName , modulus_length , not_after , id , signature_algorithm , validation_type , and friendly_name returns, and the domains and domain_owners arrays. | |
| Boolean | Whether the certificate is self-signed. The function returns this value in the |
| 1 |
| string | The certificate's validation type. Note: We introduced this return in cPanel & WHM version 56. The function returns this value in the |
| dv |
| string | The signature algorithm of the certificate. Note: We introduced this return in cPanel & WHM version 56. The function returns this value in the | A valid OID hash algorithm name. | sha256WithRSAEncryption |
| Boolean | Whether the certificate is registered with a CA. The function returns this value in the |
| 1 |
| string | The organization name of the certificate's issuer. The function returns this value in the | A valid string. | Acme, Inc. |
| integer | The certificate's modulus length in bits. The function returns this value in the | A positive integer that measures the length in bits. | 2048 |
| integer | When the certificate expires. The function returns this value in the | A date in Unix time format. | 1400343187 |
| string | The certificate's primary domain. The function returns this value in the | A valid domain name. | example.com |
| array | The domain or domains that the certificate covers. The function returns this array in the | An array of valid domains. | example.com |
| array | The owners of the domain or domains that the certificate covers. The function returns this array in the | An array of valid usernames. | example |
| string | The certificate's ID. The function returns this value in the | A valid string. | Click to view... example._com_d13b4_362b9_1400343187_b05e5c3e443dda9a8869c4cf7457829e |
| string | The certificate's friendly name. The function returns this value in the | A valid string. | TestCertificate |
Function information
API Version:
Available in:
WHM 11+
Methods:
GET, POST
Required Parameters:
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:
-
Page:
-
Page:
-
Page:
-
Page: