Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists the available hosting plans (packages).

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/listpkgs
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/listpkgs
 Command Line
whmapi0 listpkgs

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "package":[
      {
         "FRONTPAGE":"n",
         "CPMOD":"paper_lantern",
         "FEATURELIST":"default",
         "BWLIMIT":"unlimited",
         "IP":"n",
         "CGI":"y",
         "MAXSUB":"unlimited",
         "name":"standard",
         "MAXSQL":"unlimited",
         "MAXFTP":"unlimited",
         "QUOTA":"unlimited",
         "MAXPARK":"2",
         "HASSHELL":"y",
         "MAXADDON":"2",
         "MAXPOP":"unlimited",
         "MAXLST":"unlimited",
         "LANG":"english"
      },
      {
         "FRONTPAGE":"n",
         "CPMOD":"paper_lantern",
         "FEATURELIST":"Default",
         "BWLIMIT":"9999",
         "IP":"y",
         "CGI":"y",
         "MAXSUB":"888",
         "name":"bronze",
         "MAXSQL":"99",
         "MAXFTP":"9",
         "QUOTA":"unlimited",
         "MAXPARK":"88",
         "HASSHELL":"y",
         "MAXADDON":"888",
         "MAXPOP":"999",
         "MAXLST":"999",
         "LANG":"english"
      },
      {
         "FRONTPAGE":"n",
         "CPMOD":"paper_lantern",
         "FEATURELIST":"default",
         "BWLIMIT":"unlimited",
         "IP":"n",
         "CGI":"y",
         "MAXSUB":"unlimited",
         "name":"silver",
         "MAXSQL":"unlimited",
         "MAXFTP":"unlimited",
         "QUOTA":"unlimited",
         "MAXPARK":"0",
         "HASSHELL":"y",
         "MAXADDON":"0",
         "MAXPOP":"unlimited",
         "MAXLST":"unlimited",
         "LANG":"english"
      },
      {
         "FRONTPAGE":"n",
         "CPMOD":"paper_lantern",
         "FEATURELIST":"default",
         "BWLIMIT":"unlimited",
         "MAXSUB":"unlimited",
         "CGI":"y",
         "IP":"n",
         "name":"gold",
         "MAXSQL":"unlimited",
         "MAXPARK":"2",
         "QUOTA":"unlimited",
         "MAXFTP":"unlimited",
         "HASSHELL":"y",
         "MAXADDON":"2",
         "LANG":"english",
         "MAXLST":"unlimited",
         "MAXPOP":"unlimited"
      }
   ]
}
 Output (XML)
<listpkgs>
     <package>
            <name>gold</name>
            <BWLIMIT>unlimited</BWLIMIT>
            <CGI>y</CGI>
            <CPMOD>paper_lantern</CPMOD>
            <FEATURELIST>default</FEATURELIST>
            <FRONTPAGE>n</FRONTPAGE>
            <HASSHELL>y</HASSHELL>
            <IP>n</IP>
            <LANG>english</LANG>
            <MAXADDON>2</MAXADDON>
            <MAXFTP>unlimited</MAXFTP>
            <MAXLST>unlimited</MAXLST>
            <MAXPARK>2</MAXPARK>
            <MAXPOP>unlimited</MAXPOP>
            <MAXSQL>unlimited</MAXSQL>
            <MAXSUB>unlimited</MAXSUB>
            <QUOTA>unlimited</QUOTA>
      </package>
</listpkgs>

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
packagearray of hashesAn array of hashes of hosting plan settings.

This function includes one or more of the returns below.

Note:

If the hosting plan or its hosting plan use package extensions, the package hash will also include the extension's variables.


 

name

string

The hosting plan name.

The function returns this value in the newcfg hash.

A valid hosting plan name on the hosting plan.package1

MAXSUB

string

The hosting plan's maximum number of subdomains.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of subdomains.
unlimited  

MAXADDON

string

The hosting plan's maximum number of addon domains.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of addon domains.
unlimited

MAX_DEFER_FAIL_PERCENTAGE

string

The percentage of failed or deferred email messages that the hosting plan can send per hour before outgoing mail is rate-limited.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a percentage of messages.
unlimited

_PACKAGE_EXTENSIONS

string

The hosting plan's package extensions.

The function returns this value in the package hash.

A space-separated list of one or more package extension names.ext1 ext2 ext3

CPMOD

string

The hosting plan's cPanel interface theme.

The function returns this value in the package hash.

  • paper_lantern
  • Another valid theme on the server.
paper_lantern

MAX_EMAIL_PER_HOUR

string

The maximum number of emails that the hosting plan can send in one hour.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of sent emails.
unlimited

LANG

string

The hosting plan's locale.

The function returns this value in the package hash.

The ISO-639 code for any locale on the server.en

MAXLST

string

The hosting plan's maximum number of mailing lists.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of mailing lists.
unlimited

MAXPARK

string

The hosting plan's maximum number of parked domains (aliases).

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of parked domains.
unlimited  

MAXSQL

string

The hosting plan's maximum number of each available type of SQL database.

For example, if you set this value to 5 and the system administrator allows MySQL® and PostgreSQL® databases, users can create up to five MySQL databases and up to five PostgreSQL databases.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of SQL databases.
unlimited  

FEATURELIST

string

The hosting plan's featurelist.

The function returns this value in the package hash.

A valid feature list name.default

CGI

Boolean

Whether CGI is enabled for the hosting plan.

The function returns this value in the package hash.

  • 1 — Enabled.
  • 0 — Disabled.
1

MAXFTP

string

The hosting plan's maximum number of FTP accounts.

The function returns this value in the package hash.

  • unlimited
  • An integer that represents a number of FTP accounts.
unlimited

BWLIMIT

string

The hosting plan's bandwidth limit.

The function returns this value in the package hash.

  • unlimited
  • A maximum amount of bandwidth, in Megabytes (MB).
unlimited

QUOTA

string

The hosting plan's disk space limit.

The function returns this value in the package hash.

  • unlimited
  • A maximum amount of disk space, in Megabytes (MB).
unlimited

DIGESTAUTH

string

Whether the hosting plan enables Digest Authentication.

The function returns this value in the package hash.

  • y — Enable.
  • n — Disable.
n

IP

string

Whether the hosting plan grants accounts a dedicated IP address.

The function returns this value in the package hash.

  • y — Dedicated IP address.
  • n — Shared IP address.
n