Child pages
  • WHM API 1 Functions - get_autossl_providers

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description


Excerpt

This function lists available AutoSSL providers on the server.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/get_autossl_providers?api.version=1



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/get_autossl_providers?api.version=1



Expand
titleCommand Line


Code Block
languagebash
whmapi1 get_autossl_providers

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "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"
         }
      ]
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<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>



Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

     

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
titleNote:

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