Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation

List SSL Certificates — listcrts

This function will list all domains on the server that have SSL certificates installed.

Calling Functions

Using the XML API

To use the XML API to perform the listcrts function from within your custom script:

  • Append the /xml-api/listcrts function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/xml-api/listcrts

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Using the JSON API

To use the JSON API to perform the listcrts function from within your custom script:

  • Append the /json-api/listcrts function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/json-api/listcrts

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Variables

Input

None

Output

Show Hide

  • listcrts — Root-level XML tag for the output of the listcrts function.
    • crt (string) — Container for information about an individual certificate.
      • domain (string) — Name of the domain that has certificate information present on the server.

Examples

XML API

Show Hide

Calling https://example.com:2087/xml-api/listcrts in WebHost Manager will produce output similar to the following:

<listcrts>
     <crt>
            <domain>example.com</domain>
      </crt>
      <crt>
	    <domain>example2.com</domain>
      </crt>
      <crt>
	    <domain>example3.com</domain>
      </crt>
      <crt>
	    <domain>example4.com</domain>
      </crt>
</listcrts>

JSON API

Show Hide

Calling https://example.com:2087/json-api/listcrts in WebHost Manager will produce output similar to the following:

{
   "crt":[
      {
         "domain":"example.com"
      },
      {
         "domain":"example2.com"
      },
      {
         "domain":"example3.com"
      },
      {
         "domain":"example4.com"
      },
   ]
}

Topic revision: r5 - 29 Sep 2009 - 19:09:06 - MelanieSeibert