Child pages
  • WHM API 1 Functions - get_autossl_log

Versions Compared

Key

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

Description


Excerpt

This function returns the contents of an AutoSSL log file.


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_log?api.version=1&start_time=2016-06-09T13:58:13Z



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/get_autossl_log?api.version=1&start_time=2016-06-09T13:58:13Z



Expand
titleCommand Line


Code Block
languagebash
whmapi1 get_autossl_log api.version=1 start_time=2016-06-09T13:58:13Z

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "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 Sectigo)".",
            "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"
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<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 Sectigo)&#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>



Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

     

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 Sectigo)”.\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