You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

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

Description


This function returns the list of the latest Domain Control Validation (DCV) problems for a cPanel user.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_autossl_problems_for_user?api.version=1&username=username
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_autossl_problems_for_user?api.version=1&username=username
 Command Line
whmapi1 get_autossl_problems_for_user username=username


Notes:

  • Unless otherwise noted, 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",
		"command": "get_autossl_problems_for_user",
		"result": 1,
		"version": 1
	},
	"data": {
		"problems_by_domain": [{
				"domain": "doesnotexist.example.com",
				"log": "2017-09-07T03:51:01Z",
				"problem": "“doesnotexist.example.com“ does not resolve to any IPv4 addresses on the internet.",
				"time": "2017-08-12T21:02:56Z"
			},
			{
				"domain": "mail.example.com",
				"log": "2017-09-07T03:51:01Z",
				"problem": "“mail.example.com“ does not resolve to any IPv4 addresses on the internet.",
				"time": "2017-08-12T21:02:56Z"
			}
		]
	}
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <reason>OK</reason>
        <command>get_autossl_problems_for_user</command>
    </metadata>
	<data>
		<problems_by_domain>
			<domain>doesnotexist.example.com</domain>
			<log>2017-09-07T03:51:01Z</log>
			<problem>"doesnotexist.example.com" does not resolve to any IPv4 addresses on the internet.</problem>
			<time>2017-08-12T21:02:56Z</time>
		</problems_by_domain>
		<problems_by_domain>
			<domain>mail.example.com</domain>
			<log>2017-09-07T03:51:01Z</log>
			<problem>"mail.example.com" does not resolve to any IPv4 addresses on the internet.</problem>
			<time>2017-08-12T21:02:56Z</time>
		</problems_by_domain>
	</data>
</result>


Note:

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

Parameters

Parameter
Type
Description
Possible values
Example
usernamestring

Required

The user for whom to poll the DCV status.

A username of an account that the server owns.

username


Returns

ReturnTypeDescriptionPossible valuesExample
problems_by_domain
array of hashesAn array of hashes that contain information about DCV problems for each domain.This array of hashes includes the domain , problem, and time returns.

domain

string

The domain's name.

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

A valid domain on the server.doesnotexist.example.com

log

string

The log file of the last run in the /var/cpanel/logs/autossl/ directory.

This function returns this value in the problems_by_domain array of hashes.

A time value, in  ISO-8601  format.2017-09-07T03:51:01Z

problem

string

The human readable explanation of the DCV problem.

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

Note:

The system does not localize this return.

A valid string."doesnotexist.example.com” does not resolve to any IPv4 addresses on the internet.

time

string

The last run time of the AutoSSL queue.

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

A time value, in ISO-8601 format.
2017-08-12T21:02:56Z