Manage2 API Function - List License Information
Last modified: March 6, 2024
Description
This function returns a list of the Manage2 account’s licenses.
Examples
Browser-based calls
XML
https://manage2.cpanel.net/XMLlicenseInfo.cgi?expired=1&groupid=G001&maxage=2
JSON
https://manage2.cpanel.net/XMLlicenseInfo.cgi?output=json&expired=1&groupid=G001&maxage=2
YAML
https://manage2.cpanel.net/XMLlicenseInfo.cgi?output=yaml&expired=1&groupid=G001&maxage=2
cPanelLicensing PHP Class
Important:
If you use this method to call the function, you may need to increase your PHP memory limit.
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]","123456luggage");
$lisc = $cpl->fetchExpiredLicenses();
?>
cPanelLicensing Perl Module
Return expired licenses:
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "username\@example.com", pass => "123456luggage");
$cpl->fetchExpiredLicenses()
Return active licenses:
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "username\@example.com", pass => "123456luggage");
$cpl->fetchLicenses()
Return licenses for a group and package:
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => "username\@example.com", pass => "123456luggage");
my $response = $licenseManager->fetchLicenses(
'groupid' => '208850',
'package' => 'ExamplePackage'
);
Output (XML)
<XMLlicenseInfo reason="OK" status="1" version="0.7">
<licenses name="L10742947" adddate="1591995380" distro="Centos Enterprise 5.8" envtype="" expiredon="" expirereason="" groupid="208850" hostname="example.com" ip="192.0.2.0" licenseid="10742947" maxusers="30" os="Mac OS X" osver="10.9" packageid="761" producttype="1" status="1" updateexpiretime="" version="11.86.0.37"/>
</XMLlicenseInfo>
Output (JSON)
{
"version": 0.7,
"status": 1,
"reason": "OK",
"licenses": {
"L4921062": {
"adddate": "1591995380",
"distro": "Centos Enterprise 5.8",
"envtype": null,
"expiredon": null,
"expirereason": null,
"groupid": "208850",
"hostname": "example.com",
"ip": "192.0.2.0",
"licenseid": "10742947",
"ls_serial": "7oEU-TSz0-EG7v-iP/j",
"maxusers": "30",
"os": "Mac OS X",
"osver": "10.9",
"packageid": "761",
"producttype": "1",
"status": "1",
"updateexpiretime": null,
"version": "11.86.0.37"
}
}
}
Output (YAML)
---
version: 0.7
status: 1
reason: OK
licenses:
L4921062:
adddate: '1591995380'
distro: Centos Enterprise 5.8
envtype: ~
expiredon: ~
expirereason: ~
groupid: '208850'
hostname: example.com
ip: 192.0.2.0
licenseid: '10742947'
ls_serial: '7oEU-TSz0-EG7v-iP/j'
maxusers: '30'
os: Mac OS X
osver: '10.9'
packageid: '761'
producttype: '1'
status: '1'
updateexpiretime:
version: 11.86.0.37
Parameters
Important:
- You can call the
groupid
orgroup
parameters, but not both. - You can call the
package
orpackageid
parameters, but not both.
This function accepts the following parameters:
Parameter | Type | Description | Example |
---|---|---|---|
expired |
Boolean | Whether to return expired or active licenses:
Important:
Only pass this parameter when you call the function in a browser.
|
1 |
groupid |
string | The group ID for which to return a list of licenses. The Manage2 Display Groups function returns a list of possible values. If you do not use this parameter or the group parameter, the function returns licenses from all available groups. |
G001 |
group |
string | The group name for which to return a list of licenses. The Manage2 Display Groups function returns a list of possible values. If you do not use this parameter or the groupid parameter, the function returns licenses from all available groups. |
examplegroup |
liscid |
string | The ID of the license to return. | 6527118 |
maxage |
integer | The number of days of licenses to return:
null . |
7 |
packageid |
string | The package ID for which to return a list of licenses. The Manage2 List Package Information function returns a list of possible values. If you do not use this parameter or the package parameter, the function returns licenses from all available packages. |
P001 |
package |
string | The package name for which to return a list of licenses. The Manage2 List Package Information function returns a list of possible values. If you do not use this parameter or the packageid parameter, the function returns licenses from all available packages. |
ExamplePackage |
Returns
This function returns the following values:
Return | Type | Description | Example |
---|---|---|---|
licenses |
object | An object containing license information. | |
accounts |
integer | The number of active accounts. The function returns this value in the licenses object. |
30 |
activation_code |
string | The activation code for a license of the following type:
licenses object. |
ABC123-1Q2W3E-BMW555-V5F4R3-HJKL98 |
activation_link |
string | The activation link for a license of the following type:
licenses object. |
https://app.360monitoring.com/license/activate/ABC123-1Q2W3E-BMW555-V5F4R3-HJKL98 |
adddate |
integer | The date that the account added the license, in Unix format. The function returns this value in the licenses object. |
1591995380 |
addedby |
integer | The ID of the account that added the license. The function returns this value in the licenses object. |
297427 |
autoscale_package |
integer | The projected billing package’s ID. The function returns this value in the licenses object. |
4 |
distro |
string | The operating system distribution’s name. The function returns this value in the licenses object. |
Centos Enterprise 5.8 |
envtype |
string | The virtualization platform, if one exists.
licenses object. |
"" |
expiredon |
integer | The date on which the license expired:
licenses object. |
1594587380 |
expirereason |
string | The reason why the license expired.
licenses object. |
No payment received |
external_notes |
string | Additional information about the license:
license object. |
optional |
groupid |
integer | The license’s group ID. The function returns this value in the licenses object. |
0001 |
hostname |
string | The license’s server’s hostname. The function returns this value in the licenses object. |
example.com |
host_type |
string | The host type (virtual or dedicated) the license requires:
licenses object. |
virtual |
hosted_sites |
integer | The total number of hosted sites on a Sitejet Studio license. The function returns this value in the licenses object. |
1 |
ip |
string | The license’s server’s IP address. The function returns this value in the licenses object. |
192.0.2.0 |
ka_activated |
Boolean | For 360 Monitoring, koality, or Sitejet Studio licenses, this indicates whether a license is activated.
licenses object. |
0 |
keyid |
integer | The ID for a 360 Monitoring, koality, or Sitejet Studio license. The function returns this value in the licenses object. |
10669033 |
keynumber |
string | The number for a 360 Monitoring, koality, or Sitejet Studio license. The function returns this value in the licenses object. |
EXT.1000299.0000 |
licenseid |
string | The license’s ID. The function returns this value in the licenses object. |
10742947 |
ls_serial |
string | The serial number for activating LiteSpeed. If no LiteSpeed license exists for the account, the function will return a "" or null value. The function returns this value in the licenses object. |
7oEU-TSz0-EG7v-iP/j |
maxusers |
integer | The maximum number of accounts that the license allows. The function returns this value in the licenses object. |
30 |
os |
string | The license’s server’s operating system. The function returns this value in the licenses object. |
Mac OS X |
osver |
string | The operating system’s version number. The function returns this value in the licenses object. |
10.9 |
package_name |
string | The package’s name. The function returns this value in the licenses object. |
Sitejet Agency |
packageid |
integer | The license’s package ID. The function returns this value in the licenses object. |
761 |
packageqty |
integer | The number Enkompass accounts that ship with the license:
Important:
This return is deprecated. WebPros International, LLC no longer supports Enkompass.
licenses object. |
1 |
producttype |
integer | The product type ID:
licenses object. |
1 |
projects |
integer | The total number of projects for a koality license. The function returns this value in the licenses object. |
30 |
reason |
string | Information about the license display operation. The function returns this value in the licenses object. |
OK |
servers |
integer | The number of servers in the 360 Monitoring or WP Guardian license. The function returns this value in the licenses object. |
1 |
sites |
integer | The number of sites in the 360 Monitoring or WP Guardian license. The function returns this value in the licenses object. |
20 |
self_hosted_sites |
integer | The total number of self-hosted sites on a Sitejet license. The function returns this value in the licenses object. |
0 |
status |
integer | The license’s status:
licenses object. |
1 |
termexpires_months |
integer | The time remaining until the license expires, in months. The function returns this value in the licenses object. |
100 |
termexpires_unixtime |
integer | The date on which the license will expire:
licenses object. |
1594587380 |
updateexpiretime |
integer | The time at which the license will expire:
licenses object. |
1638244382 |
version |
string | The product’s version number.
licenses object. |
11.86.0.37 |
wpsites |
integer | For WP Squared licenses, the current number of WordPress® sites on the licensed server. The function returns this value in the licenses object. |
22 |
reason |
string | Information about the operation. | OK |
status |
Boolean | Whether the function succeeded:
|
1 |
version |
float | Internal information that the Manage2 API uses to identify the version. | 0.7 |