Child pages
  • Manage2 API Functions - Raw Lookup
Skip to end of metadata
Go to start of metadata

Description


This function returns an IP address's license information.

Examples 


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLRawlookup.cgi?ip=127.0.0.1&all=1
JSON
https://manage2.cpanel.net/XMLRawlookup.cgi?output=json&ip=127.0.0.1&all=1
YAML
https://manage2.cpanel.net/XMLRawlookup.cgi?output=yaml&ip=127.0.0.1&all=1
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com", "12345luggage");
$result = $cpl->fetchLicenseRaw(array("ip" => "127.0.0.1"));
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $cpl = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage');
my $result = $licenseManager->fetchLicenseRaw(
	'ip' => '127.0.0.1'
);
 Output (JSON)
{  
   "status":1,
   "reason":"OK",
   "license":[  
      {  
         "status":"1",
         "ip":"52.52.89.18",
         "hostname":,
         "os":null,
         "valid":"1",
         "expiredon":," "
         "isenkompass":"1",
         "groupid":"208850",
         "company":"Mosbius Designs",
         "packageqty":"10",
         "adddate":"1411420392",
         "licenseid":"8719562",
         "expirereason":null,
         "distro":null,
         "version":null,
         "maxusers":"5000",
         "package":"1706",
         "envtype":null,
         "osver":null,
         "updateexpiretime":null
      }
   ]
}
 Output (XML)
<XMLRawlookup reason="OK" status="1">
      <license adddate="0" company="Mosbius Designs" distro="" envtype="" expiredon="" expirereason="" groupid="218370" hostname="" ip="127.0.0.1" isenkompass="0" lastrequest="" lastrequest_unixtime="" licenseid="5388377" maxusers="" os="" osver="" package="148" packageqty="1" status="1" updateexpiretime="" valid="1" version=""/>
      <license adddate="0" company="Testing Company" distro="" envtype="" expiredon="" expirereason="" groupid="218370" hostname="" ip="127.0.0.1" isenkompass="0" lastrequest="" lastrequest_unixtime="" licenseid="5388378" maxusers="0" os="" osver="" package="6140" packageqty="1" status="1" updateexpiretime="" valid="1" version=""/>
  </XMLRawlookup>
 Output (YAML)
---
license: 
 - 
 adddate: 0
 company: Mosbius Designs
 distro: cloudlinux enterprise 6.5
 envtype: xen
 expiredon: ~
 expirereason: ~
 groupid: 470
 hostname: example.exampledomain.com
 ip: 127.0.0.1
 isenkompass: 0
 licenseid: 
 maxusers: 0
 os: Linux
 osver: 
 package: 
 packageqty: 1
 status: 1
 updateexpiretime: ~
 valid: 1
 version: 
 -

Parameters

ParameterTypeDescriptionPossible valuesExample
ipstring

Required

The license's IP address.

A valid IP address.

172.0.0.1
packageidinteger

The license's package ID.

This parameter defaults to an empty string.

A valid package ID.

The List Package Information function returns a list of possible values.

1
allBoolean

Whether to return all of the licenses for the specified IP address.

This parameter defaults to 1.

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

0

Returns

ReturnTypeDescriptionPossible valuesExample
licensehashA hash of license information.

This hash includes the adddate, company, distro, envtype, expiredon, expirereason, groupid, hostname, ip, licenseid, os, osver, packageid, reason, status, updateexpiretime, valid, and version returns.

 

adddate

integer

The license's add date.

The function returns this value in the license hash.

A date in Unix time format.

1392915885

company

string

The license's company name.

The function returns this value in the license hash.

A string value.

Mosbius Designs

distro

string

The distribution of the operating system.

The function returns this value in the license hash.

An operating system distribution name.UNIX®

envtype

string

The virtualization platform.

The function returns this value in the license hash.

  • A distribution platform name.
  • An empty string or null — A virtualization platform does not exist.
null

expiredon

integer

The license's expiration date.

The function returns this value in the license hash.

  • An empty string.
  • null

 

null

expirereason

string

The reason why the license expired.

The function returns this value in the license hash.

  • An empty string.
  • null

 

null

groupid

string

The license's group ID.

The function returns this value in the license hash.

A string value.0001

hostname

string

The fully qualified domain name of the license's server.

The function returns this value in the license hash.

A fully qualified domain name.example.com

ip

string

The license's IP address.

The function returns this value in the license hash.

A valid IP address.127.0.0.1

licenseid

string

The license's ID.

The function returns this value in the license hash.

A string value. 10742947

os

string

The operating system of the license's server.

The function returns this value in the license hash.

An operating system. Linux

osver

string

The operating system's version.

The function returns this value in the license hash.

An operating system version.10.9

packageid

string

The license's package ID.

The function returns this value in the license hash.

A valid package ID. 761

reason

string

Information about the license lookup operation.

The function returns this value in the license hash.

A string value.OK

status

Boolean

Whether the license is active.

The function returns this value in the license hash.

  • 1 — Active license.
  • 0 — Inactive.

    Important:

    The function only returns active licenses.

1

updateexpiretime

integer

The date after which the license will not receive updates.

The function returns this value in the license hash.

  • An empty string.
  • null

null

 

valid

Boolean

Whether the license is valid.

The function returns this value in the license hash.

  • 1 — Active license.
  • 0 — Inactive license.

    Important:

    The function only returns active licenses.

1

version

integer

Internal information that the Manage2 API uses to identify the version.

The function returns this value in the license hash.

A numeric value.0.3