We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • WHM API 1 Functions - get_autossl_providers
Skip to end of metadata
Go to start of metadata

Description

This function lists available AutoSSL providers on the server.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_autossl_providers?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_autossl_providers?api.version=1
 Command Line
whmapi1 get_autossl_providers


Notes:

  • Unless otherwise noted, 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

 Output (JSON)
{
	"metadata": {
		"version": 1,
		"command": "get_autossl_providers",
		"reason": "OK",
		"result": 1

	},
	"data": {
		"payload": [{
				"module_name": "cPanel",
				"specs": {
					"SUPPORTS_ANCESTOR_DCV": 1,
					"DCV_METHODS": [
						"http",
						"dns"
					],
					"HTTP_DCV_MAX_REDIRECTS": 0,
					"MAX_DOMAINS_PER_CERTIFICATE": 1000,
					"AVERAGE_DELIVERY_TIME": 120,
					"RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK": 0,
					"DELIVERY_METHOD": "queue",
					"VALIDITY_PERIOD": 7776000,
					"SUPPORTS_WILDCARD": 0
				},
				"enabled": 1,
				"display_name": "cPanel (powered by Sectigo)"
			},
			{
				"specs": {
					"HTTP_DCV_MAX_REDIRECTS": 10,
					"DCV_METHODS": [
						"http",
						"dns"
					],
					"MAX_DOMAINS_PER_CERTIFICATE": 100,
					"SUPPORTS_ANCESTOR_DCV": 0,
					"VALIDITY_PERIOD": 7776000,
					"DELIVERY_METHOD": "api",
					"AVERAGE_DELIVERY_TIME": 5,
					"RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK": 50,
					"SUPPORTS_WILDCARD": 1
				},
				"display_name": "Let’s Encrypt™",
				"enabled": 0,
				"x_terms_of_service_accepted": 1,
				"module_name": "LetsEncrypt",
				"x_account_id": "https://acme-v01.api.letsencrypt.org/acme/reg/12345678",
				"x_terms_of_service": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf"

			}

		]

	}
}
 Output (XML)
<result>
    <data>
        <payload>
            <module_name>cPanel</module_name>
            <display_name>cPanel (powered by Sectigo)</display_name>
            <enabled>1</enabled>
            <specs>
               <SUPPORTS_ANCESTOR_DCV>1</SUPPORTS_ANCESTOR_DCV>
               <DCV_METHODS>
              	 <DCV_METHODS>http</DCV_METHODS>
         	      <DCV_METHODS>dns</DCV_METHODS>
               </DCV_METHODS>
               <HTTP_DCV_MAX_REDIRECTS>0,</HTTP_DCV_MAX_REDIRECTS>
               <MAX_DOMAINS_PER_CERTIFICATE>1000</MAX_DOMAINS_PER_CERTIFICATE>
               <AVERAGE_DELIVERY_TIME>120</AVERAGE_DELIVERY_TIME>
               <RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK>0</RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK>
               <DELIVERY_METHOD>queue</DELIVERY_METHOD>
               <VALIDITY_PERIOD>7776000</VALIDITY_PERIOD>               
            </specs>
        </payload>
        <payload>
            <module_name>LetsEnrypt</module_name>
            <display_name>Let's Encrypt</display_name>
            <specs>
               <HTTP_DCV_MAX_REDIRECTS>10</HTTP_DCV_MAX_REDIRECTS>
			   <DCV_METHODS>
               		<DCV_METHODS>http</DCV_METHODS>
			   		<DCV_METHODS>dns</DCV_METHODS>
			   </DCV_METHODS>
               <MAX_DOMAINS_PER_CERTIFICATE>100</MAX_DOMAINS_PER_CERTIFICATE>
               <SUPPORTS_ANCESTOR_DCV>0</SUPPORTS_ANCESTOR_DCV>
               <VALIDITY_PERIOD>7776000</VALIDITY_PERIOD>
               <DELIVERY_METHOD>api</DELIVERY_METHOD>
               <AVERAGE_DELIVERY_TIME>5</AVERAGE_DELIVERY_TIME>           <RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK>50</RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK>
            </specs>
			<x_account_id>https://acme-v01.api.letsencrypt.org/acme/reg/123456</x_account_id>
            <x_terms_of_service>https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf</x_terms_of_service>
            <x_terms_of_service_accepted>1</x_terms_of_service_accepted>
            <enabled>0</enabled>
        </payload>
    </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>get_autossl_providers</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
payloadarray of hashesThis array of hashes contains information about available AutoSSL providers.This array of hashes includes the module_name, display_name, and enabled returns and specs.

module_name

string

The AutoSSL provider module's name.

The function returns this value in the payload array of hashes.

A valid string.
cPanel

display_name

string

The AutoSSL provider module's display name.

The function returns this value in the payload array of hashes.

A valid string.

cPanel (powered by Sectigo)

enabled

Boolean

Whether the AutoSSL provider is enabled.

The function returns this value in the payload array of hashes.

  • 1 — Enabled.
  • 0 — Disabled.

1


specs

hash

The provider's specifications.

Note:

We added this hash in cPanel & WHM version 80.

The function returns this value in the payload array of hashes.

This hash includes the MAX_DOMAINS_PER_CERTIFICATE, SUPPORTS_ANCESTOR_DCV, HTTP_DCV_MAX_REDIRECTS, AVERAGE_DELIVERY_TIME, RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK, DELIVERY_METHODVALIDITY_PERIOD, and SUPPORTS_WILDCARD returns and the DCV_METHODS array.

MAX_DOMAINS_PER_CERTIFICATE

integer

The number of unique domains each certificate can contain.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

A positive integer.100

SUPPORTS_ANCESTOR_DCV

Boolean

Whether the successful Domain Control Validation (DCV) of a parent domain implies the success of a subdomain.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

  • 1 — The provider supports DCV.
  • 0 — The provider does not support DCV.
1

HTTP_DCV_MAX_REDIRECTS

Integer

The maximum number of redirections a domain can use and still pass an HTTP-based DCV.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

A valid integer.10

AVERAGE_DELIVERY_TIME

Integer

The amount of time that the provider requires to issue a certificate, in seconds.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

A valid integer.120

RATE_LIMIT_CERTIFICATES_PER_REGISTERED_DOMAIN_PER_WEEK

Integer

The maximum number of certificates that the provider will allow per domain in a week.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

A valid integer.50

DELIVERY_METHOD

string

The method that the provider uses to issue the certificate.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

  • queue — The provider delivers certificates through a download queue.
  • api — The provider delivers certificates through API calls.
queue

DCV_METHODS

array

The methods that the provider uses to validate the domain.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

A list of one or more of the following methods:

  • dns
  • http
http

VALIDITY_PERIOD

integer

The amount of time before the certificate expired, in seconds.

Note:

We added this return in cPanel & WHM version 80.

The function returns this value in the specs hash.

A valid integer.7776000

SUPPORTS_WILDCARD

Boolean

Whether the provider supports wildcard domains on an SSL certificate.

Note:

We added this return in cPanel & WHM version 88.

The function returns this value in the specs hash.

  • 1 — The provider supports wildcard domains.
  • 0 — The provider does not support wildcard domains.
1
x_account_idstring

The user's account profile URL at the provider.

Note:

The payload array of hashes may include additional returns which begin with the x_ prefix, depending on the AutoSSL provider module.

The function returns this value in the payload array of hashes.

A valid URL. https://acme-v01.api.letsencrypt.org/acme/reg/12345678
x_terms_of_servicestring

The URL of the provider's current terms of service.

Note:

If the terms of service available at the x_terms_of_service location is newer than the x_terms_of_service_accepted location, the system administrator will need to accept the new terms of service.

The payload array of hashes may include additional returns which begin with the x_ prefix, depending on the AutoSSL provider module.

The function returns this value in the payload array of hashes.

A valid URL. https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf
x_terms_of_service_acceptedBoolean

Whether the AutoSSL provider is enabled.

Note:

The payload array of hashes may include additional returns which begin with the x_ prefix, depending on the AutoSSL provider module.

The function returns this value in the payload array of hashes.

  • 1 — Enabled.
  • 0 — Not enabled.
1