Child pages
  • Manage2 API Functions - List Package Information
Skip to end of metadata
Go to start of metadata

Description


This function returns the Manage2 account's packages.

Examples 


 Browser-based Calls
XML
http://manage2.cpanel.net/XMLpackageInfo.cgi
JSON
http://manage2.cpanel.net/XMLpackageInfo.cgi?output=json
YAML
http://manage2.cpanel.net/XMLpackageInfo.cgi?output=yaml
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com","12345luggage");
$lisc = $cpl->fetchPackages();
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
    my $cpl = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage');
$cpl->fetchPackages()
 Output (JSON)
{  
   "packages":{  
      "P001":"ONE TIME FEE",
      "P002":"THREE-YEAR",
      "P003":"ONE-YEAR",
      "P003":"TWO-YEAR"
   },
   "version":0.3,
   "status":1,
   "reason":"OK"
}
 Output (XML)
<XMLpackageInfo reason="OK" status="1" version="0.3">
     <packages P001="ONE TIME FEE" P002="THREE-YEAR" P003="ONE-YEAR" P003="TWO-YEAR"/>
</XMLpackageInfo>
 Output (YAML)
---
   "packages":{  
      "P001":"ONE TIME FEE",
      "P002":"THREE-YEAR",
      "P003":"ONE-YEAR",
      "P003":"TWO-YEAR"
   },
   "version":0.3,
   "status":1,
   "reason":"OK"

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
reasonstring

Information about the operation.

OK

OK
statusBooleanWhether the function succeeded.
  • 1 — Success.

  • 0 — Failure.
1
packageshashA hash of package information.

A hash of each package's name and ID.

P001="ONE TIME FEE"