Manage2 API Function - List License Information

Last modified: September 5, 2024


Description

This function returns a list of the Manage2 account’s licenses.

Examples

XML

https://manage2.cpanel.net/XMLlicenseInfo.cgi?expired=1&groupid=G001&maxage=2&els=1

JSON

https://manage2.cpanel.net/XMLlicenseInfo.cgi?output=json&expired=1&groupid=G001&maxage=2&els=1

YAML

https://manage2.cpanel.net/XMLlicenseInfo.cgi?output=yaml&expired=1&groupid=G001&maxage=2&els=1

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", "1");
$lisc = $cpl->fetchExpiredLicenses();
?>

Return expired licenses:

use cPanelLicensing;
    my $cpl = cPanelLicensing->new(user => "username\@example.com", pass => "123456luggage", els => "1");
    $cpl->fetchExpiredLicenses()

Return active licenses:

use cPanelLicensing;
    my $cpl = cPanelLicensing->new(user => "username\@example.com", pass => "123456luggage", els => "1");
    $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',
    'els' => "1",
);

<XMLlicenseInfo reason="OK" status="1" version="0.7">
  <licenses name="L1234567" accounts="1" activation_code="" activation_link="" adddate="1616051708" addedby="98765" distro="centos 7" envtype="kvm" expiredon="" expirereason="" external_notes="" groupid="89876" host_type="virtual" hostname="somehost.example.com" ip="1.100.33.22" ka_activated="0" keyid="" keynumber="" licenseid="1234567" ls_serial="" maxusers="5" os="Linux" osver="3.10.0-1160.6.1.el7.x86_64" package_name="cPanel Admin Cloud" packageid="21159" packageqty="1" producttype="1" status="1" termexpires_months="" termexpires_unixtime="" updateexpiretime="" version="11.110.0.33" wpg_sites="" wpsites="">
  <extended_lifecycle_support fee_factor="0.1" subject_to_fee="1" />
  </licenses>
</XMLlicenseInfo>

{
  "licenses" : {
     "L1234567" : {
        "accounts" : 2,
        "activation_code" : null,
        "activation_link" : null,
        "adddate" : 1616051708,
        "addedby" : 101,
        "distro" : "centos 7",
        "envtype" : "kvm",
        "expiredon" : null,
        "expirereason" : null,
        "extended_lifecycle_support" : {
           "fee_factor" : "0.1",
           "subject_to_fee" : 1
        },
        "external_notes" : null,
        "groupid" : 89876,
        "host_type" : "virtual",
        "hostname" : "somehost.example.com",
        "ip" : "11.33.22.11",
        "ka_activated" : 0,
        "keyid" : null,
        "keynumber" : null,
        "licenseid" : 1234567,
        "ls_serial" : null,
        "maxusers" : "5",
        "os" : "Linux",
        "osver" : "3.10.0-1160.6.1.el7.x86_64",
        "package_name" : "cPanel Admin Cloud",
        "packageid" : 21159,
        "packageqty" : 1,
        "producttype" : 1,
        "status" : 1,
        "termexpires_months" : null,
        "termexpires_unixtime" : null,
        "updateexpiretime" : null,
        "version" : "11.110.0.33",
        "wpg_sites" : null,
        "wpsites" : null
     }
  },
  "reason" : "OK",
  "status" : 1,
  "version" : 0.7
}

---
version: 0.7
status: 1
reason: OK
licenses:
  L4921062:
    adddate: '1591995380'
    distro: Centos Enterprise 5.8
    envtype: ~
    expiredon: ~
    expirereason: ~
    extended_lifecycle_support:
       fee_factor : 0.1
       subject_to_fee : 1
    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 or group parameters, but not both.
  • You can call the package or packageid parameters, but not both.

This function accepts the following parameters:

Parameter Type Description Example
els Boolean Whether to return the extended_lifecycle_support object:
  • 1 — Return extended lifecycle support information.
  • 0 — Do not return extended lifecycle support information.
This parameter defaults to 0.
0
expired Boolean Whether to return expired or active licenses:
  • 1 — Return expired licenses.
  • 0 — Return 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:
  • A valid integer.
  • null or 1 — An unlimited list of licenses.
This parameter defaults to 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:
  • 360 Monitoring
  • koality
  • Sitejet Commerce
  • Sitejet Studio
  • WP Guardian
  • WP Guardian (cPanel Addon)
  • XOVI NOW

The function returns this value in the licenses object.
ABC123-1Q2W3E-BMW555-V5F4R3-HJKL98
    activation_link string The activation link for a license of the following type:
  • 360 Monitoring
  • koality
  • Sitejet Commerce
  • Sitejet Studio
  • WP Guardian
  • WP Guardian (cPanel Addon)
  • XOVI NOW
Note:
WP Guardian (cPanel Addon) licenses always return a blank string as the activation_link value.
The function returns this value in the 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.
AlmaLinux 8.9
    envtype string The virtualization platform, if one exists.
  • A distribution platform name.
  • "" or null — No virtualization platform.
The function returns this value in the licenses object.
""
    expiredon integer The date on which the license expired:
  • A timestamp, in Unix format.
  • "" or null — The license is active.
The function returns this value in the licenses object.
1594587380
    expirereason string The reason why the license expired.
  • A string value.
  • "" or null — The license is active.
The function returns this value in the licenses object.
No payment received
    extended_lifecycle_support object An object containing information about the Extended Lifecycle Support (ELS) fee.
The function returns this value in the licenses object.
        fee_factor string The percentage of the base license cost used to calculate the Extended Lifecycle Support (ELS) fee:
  • A decimal —  The percentage used to calculate the ELS fee. For example, a value of 0.2 means that the ELS fee is calculated as 20% of the base license cost.
  • 0 —  The ELS fee is currently $0.
Important:
The ELS fee can increase over time.
The function returns this value in the extended_lifecycle_support object.
0.2
        subject_to_fee integer Whether the license is subject to the Extended Lifecycle Support (ELS) fee:
  • 0 — Not subject to the ELS fee.
  • 1 — Subject to the ELS fee.
The function returns this value in the extended_lifecycle_support object.
1
    external_notes string Additional information about the license:
  • A string up to 64 characters.
  • "" or null — No external notes exist.
The function returns this value in the 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:
  • virtual
  • dedicated
The function returns this value in the 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.
  • 0 — Not activated.
  • 1 — Activated.
The function returns this value in the 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:
  • 1 — 500 Enkompass accounts.
Important:
This return is deprecated. WebPros International, LLC no longer supports Enkompass.
The function returns this value in the licenses object.
1
    producttype integer The product type ID:
  • 1 — cPanel & WHM
  • 2 — Enkompass
  • 4 — RESERVED
  • 8 — SiteZen
  • 16 — CloudLinux™
  • 32 — KernelCare
  • 64 — DNSOnly
  • 128 — LiteSpeed Web Server
  • 256 — Imunify360
  • 512 — WHMCS
  • 1024 — JetBackup
  • 524288 — 360 Monitoring
  • 2097152 — koality
  • 8388608 — WP Guardian
  • 268435456 — Sitejet Commerce
  • 16777216 — Sitejet Studio
  • 33554432 — XOVI NOW
  • 67108864 — WP Guardian (cPanel Addon)
The function returns this value in the licenses object.
1
     products_included string The total number of products you can display in the web stores you create with a Sitejet Commerce license. One of:
  • 100
  • 2500
  • unlimited

The function returns this value in the licenses object.
100
    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:
  • 1 — Active.
  • 2 — Expired.
  • 4 — Suspended.
The function returns this value in the 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:
  • A timestamp, in Unix format.
  • "" or null — The license is active.
The function returns this value in the licenses object.
1594587380
    updateexpiretime integer The time at which the license will expire:
  • A timestamp, in Unix format.
  • N/A — The license does not apply.
The function returns this value in the licenses object.
1638244382
    version string The product’s version number.
  • A product version number.
  • null — No product version number available.
The function returns this value in the licenses object.
11.86.0.37
     wpcga_sites integer The number of sites for a WP Guardian (cPanel Addon) license.

The function returns this value in the licenses object.
100
    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 — Success.
  • 0 — Failure.
1
version float Internal information that the Manage2 API uses to identify the version. 0.7

Additional Documentation