Return cPanel account statistics

This function retrieves a cPanel account's statistics.

SecurityBasicAuth
Request
query Parameters
display
required
string

A pipe-delimited list of the account's statistics.

Click for a list of available display parameters.
  • addondomains — Information about the account's addon domains.
  • apacheversion — The server's Apache version.
  • autoresponders — Information about the account's auto-responders.
  • bandwidthusage — Information about the account's bandwidth usage.
  • cachedlistdiskusage — The amount of cached mailing list disk space the account currently uses.
  • cachedmysqldiskusage — The amount of cached disk space that the account's MySQL® databases currently use.
  • cachedpostgresdiskusage — The amount of cached disk space that the account's PostgreSQL databases use.
  • cpanelversion — The server's cPanel version.
  • dedicatedip — Account websites that use dedicated IP addresses.
  • diskusage — Information the account's disk space usage.
  • emailaccounts — Information about the account's email accounts.
  • emailfilters — Information the account's email filters.
  • emailforwarders — Information about the account's forwarders.
  • fileusage — Information about the account's file usage.
  • ftpaccounts — Information about the account's FTP accounts.
  • hostingpackage — The account's hosting package.
  • hostname — The server's hostname.
  • kernelversion — The operating system's kernel version.
  • localip — Account websites that use local IP addresses.
  • machinetype — The type of operating system that the server uses.
  • mailinglists — Information the account's mailing lists.
  • mysqldatabases — The number of MySQL databases the account possesses.
  • mysqldiskusage — The amount of disk space that the account's MySQL databases use.
  • mysqlversion — The server's MySQL version.
  • operatingsystem — The server's operating system.
  • parkeddomains — Information about the account's parked domains (aliases).
  • perlpath — The Perl binary's absolute path.
  • perlversion — The server's Perl version.
  • phpversion — The server's PHP version.
  • postgresqldatabases — The number of PostgreSQL databases the cPanel account possesses.
  • postgresdiskusage — The amount of disk space that the cPanel account's PostgreSQL databases use.
  • sendmailpath — The path to the system's sendmail binary.
  • sharedip — Any of the account's websites that use a shared IP address.
  • shorthostname — The short version of your server's hostname.
  • sqldatabases — Information about the all of the account's SQL databases.
  • subdomains — Information about the account's subdomains.
  • theme — The account's current theme.

Note:

  • This function may require URI-encode format (%7C) or quotes (") in some contexts, such as the command line tool.
  • Some display parameters may be unavailable based on the server's configuration.
Example: display=bandwidthusage|diskusage
infinityimg
string or null
Default: null

The absolute file path to an alternative infinity symbol image.

Example: infinityimg=/home/example/infinity.png
infinitylang
string or null
Default: null

A phrase to represent infinity that the locales system can use.

Example: infinitylang=infinity
rowcounter
string or null
Default: null

The type of row.

  • odd
  • even
Example: rowcounter=even
warninglevel
integer or null [ 1 .. 100 ]
Default: null

The minimum level at which to return warnings.

Example: warninglevel=87
warnings
integer or null
Default: null

Whether to return all results with a warning.

  • 1 — Return only warnings that exceed the warninglevel parameter's value.
  • 0 — Return all results.
Enum: 1 0
Example: warnings=0
warnout
integer or null
Default: null

Whether to display results with a value of 100%.

  • 1 — Display results with a value of 100%.
  • 0 — Hide results with a value of 100%.
Enum: 1 0
Example: warnout=0
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/StatsBar/get_stats
Request samples
uapi --output=jsonpretty \
  --user=username \
  StatsBar \
  get_stats \
  display='bandwidthusage|diskusage'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "get_stats",
  • "module": "StatsBar",
  • "result": {
    • "data": [
      • {
        • "_count": "0.00",
        • "_max": "1024.00",
        • "_maxed": 0,
        • "count": "0 bytes",
        • "feature": "bandwidth",
        • "id": "bandwidthusage",
        • "is_maxed": 0,
        • "item": "Monthly Bandwidth Transfer",
        • "max": "1 GB",
        • "maxed_phrase": "You have transferred your maximum allotment of data ([format_bytes,_1]) for this month.",
        • "module": "Stats",
        • "name": "bandwidthusage",
        • "near_limit_phrase": "You have transferred [format_bytes,_1] of your [format_bytes,_2] data allotment for this month.",
        • "normalized": 1,
        • "percent": 0,
        • "percent10": 0,
        • "percent20": 0,
        • "percent5": 0,
        • "phrase": "Monthly Bandwidth Transfer",
        • "rowtype": "even",
        • "units": "MB",
        • "zeroisunlimited": 1
        },
      • {
        • "_count": "1.75",
        • "_max": "1024.00",
        • "_maxed": 0,
        • "count": "1.75 MB",
        • "id": "diskusage",
        • "is_maxed": 0,
        • "item": "Disk Space Usage",
        • "langkey": "INDXDiskUsage",
        • "max": "1 GB",
        • "maxed_phrase": "You are using your maximum storage allotment, [format_bytes,_1].",
        • "module": "Quota",
        • "name": "diskusage",
        • "near_limit_phrase": "You are using [format_bytes,_1] of the [format_bytes,_2] of storage available to you.",
        • "normalized": 1,
        • "percent": 0,
        • "percent10": 0,
        • "percent20": 0,
        • "percent5": 0,
        • "phrase": "Disk Space Usage",
        • "rowtype": "odd",
        • "units": "MB",
        • "zeroisunlimited": 1
        }
      ],
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}