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:

  • 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":{  
      "reason":"OK",
      "version":1,
      "result":1,
      "command":"get_autossl_providers"
   },
   "data":{  
      "payload":[  
         {  
            "display_name":"cPanel (powered by Sectigo)",
            "enabled":1,
            "module_name":"cPanel"
         },
         {  
            "display_name":"Let's Encrypt",
            "enabled":0,
            "x_terms_of_service":"https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf",
            "x_terms_of_service_accepted":"https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf",
            "module_name":"LetsEncrypt"
         }
      ]
   }
}
 Output (XML)
<result>
    <data>
        <payload>
            <module_name>cPanel</module_name>
            <display_name>cPanel (powered by Sectigo)</display_name>
            <enabled>1</enabled>
        </payload>
        <payload>
            <module_name>LetsEnrypt</module_name>
            <display_name>Let's Encrypt</display_name>
            <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>https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf</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. 

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

 

The payload array of hashes may include additional returns which begin with the x_ prefix, depending on the AutoSSL provider module. For example, the Let's Encrypt provider module returns the following: 

x_terms_of_service


string

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 function returns this value in the payload array of hashes.

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

x_terms_of_service_accepted

Boolean

The URL of the provider's current terms of service.Whether the AutoSSL provider is enabled.

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

A valid publicly-available URL.

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