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

 

Description

This function returns the contents of an AutoSSL log file.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_autossl_log?api.version=1&start_time=2016-06-09T13:58:13Z
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_autossl_log?api.version=1&start_time=2016-06-09T13:58:13Z
 Command Line
whmapi1 get_autossl_log api.version=1 start_time=2016-06-09T13:58:13Z


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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "data":{  
      "payload":[  
         {  
            "type":"out",
            "timestamp":"2016-06-09T13:58:13Z",
            "pid":29189,
            "indent":0,
            "contents":"This system has AutoSSL set to use "cPanel (powered by Comodo)".",
            "partial":0
         },
         {  
            "type":"out",
            "indent":0,
            "contents":"Checking "example"'s websites ...",
            "partial":0,
            "timestamp":"2016-06-09T13:58:13Z",
            "pid":29189
         },
         {  
            "type":"out",
            "partial":0,
            "indent":1,
            "contents":""example"'s website "example.com" has no SSL certificate. AutoSSL will attempt to obtain one and install it.",
            "pid":29189,
            "timestamp":"2016-06-09T13:58:13Z"
         },
         {  
            "type":"warn",
            "pid":29189,
            "timestamp":"2016-06-09T13:58:13Z",
            "partial":0,
            "contents":"The domain "example.com" has failed domain control validation ("example.com" does not resolve to any IPv4 addresses on the internet.). at /usr/local/cpanel/bin/autossl_check line 343.",
            "indent":1
         },
         {  
            "type":"warn",
            "partial":0,
            "indent":1,
            "contents":"The domain "www.example.com" has failed domain control validation ("www.example.com" does not resolve to any IPv4 addresses on the internet.). at /usr/local/cpanel/bin/autossl_check line 343.",
            "pid":29189,
            "timestamp":"2016-06-09T13:58:13Z"
         },
         {  
            "type":"out",
            "indent":0,
            "contents":"The system has completed "example"'s AutoSSL check.",
            "partial":0,
            "timestamp":"2016-06-09T13:58:13Z",
            "pid":29189
         },
         {  
            "type":"out",
            "indent":0,
            "contents":"\nThe system has finished checking 16 users.",
            "partial":0,
            "timestamp":"2016-06-09T13:58:26Z",
            "pid":29189
         }
      ]
   },
   "metadata":{  
      "version":1,
      "result":1,
      "reason":"OK",
      "command":"get_autossl_log"
   }
}
 Output (XML)
<result>
    <metadata>
        <result>1</result>
        <reason>OK</reason>
        <version>1</version>
        <command>get_autossl_log</command>
    </metadata>
    <data>
        <payload>
            <contents>
                This system has AutoSSL set to use &#x201C;cPanel (powered by Comodo)&#x201D;.
            </contents>
            <type>out</type>
            <indent>0</indent>
            <partial>0</partial>
            <timestamp>2016-06-09T13:58:13Z</timestamp>
            <pid>29189</pid>
        </payload>
        <payload>
            <contents>Checking &#x201C;example&#x201D;&#x2019;s websites &#x2026;</contents>
            <timestamp>2016-06-09T13:58:13Z</timestamp>
            <indent>0</indent>
            <partial>0</partial>
            <type>out</type>
            <pid>29189</pid>
        </payload>
        <payload>
            <contents>
                &#x201C;example&#x201D;&#x2019;s website &#x201C;example.com&#x201D; has no SSL certificate. AutoSSL will attempt to obtain one and install it.
            </contents>
            <type>out</type>
            <timestamp>2016-06-09T13:58:13Z</timestamp>
            <indent>1</indent>
            <partial>0</partial>
            <pid>29189</pid>
        </payload>
        <payload>
            <pid>29189</pid>
            <type>warn</type>
            <partial>0</partial>
            <timestamp>2016-06-09T13:58:13Z</timestamp>
            <indent>1</indent>
            <contents>
                The domain &#x201C;example.com&#x201D; has failed domain control validation (&#x201C;example.com&#x201D; does not resolve to any IPv4 addresses on the internet.). at /usr/local/cpanel/bin/autossl_check line 343.
            </contents>
        </payload>
        <payload>
            <contents>
                The domain &#x201C;www.example.com&#x201D; has failed domain control validation (&#x201C;www.example.com&#x201D; does not resolve to any IPv4 addresses on the internet.). at /usr/local/cpanel/bin/autossl_check line 343.
            </contents>
            <pid>29189</pid>
            <partial>0</partial>
            <timestamp>2016-06-09T13:58:13Z</timestamp>
            <indent>1</indent>
            <type>warn</type>
        </payload>
        <payload>
            <pid>29189</pid>
            <timestamp>2016-06-09T13:58:13Z</timestamp>
            <partial>0</partial>
            <indent>0</indent>
            <type>out</type>
            <contents>
                The system has completed &#x201C;example&#x201D;&#x2019;s AutoSSL check.
            </contents>
        </payload>
        <payload>
            <contents>The system has finished checking 1 user.</contents>
            <type>out</type>
            <indent>0</indent>
            <timestamp>2016-06-09T13:58:26Z</timestamp>
            <partial>0</partial>
            <pid>29189</pid>
        </payload>
    </data>
</result>


Note:

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

     

Parameters

ReturnTypeDescriptionPossible valuesExample

start_time

string

Required

When the system created the log file.

A time value, in ISO-8601 format.
2016-06-09T14:25:37Z


Returns

ReturnTypeDescriptionPossible valuesExample
payloadarray of hashesAn array of hashes that contains information from an AutoSSL log. This array of hashes includes the type, timestamp, pid, indent, contents, and partial returns. 

type

string

The type of log file entry.

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

  • out — WHM's Manage AutoSSL interface represents this entry as info.
  • warn
  • success
  • failure
 out

timestamp

string

When the system created the log file entry.

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

A time value, in ISO-8601 format.
2016-06-09T14:25:37Z

pid

integer

The process ID under which the command in the log entry ran.

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

A valid integer.29189

indent

integer

The level of indentation to display.

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

A valid non-negative integer.0

contents

string

When the system created the log file.

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

A valid string.
This system has AutoSSL set to use “cPanel (powered by Comodo)”.\n

partial

Boolean

We do not currently use this return.

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

0 is the only possible value.0