Manage2 API Function - Raw Lookup


Last modified: March 6, 2024

Description

This function returns a license’s information.

Examples

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

<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]", "123456luggage");
$result = $cpl->fetchLicenseRaw(array("ip" => "192.0.2.0"));
?>

use cPanelLicensing;
my $cpl = new cPanelLicensing(user => 'username\@example.com', pass => '123456luggage');
my $result = $licenseManager->fetchLicenseRaw(
    'ip' => '192.0.2.0'
);

<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>

{
   "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"
   }]
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
status: 1
reason: OK
license:
- status: '1'
  ip: 52.52.89.18
  hostname: ~
  os: ~
  valid: '1'
  expiredon: ~
  isenkompass: '1'
  groupid: '208850'
  company: Example Company
  packageqty: '10'
  adddate: '1591995380'
  licenseid: '8719562'
  expirereason: ~
  distro: ~
  version: ~
  maxusers: '5000'
  package: '1706'
  envtype: ~
  osver: ~
  updateexpiretime: ~
  external_notes: testlicense

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.

This parameter defaults to an empty string.
1
all Boolean Whether to return all of the licenses for the specified IP address or packageid:
  • 1 — Return all licenses.
  • 0 — Do not return all licenses.
This parameter defaults to 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:
  • A distribution platform name.
  • "" or null — A virtualization platform does not exist.
The function returns this value in the license object.
null
    expiredon string The license’s expiration date:
  • An expiration date.
  • "" or null — The license has not expired.
The function returns this value in the license object.
2020-07-12 20:56:20
    expirereason string The reason why the license expired:
  • A string value.
  • "" or null — The license has not expired.
The function returns this value in the license object.
null
    external_notes string Additional information about the license:
  • A string up to 64 characters.
  • "" or null — No external notes exist.
The function returns this value in the 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:
  • virtual
  • dedicated
The function returns this value in the 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:
  • 1 — cPanel/WHM
  • 2 — Enkompass
  • 4 — RESERVED
  • 8 — SiteZen
  • 16 — CloudLinux
  • 32 — KernelCare
  • 64 — DNSOnly
  • 128 — LiteSpeed
  • 256 — Imunify360
  • 512 — WHMCS
  • 1024 — JetBackup
  • 524288 — 360 Monitoring
  • 2097152 — koality
  • 8388608 — WP Guardian
  • 16777216 — Sitejet Studio
The function returns this value in the package 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:
  • A date.
  • null — The license does not expire.
The function returns this value in the license object.
    valid Boolean Whether the license is valid:
  • 1 — Valid license.
Important:
This function only returns valid licenses.
The function returns this value in the license object.
1
    version string The product’s version number.

The function returns this value in the license object.
11.86.0.37
    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 — Success.
  • 0 — Failure.
1

Additional Documentation