Child pages
  • Manage2 API Functions - List Package Information

Versions Compared

Key

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

Description


Excerpt

This function returns the Manage2 account's packages.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleBrowser-based Calls


Code Block
languagetext
titleXML
http://manage2.cpanel.net/XMLpackageInfo.cgi


Code Block
languagetext
titleJSON
http://manage2.cpanel.net/XMLpackageInfo.cgi?output=json


Code Block
languagetext
titleYAML
http://manage2.cpanel.net/XMLpackageInfo.cgi?output=yaml



Expand
titlecPanel Licensing PHP Class


Code Block
languagephp
linenumberstrue
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com","12345luggage");
$lisc = $cpl->fetchPackages();
?>



Expand
titlecPanel Licensing Perl Module


Code Block
languageperl
linenumberstrue
use cPanelLicensing;
    my $cpl = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage');
$cpl->fetchPackages()



Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "packages":{  
      "P001":"ONE TIME FEE",
      "P002":"THREE-YEAR",
      "P003":"ONE-YEAR",
      "P003":"TWO-YEAR"
   },
   "version":0.3,
   "status":1,
   "reason":"OK"
}



Expand
titleOutput (XML)


Code Block
languagexml
linenumberstrue
<XMLpackageInfo reason="OK" status="1" version="0.3">
     <packages P001="ONE TIME FEE" P002="THREE-YEAR" P003="ONE-YEAR" P003="TWO-YEAR"/>
</XMLpackageInfo>



Expand
titleOutput (YAML)


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