Child pages
  • Manage2 API Functions - Look Up License ID
Skip to end of metadata
Go to start of metadata

Description

This function returns an IP address's license ID.

Examples 


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLlookup.cgi?ip=127.0.0.1&packageid=123&all=1
JSON
https://manage2.cpanel.net/XMLlookup.cgi?output=json&ip=127.0.0.1&packageid=123&all=1
YAML
https://manage2.cpanel.net/XMLlookup.cgi?output=yaml&ip=127.0.0.1&packageid=123&all=1
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com", "12345luggage");
$lisc = (array) $cpl->fetchLicenseId(array(
	"ip" 		=> "127.0.0.1",
	"packageid"	=> "123",
	"all"		=> "1",
  )
);
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $licenseManager = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage'
my $liscid = $licenseManager->fetchLicenseId(
	'ip' 		=> '127.0.0.1',
	'packageid' => '123'
	'all'		=> '1'
);
 Output (JSON)
{  
   "status":1,
   "reason":"OK",
   "licenseid":"5388377",
   "licenseid":"5388378",
}
 Output (XML)
<XMLlookup reason="OK" status="1">
      <licenseid>5388377</licenseid>
      <licenseid>5388378</licenseid>
</XMLlookup>
 Output (YAML)
---
   "status":1,
   "reason":"OK",
   "licenseid":"5388377",
   "licenseid":"5388378",

Parameters

ParameterTypeDescriptionPossible valuesExample
ipstring

Required

The IP address.

A valid IP address.

172.0.0.1
packageidinteger

The package's ID.

This parameter defaults to an empty string.

A valid package ID.

123
allBoolean

Whether to return all of the licenses that are currently associated with the IP address.

This parameter defaults to 1.

  • 1 — Return all licenses.
  • 0 — Do not return all licenses.

0

Returns

ReturnTypeDescriptionPossible valuesExample
licenseidstringThe IP address's license ID.

A valid license ID.

5388377
reasonstring

Information about the package listing operation.

A string value.

 

OK
statusBooleanWhether the call succeeded.
  • 1 — Success.

  • 0 — Failure.
1
versionintegerInternal information that the Manage2 API uses to identify the version.

A numeric value.

0.3