- Created by Documentation, last modified on Oct 05, 2018
Backup:: fullbackup_to_ftp
Backup:: fullbackup_to_homedir
Backup:: fullbackup_to_scp_with_key
Backup:: fullbackup_to_scp_with_password
Backup:: list_backups
Batch:: strict
Brand:: read
Branding:: file
Branding:: get_applications
Branding:: get_application_information
Branding:: get_available_applications
Branding:: get_information_for_applications
Branding:: image
Branding:: include
Branding:: spritelist
Chkservd:: get_exim_ports
Chkservd:: get_exim_ports_ssl
Chrome:: get_dom
Contactus:: is_enabled
cPGreyList:: disable_all_domains
cPGreyList:: disable_domains
cPGreyList:: enable_all_domains
cPGreyList:: enable_domains
cPGreyList:: has_greylisting_enabled
cPGreyList:: list_domains
DomainInfo:: domains_data
DomainInfo:: list_domains
DomainInfo:: main_domain_builtin_subdomain_aliases
DomainInfo:: single_domain_data
DNSSEC:: disable_dnssec
DNSSEC:: enable_dnssec
DNSSEC:: fetch_ds_records
DNSSEC:: set_nsec3
DNSSEC:: unset_nsec3
Email:: account_name
Email:: add_auto_responder
Email:: add_domain_forwarder
Email:: add_forwarder
Email:: add_list
Email:: add_mailman_delegates
Email:: add_mx
Email:: add_pop
Email:: add_spam_filter
Email:: browse_mailbox
Email:: change_mx
Email:: check_fastmail
Email:: check_pipe_forwarder
Email:: delete_auto_responder
Email:: delete_domain_forwarder
Email:: delete_filter
Email:: delete_forwarder
Email:: delete_held_messages
Email:: delete_list
Email:: delete_mx
Email:: delete_pop
Email:: disable_filter
Email:: disable_mailbox_autocreate
Email:: disable_spam_assassin
Email:: disable_spam_autodelete
Email:: disable_spam_box
Email:: dispatch_client_settings
Email:: edit_pop_quota
Email:: enable_filter
Email:: enable_mailbox_autocreate
Email:: enable_spam_assassin
Email:: enable_spam_box
Email:: fetch_charmaps
Email:: fts_rescan_mailbox
Email:: generate_mailman_otp
Email:: get_auto_responder
Email:: get_charsets
Email:: get_client_settings
Email:: get_default_email_quota
Email:: get_default_email_quota_mib
Email:: get_disk_usage
Email:: get_filter
Email:: get_held_message_count
Email:: get_mailbox_autocreate
Email:: get_mailman_delegates
Email:: get_main_account_disk_usage
Email:: get_main_account_disk_usage_bytes
Email:: get_max_email_quota
Email:: get_max_email_quota_mib
Email:: get_pop_quota
Email:: get_spam_settings
Email:: get_webmail_settings
Email:: has_delegated_mailman_lists
Email:: has_plaintext_authentication
Email:: hold_outgoing
Email:: is_integer
Email:: list_auto_responders
Email:: list_default_address
Email:: list_domain_forwarders
Email:: list_filters
Email:: list_filters_backups
Email:: list_forwarders
Email:: list_forwarders_backups
Email:: list_lists
Email:: list_mail_domains
Email:: list_mxs
Email:: list_pops
Email:: list_pops_with_disk
Email:: list_system_filter_info
Email:: passwd_list
Email:: passwd_pop
Email:: release_outgoing
Email:: remove_mailman_delegates
Email:: reorder_filters
Email:: set_always_accept
Email:: set_default_address
Email:: set_list_privacy_options
Email:: stats_db_status
Email:: store_filter
Email:: suspend_incoming
Email:: suspend_login
Email:: suspend_outgoing
Email:: trace_filter
Email:: unsuspend_incoming
Email:: unsuspend_login
Email:: unsuspend_outgoing
Email:: verify_password
EmailAuth:: disable_dkim
EmailAuth:: enable_dkim
EmailAuth:: ensure_dkim_keys_exist
EmailAuth:: fetch_dkim_private_keys
EmailAuth:: install_dkim_private_keys
EmailAuth:: install_spf_records
EmailAuth:: validate_current_dkims
EmailAuth:: validate_current_ptrs
EmailAuth:: validate_current_spfs
ExternalAuthentication:: add_authn_link
ExternalAuthentication:: configured_modules
ExternalAuthentication:: get_authn_links
ExternalAuthentication:: has_external_auth_modules_configured
ExternalAuthentication:: remove_authn_link
Features:: has_feature
Features:: list_features
Fileman:: autocompletedir
Fileman:: empty_trash
Fileman:: get_file_content
Fileman:: get_file_information
Fileman:: list_files
Fileman:: save_file_content
Fileman:: transcode
Fileman:: upload_files
Ftp:: add_ftp
Ftp:: allows_anonymous_ftp
Ftp:: allows_anonymous_ftp_incoming
Ftp:: delete_ftp
Ftp:: ftp_exists
Ftp:: get_ftp_daemon_info
Ftp:: get_port
Ftp:: get_quota
Ftp:: get_welcome_message
Ftp:: kill_session
Ftp:: list_ftp
Ftp:: list_ftp_with_disk
Ftp:: list_sessions
Ftp:: passwd
Ftp:: server_name
Ftp:: set_anonymous_ftp
Ftp:: set_anonymous_ftp_incoming
Ftp:: set_homedir
Ftp:: set_quota
Ftp:: set_welcome_message
Integration:: fetch_url
LangPHP:: php_get_domain_handler
LangPHP:: php_get_impacted_domains
LangPHP:: php_get_installed_versions
LangPHP:: php_get_system_default_version
LangPHP:: php_get_vhost_versions
LangPHP:: php_ini_get_user_basic_directives
LangPHP:: php_ini_get_user_content
LangPHP:: php_ini_get_user_paths
LangPHP:: php_ini_set_user_basic_directives
LangPHP:: php_ini_set_user_content
LangPHP:: php_set_vhost_versions
LastLogin:: get_last_or_current_logged_in_ip
Locale:: get_attributes
Mailboxes:: expunge_mailbox_messages
Mailboxes:: expunge_messages_for_mailbox_guid
Mailboxes:: get_mailbox_status
Mailboxes:: has_utf8_mailbox_names
Mailboxes:: set_utf8_mailbox_names
Market:: cancel_pending_ssl_certificate
Market:: create_shopping_cart
Market:: get_all_products
Market:: get_certificate_status_details
Market:: get_login_url
Market:: get_pending_ssl_certificates
Market:: get_provider_specific_dcv_constraints
Market:: get_providers_list
Market:: get_ssl_certificate_if_available
Market:: process_ssl_pending_queue
Market:: request_ssl_certificates
Market:: set_status_of_pending_queue_items
Market:: set_url_after_checkout
Market:: validate_login_token
Mime:: add_handler
Mime:: add_hotlink
Mime:: add_mime
Mime:: add_redirect
Mime:: delete_handler
Mime:: delete_hotlink
Mime:: delete_mime
Mime:: delete_redirect
Mime:: list_handlers
Mime:: list_hotlinks
Mime:: list_mime
Mime:: list_redirects
Mime:: redirect_info
ModSecurity:: disable_all_domains
ModSecurity:: disable_domains
ModSecurity:: enable_all_domains
ModSecurity:: enable_domains
ModSecurity:: has_modsecurity_installed
ModSecurity:: list_domains
Mysql:: add_host
Mysql:: add_host_note
Mysql :: check_database
Mysql:: create_database
Mysql:: create_user
Mysql:: delete_database
Mysql:: delete_host
Mysql:: delete_user
Mysql:: get_host_notes
Mysql:: get_privileges_on_database
Mysql:: get_restrictions
Mysql:: get_server_information
Mysql:: locate_server
Mysql:: rename_database
Mysql:: rename_user
Mysql:: repair_database
Mysql:: revoke_access_to_database
Mysql:: set_password
Mysql:: set_privileges_on_database
Notifications:: get_notifications_count
Parser:: firstfile_relative_uri
PassengerApps:: disable_application
PassengerApps:: edit_application
PassengerApps:: enable_application
PassengerApps:: list_applications
PassengerApps:: register_application
PassengerApps:: unregister_application
PasswdStrength:: get_required_strength
Postgresql:: create_database
Postgresql:: create_user
Postgresql:: delete_database
Postgresql:: get_restrictions
Postgresql:: grant_all_privileges
Postgresql:: rename_database
Postgresql:: rename_user
Postgresql:: rename_user_no_password
Postgresql:: revoke_all_privileges
Postgresql:: set_password
Pushbullet:: send_test_message
Quota:: get_quota_info
Resellers:: list_accounts
ResourceUsage:: get_usages
Session:: create_temp_user
SpamAssassin :: clear_spam_box
SpamAssassin:: get_symbolic_test_names
SpamAssassin:: get_user_preferences
SpamAssassin:: update_user_preference
SSH:: get_port
SSL:: add_autossl_excluded_domains
SSL:: check_shared_cert
SSL:: delete_cert
SSL:: delete_csr
SSL:: delete_key
SSL:: delete_ssl
SSL :: disable_mail_sni
SSL:: enable_mail_sni
SSL:: fetch_best_for_domain
SSL:: fetch_cert_info
SSL:: fetch_certificates_for_fqdns
SSL:: fetch_key_and_cabundle_for_certificate
SSL:: find_certificates_for_key
SSL:: find_csrs_for_key
SSL:: generate_cert
SSL:: generate_csr
SSL:: generate_key
SSL:: get_autossl_excluded_domains
SSL:: get_autossl_pending_queue
SSL:: get_autossl_problems
SSL:: get_cabundle
SSL:: get_cn_name
SSL:: install_ssl
SSL:: installed_host
SSL:: installed_hosts
SSL:: is_autossl_check_in_progress
SSL:: is_mail_sni_supported
SSL:: is_sni_supported
SSL:: list_certs
SSL:: list_csrs
SSL:: list_keys
SSL:: list_ssl_items
SSL:: mail_sni_status
SSL:: rebuild_mail_sni_config
SSL:: rebuildssldb
SSL:: remove_autossl_excluded_domains
SSL:: set_autossl_excluded_domains
SSL:: set_cert_friendly_name
SSL:: set_csr_friendly_name
SSL:: set_key_friendly_name
SSL:: set_primary_ssl
SSL:: set_ssl_share
SSL:: show_cert
SSL:: show_csr
SSL:: show_key
SSL:: start_autossl_check
SSL:: upload_cert
SSL:: upload_key
StatsBar:: get_stats
SubDomain:: addsubdomain
TwoFactorAuth:: generate_user_configuration
TwoFactorAuth:: get_user_configuration
TwoFactorAuth:: remove_user_configuration
TwoFactorAuth:: set_user_configuration
UserManager:: check_account_conflicts
UserManager:: create_user
UserManager:: delete_user
UserManager:: dismiss_user
UserManager:: edit_user
UserManager:: list_users
UserManager:: lookup_service_account
UserManager:: lookup_user
UserManager:: merge_service_account
UserManager:: unlink_service_account
WebmailApps:: listwebmailapps
WebVhost:: list_domains
WebVhost:: list_ssl_capable_domains
WordPressBackup:: any_running
WordPressBackup:: cancel
WordPressBackup:: cleanup
WordPressBackup:: get_available_backups
WordPressBackup:: is_running
WordPressBackup:: start
WordPressInstanceManager:: cancel_scan
WordPressInstanceManager:: cleanup_scan
WordPressInstanceManager:: change_admin_password
WordPressInstanceManager:: configure_autoupdate
WordPressInstanceManager:: get_api_version
WordPressInstanceManager:: get_instance_by_id
WordPressInstanceManager:: get_instances
WordPressInstanceManager:: get_latest_wordpress_version_from_wordpress_org
WordPressInstanceManager:: get_scan_results
WordPressInstanceManager:: is_installable_addon_available
WordPressInstanceManager:: start_scan
Description
This function retrieves a certificate signing request (CSR).
Examples
https://hostname.example.com:2083/cpsess##########/execute/SSL/show_csr?friendly_name=TestCSR
Note:
This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation.
$cpanel = new CPANEL(); // Connect to cPanel - only do this once. // Retrieve the CSR called TestCSR $SSL_show_csr = $cpanel->uapi( 'SSL', 'show_csr', array( 'friendly_name' => 'TestCSR', ) );
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once. # Retrieve the CSR called TestCSR my $SSL_show_csr = $cpliveapi->uapi( 'SSL', 'show_csr', { 'friendly_name' => 'TestCSR', } );
<!-- Retrieve the CSR called TestCSR --> [% data = execute( 'SSL', 'show_csr', { friendly_name => 'TestCSR'} ); %] [% FOREACH q = data %] <p> [% q %] </p> [% END %]
uapi --user=username SSL show_csr friendly_name=TestCSR
Notes:
- You must URI-encode values.
username
represents your account-level username.- For more information and additional output options, read our Guide to UAPI documentation or run the
uapi --help
command. If you run CloudLinux™, you must use the full path of the
uapi
command:/usr/local/cpanel/bin/uapi
{ "messages": null, "errors": null, "status": 1, "data": { "text": "Certificate Request:\n Data:\n Version: 0 (0x0)\n Subject: CN = example.com, C = US, emailAddress = username@example.com, O = Example, ST = Texas, L = Houston\n Subject Public Key Info:\n Public Key Algorithm: rsaEncryption\n Public-Key: (2048 bit)\n Modulus:\n 00:bf:44:22:cb:13:2b:7f:41:9f:48:85:d6:2c:77:\n 03:cf:84:db:90:5c:5a:ed:e5:9c:cb:d6:9d:4b:fc:\n 67:58:b7:db:71:dd:eb:8e:5a:77:6f:03:5d:96:85:\n 60:dc:91:45:59:85:ff:9e:57:76:a5:b5:cd:dc:48:\n 25:89:3f:8f:17:c1:c2:1e:4d:ec:f0:08:1a:a9:cc:\n 2d:45:34:be:82:77:a5:e4:bb:0b:82:bc:82:51:c3:\n ac:1b:ed:c3:a4:b3:e6:14:4f:ba:9e:39:af:08:ae:\n 3c:2c:15:bd:dc:03:17:93:01:95:4f:c0:2a:0f:3b:\n 46:5f:5e:6f:96:d5:b2:dd:53:22:a9:91:e4:36:8e:\n f2:60:5b:ca:b3:72:e6:be:53:8b:9e:b6:72:26:04:\n 85:37:f4:89:c1:78:91:7d:46:96:71:c4:be:39:f3:\n cc:1d:79:bc:33:61:5c:5f:76:52:4a:7d:d0:60:31:\n 79:96:44:6e:6a:77:72:70:1f:3f:08:24:e6:d1:50:\n c0:6a:86:98:df:56:8b:ae:2f:c1:97:bc:ed:4c:70:\n a1:a6:b2:7e:25:97:8f:95:73:a1:84:71:43:da:33:\n 48:d5:44:17:e1:28:1e:37:93:63:fa:ec:45:17:39:\n e5:ff:62:90:6b:b2:eb:11:5b:32:b2:ce:51:0b:8a:\n 3e:95\n Exponent: 65537 (0x10001)\n Attributes:\n a0:00\n Signature Algorithm: sha1WithRSAEncryption\n 41:bd:99:89:7a:1b:c2:71:90:f7:5a:17:05:c9:77:c8:f0:0e:\n 62:0f:85:0d:fb:16:02:74:34:5f:7a:93:3e:50:8e:cf:f4:6f:\n ee:ab:7b:c9:ef:7c:76:59:dd:85:fd:7d:4e:ac:95:9d:b7:ae:\n 8a:89:fc:1f:5b:ee:ee:6b:cd:9b:4e:2d:2a:fb:1b:32:8f:8f:\n 56:70:d1:42:c1:72:ed:04:4b:27:5a:ee:5a:e1:2b:6e:53:59:\n aa:14:25:87:7f:2b:c3:7a:f5:b2:6c:71:2a:93:62:40:ca:87:\n b4:fe:34:a1:95:77:1e:98:f1:71:5e:14:97:61:73:07:8d:bc:\n 3e:e1:f8:47:f7:00:8b:06:a5:1c:84:a3:88:9a:7b:37:74:5d:\n 34:a6:ae:22:ab:a3:b8:9f:d7:ab:60:9a:70:81:15:13:0f:d9:\n ff:ab:7a:2b:fd:cb:96:04:ad:00:6b:e4:74:4e:59:57:a5:9e:\n 84:c7:74:d8:62:08:37:b3:ee:cc:74:b2:b6:26:e8:c0:37:32:\n 19:dc:1c:ff:97:4a:cc:1c:36:c3:a7:2d:ca:77:53:c4:1d:1c:\n 3c:36:5b:f8:90:46:01:48:49:61:9b:ef:bb:b3:a8:94:0b:3f:\n 50:51:93:29:9f:aa:9a:ab:ae:3d:3c:72:8a:0b:bc:2f:3f:19:\n d7:5d:70:14\n", "csr": "-----BEGIN CERTIFICATE REQUEST------THE CERTIFICATE TEXT\n-----END CERTIFICATE REQUEST-----", "details": { "organizationalUnitName": null, "emailAddress": "username@example.com", "organizationName": "Example", "countryName": "US", "stateOrProvinceName": "Texas", "modulus": "a74f7636fa6ac93ee6836a83a995b55deb5019ea36d7ba3dafb00e38d693acdb0c81b2ff777d6b433a420fae523f127f352a68bcc8b8f2d6ee7b70395bafabd8237ada8164fdddf8376b30375c35d4d4cbcce7d33d08069c17b409176a3689f1ebc97c0b08fe6ae44c19a92ac6d68448e7f1d13f3b360affd4222a51b4f35342de99b5a1fb5548e438f2d824664562a448002eed7fce24dedc7dc3e1ed179973d1dae959b33716eeb410d172708954e00632cbf60a0e26419860c8c0bc285d6bfe4b479de0dd189772a5dae676bd2a92acccc1369821be8cffddd8a7e6ecc061f8a32a9ae0661e4e946ed8e3827b277138d3a76116567cbd129cbd869ef9dddf", "created": "1365633415", "domains": [ "example.com" ], "key_algorithm": "rsaEncryption", "commonName": "example.com", "localityName": "Houston", "friendly_name": "TestCSR", "id": "example_com_bf442_a3e95_54c3220946c8c495275386ec1728be3c" } } }
Note:
Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
id | string | The CSR's ID. | A valid string. | Click to view... example_com_e095f_0ab2f_ebcbe4a571276f48562241411556647f |
friendly_name | string | The CSR's friendly name. | A valid string. | TestCSR |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
text | string | The parsed information from the OpenSSL command-line tool. | A valid string. | Click to view... Certificate Request:\n Data:\n Version: 0 (0x0)\n Subject: CN = example.com, C = US, emailAddress = username@example.com, O = Example, ST = Texas, L = Houston\n |
csr | string | The CSR's text. | A valid CSR. | Click to view... -----BEGIN CERTIFICATE REQUEST----- MIIC3TCCAcUCAQAwgZcxFDASBgNVBAMMC2V4YW1wbGUuY29tMRYwFAYDVQQLDA1E b2N1bWVudGF0aW9uMQswCQYDVQQGEwJVUzEiMCAGCSqGSIb3DQEJARYTbGF1cmVu Y2VAY3BhbmVsLm5ldDEUMBIGA1UECgwLY1BhbmVsIEluYy4xDjAMBgNVBAgMBVRl eGFzMRAwDgYDVQQHDAdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEAp092NvpqyT7mg2qDqZW1XetQGeo217o9r7AOONaTrNsMgbL/d31rQzpC D65SPxJ/NSpovMi48tbue3A5W6+r2CN62oFk/d34N2swN1w11NTLzOfTPQgGnBe0 CRdqNonx68l8Cwj+auRMGakqxtaESOfx0T87Ngr/1CIqUbTzU0LembWh+1VI5Djy 2CRmRWKkSAAu7X/OJN7cfcPh7ReZc9Ha6VmzNxbutBDRcnCJVOAGMsv2Cg4mQZhg yMC8KF1r/ktHneDdGJdypdrmdr0qkqzMwTaYIb6M/93Yp+bswGH4oyqa4GYeTpRu 2OOCeydxONOnYRZWfL0SnL2Gnvnd3wIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEB AFlolzJbcviWcdZUv+PJ7G8cAqFAxa8a3W2a0Y1U0BaMrpDfuOHpQgOtO62rr+i+ hkrIReuk7Isyl6GoZkX17KhQ1Vo9aW8a8Ur7+0RGDbxRlK9jJWnvSFn6cMMqRSfA DXpptxhqBFZJIZMc3pPX9Jqycuu8bxeIvUKeSMe3Jxcl1ZXEXX47FeRZxvd+WXF9 4Xu4KZXHdzb5tB6jPhzIaN0/3d92N/KhvCcnw3YC2fEGDkpOlZaoa7O72+aq5K3b M1htFv9deAHqIHefV41iOrxUCIKIhdPIjvAm774lDHLzPpJVrshO/NpA74LEkny5 FMwKKx+6Jgx1HSWucn5kWek= -----END CERTIFICATE REQUEST----- |
details | hash | A hash of the CSR's contents. | This hash includes the organizationalUnitName, emailAddress, organizationName, countryName, stateOrProvinceName, modulus, created, domains, key_algorithm, commonName, friendly_name, and id returns. | |
| string | The CSR's organizational unit name. The function returns this value in the | A valid string. | Department |
| string | The CSR's email address. The function returns this parameter in the | A valid string. | username@example.com |
| string | The CSR's organization name. The function returns this value in the | A valid string. | Organization |
| string | The CSR's country name. The function returns this value in the | A valid two-letter ISO-3166 country code. | US |
| string | The CSR's state or province name. The function returns this value in the | A valid string. | Texas |
| string | The CSR's modulus. The function returns this value in the | A valid string. | Click to view...
|
| string | The CSR's creation date. The function returns this value in the | A date in Unix time format. | 1365633415 |
| string | The domains that the CSR covers. The function returns this value in the | A valid domain name or list of domains. | example.com |
| string | The key algorithm that encrypts the CSR. The function returns this value in the | A valid string. | rsaEncryption |
| string | The CSR's Common Name or Distinguished Name. The function returns this value in the | A valid string. | example.com |
| string | The CSR's friendly name. The function returns this value in the | A valid string. | TestCSR |
| string | The CSR's ID. The function returns this value in the | A valid string | Click to view... example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041 |
Function information
Module:
SSL
API Version:
Available in:
cPanel 11.42+
Methods:
GET, POST
Required Parameters:
id
or friendly_name
Return formats:
JSON, XML
Legacy Equivalents:
About this module
The SSL
module manages certificates, certificate requests, and keys on your server.
About UAPI
UAPI accesses and modifies data for cPanel accounts.
Notes:
- These functions may require specific features. To enable or disable features, use WHM's Feature Manager interface.
- Unless you call this API via the WHM API, you must use the appropriate cPanel ports (
2082
or2083
). You can also call some functions via cPanel's Webmail ports (2095
or2096
).
Find a function
Related functions
-
Page:Tutorial - Call UAPI's SSL::install_ssl Function in Custom Code — This tutorial creates custom code to call UAPI's
SSL::install_ssl
function. -
Page:UAPI Modules - Market — The
Market
module manages connections to cPanel Market providers. -
Page:UAPI Functions - Market::cancel_pending_ssl_certificate — This function cancels an order and removes the polling for a pending certificate.
-
Page:UAPI Functions - Market::create_shopping_cart — This function creates a shopping cart with which the system sends an order to the cPanel Store.
-
Page:UAPI Functions - Market::get_all_products — This function lists all products available through all enabled cPanel Market providers.