Child pages
  • Manage2 API Functions - Look Up License ID

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function returns an IP address's license ID.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleBrowser-based Calls


Code Block
languagetext
titleXML
https://manage2.cpanel.net/XMLlookup.cgi?ip=127.0.0.1&packageid=123&all=1


Code Block
languagetext
titleJSON
https://manage2.cpanel.net/XMLlookup.cgi?output=json&ip=127.0.0.1&packageid=123&all=1


Code Block
languagetext
titleYAML
https://manage2.cpanel.net/XMLlookup.cgi?output=yaml&ip=127.0.0.1&packageid=123&all=1



Expand
titlecPanel Licensing PHP Class


Code Block
languagephp
linenumberstrue
<?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",
  )
);
?>



Expand
titlecPanel Licensing Perl Module


Code Block
languageperl
linenumberstrue
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'
);



Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "status":1,
   "reason":"OK",
   "licenseid":"5388377",
   "licenseid":"5388378",
}



Expand
titleOutput (XML)


Code Block
languagexml
linenumberstrue
<XMLlookup reason="OK" status="1">
      <licenseid>5388377</licenseid>
      <licenseid>5388378</licenseid>
</XMLlookup>



Expand
titleOutput (YAML)


Code Block
languagetext
linenumberstrue
---
   "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