Manage2 API Function - Look Up a License ID

Last modified: August 11, 2023


Description

This function returns an IP address’s license ID.

Examples

XML

https://manage2.cpanel.net/XMLlookup.cgi?ip=192.0.2.0&packageid=123&all=1

JSON

https://manage2.cpanel.net/XMLlookup.cgi?output=json&ip=192.0.2.0&packageid=123&all=1

YAML

https://manage2.cpanel.net/XMLlookup.cgi?output=yaml&ip=192.0.2.0&packageid=123&all=1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]", "123456luggage");
$lisc = (array) $cpl->fetchLicenseId(array(
    "ip"        => "192.0.2.0",
    "packageid" => "123",
    "all"       => "1",
  )
);
?>

1
2
3
4
5
6
7
use cPanelLicensing;
my $licenseManager = new cPanelLicensing(user => 'username\@example.com', pass => '123456luggage'
my $liscid = $licenseManager->fetchLicenseId(
    'ip'        => '192.0.2.0',
    'packageid' => '123'
    'all'       => '1'
);

1
2
3
4
<XMLlookup reason="OK" status="1">
      <licenseid>5388377</licenseid>
      <licenseid>5388378</licenseid>
</XMLlookup>

1
2
3
4
5
6
{
    "status": 1,
    "reason": "OK",
    "licenseid": "5388377",
    "licenseid": "5388378"
}

1
2
3
4
5
---
status: 1
reason: OK
licenseid: '5388378',
licenseid: '5388378'

Parameters

This function accepts the following parameters:

Return Type Description Example
ip string Required
The IP address.
192.0.2.0
packageid integer The package’s ID.

This parameter defaults to an empty string.
123
all Boolean Whether to return all of the licenses that are currently associated with the IP address.
  • 1 — Return all licenses.
  • 0 — Do not return all licenses.
The parameter defaults to 0.
0

Returns

This function returns the following values:

Return Type Description Example
licenseid string The IP address’s license ID. 5388377
reason string Information about the package listing operation. OK
status Boolean Whether the call succeeded:
  • 1 — Success.
  • 0 — Failure.
1
version integer Internal information that the Manage2 API uses to identify the version. 0.3

Additional Documentation