Manage2 API Function - Raw Lookup
Last modified: September 5, 2024
Description
This function returns a license’s information.
Examples
Browser-based calls
XML
https://manage2.cpanel.net/XMLRawlookup.cgi?ip=192.0.2.0&all=1
JSON
https://manage2.cpanel.net/XMLRawlookup.cgi?output=json&ip=192.0.2.0&all=1
YAML
https://manage2.cpanel.net/XMLRawlookup.cgi?output=yaml&ip=192.0.2.0&all=1
cPanelLicensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]", "123456luggage");
$result = $cpl->fetchLicenseRaw(array("ip" => "192.0.2.0"));
?>
cPanelLicensing Perl Module
use cPanelLicensing;
my $cpl = new cPanelLicensing(user => 'username\@example.com', pass => '123456luggage');
my $result = $licenseManager->fetchLicenseRaw(
'ip' => '192.0.2.0'
);
Output (XML)
<XMLRawlookup reason="OK" status="1">
<license adddate="0" company="Example Company" distro="" envtype="" expiredon="" expirereason="" groupid="218370" hostname="" ip="192.0.2.0" isenkompass="0" lastrequest="" lastrequest_unixtime="" licenseid="5388377" maxusers="" os="" osver="" package="148" packageqty="1" status="1" updateexpiretime="" valid="1" version="" external_notes="123456luggage"/>
<license adddate="0" company="Testing Company" distro="" envtype="" expiredon="" expirereason="" groupid="218370" hostname="" ip="198.51.100.0" isenkompass="0" lastrequest="" lastrequest_unixtime="" licenseid="5388378" maxusers="0" os="" osver="" package="6140" packageqty="1" status="1" updateexpiretime="" valid="1" version="" external_notes="123456luggage"/>
</XMLRawlookup>
Output (JSON)
{
"status": 1,
"reason": "OK",
"license": [{
"status": "1",
"ip": "52.52.89.18",
"hostname": null,
"os": null,
"valid": "1",
"expiredon": null,
"isenkompass": "1",
"groupid": "208850",
"company": "Example Company",
"packageqty": "10",
"adddate": "1411420392",
"licenseid": "8719562",
"expirereason": null,
"distro": null,
"version": null,
"maxusers": "5000",
"package": "1706",
"envtype": null,
"osver": null,
"updateexpiretime": null,
"external_notes": "123456luggage"
}]
}
Output (YAML)
|
|
Parameters
This function accepts the following parameters:
Parameter | Type | Description | Example |
---|---|---|---|
ip |
string | The cPanel & WHM license’s IP address. | 172.0.0.1 |
packageid |
integer | The license’s package ID. The Manage2 List Package Information function returns a list of possible values.
Important:
Supply the
packageid parameter to return 360 Monitoring licenses.
|
1 |
all |
Boolean | Whether to return all of the licenses for the specified IP address or packageid :
0 . |
0 |
Returns
This function returns the following values:
Return | Type | Description | Example |
---|---|---|---|
license |
object | A list of license information. | |
accounts |
integer | The number of active accounts. The function returns this value in the license object. |
30 |
adddate |
integer | The license’s add date, in Unix time format. The function returns this value in the license object. |
1591995380 |
autoscale_package |
integer | The projected billing package’s ID. The function returns this value in the license object. |
4 |
company |
string | The license’s company name. The function returns this value in the license object. |
Example Company |
distro |
string | The distribution name of the operating system. The function returns this value in the license object. |
UNIX® |
envtype |
string | The virtualization platform:
license object. |
null |
expiredon |
string | The license’s expiration date:
license object. |
2020-07-12 20:56:20 |
expirereason |
string | The reason why the license expired:
license object. |
null |
external_notes |
string | Additional information about the license:
license object. |
null |
groupid |
numeric | The license’s group ID. The function returns this value in the license object. |
0001 |
hostname |
string | The fully qualified domain name of the license’s server. The function returns this value in the license object. |
example.com |
host_type |
string | The host type (virtual or dedicated) the license requires:
license object. |
virtual |
hosted_sites |
integer | The total number of hosted sites on a Sitejet Studio license. The function returns this value in the license object. |
1 |
ip |
string | The license’s IP address. The function returns this value in the license object. |
192.0.2.0 |
licenseid |
string | The license’s ID. The function returns this value in the license object. |
10742947 |
os |
string | The operating system of the license’s server. The function returns this value in the license object. |
Linux |
osver |
string | The operating system’s version. The function returns this value in the license object. |
10.9 |
packageid |
string | The license’s package ID. The function returns this value in the license object. |
761 |
producttype |
integer | The product type ID:
license object. |
1 |
projects |
integer | The total number of projects for a koality license. The function returns this value in the license object. |
30 |
servers |
integer | The number of server monitors for a 360 Monitoring license. The function returns this value in the license object. |
1 |
sites |
integer | The number of site monitors for a 360 Monitoring license or sites for a WP Guardian license. The function returns this value in the license object. |
20 |
self_hosted_sites |
integer | The total number of self-hosted sites on a Sitejet Studio license. The function returns this value in the license object. |
1 |
updateexpiretime |
integer | The date after which the license will not receive updates:
license object. |
|
valid |
Boolean | Whether the license is valid:
Important:
This function only returns valid licenses.
license object. |
1 |
version |
string | The product’s version number. The function returns this value in the license object. |
11.86.0.37 |
wpcga_sites |
integer | The number of sites for a WP Guardian (cPanel Addon) license. The function returns this value in the license object. |
100 |
reason |
string | Information about the license lookup operation. The function returns this value in the license object. |
OK |
status |
Boolean | Whether the function succeeded:
|
1 |