v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
StatsBar
Resource Usage and Statistics

Return cPanel account statistics

This function retrieves a cPanel account's statistics.

get/StatsBar/get_stats

Query parameters

displaystring required
Example:bandwidthusage|diskusage

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

<details> <summary>Click for a list of available display parameters.</summary>
  • 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.
</details>

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.
infinityimgstring nullable
Example:/home/example/infinity.png

The absolute file path to an alternative infinity symbol image.

infinitylangstring nullable
Example:infinity

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

rowcounterstring nullable
Example:even

The type of row.

  • odd
  • even
warninglevelinteger nullable
Example:87

The minimum level at which to return warnings.

warnings1 | 0 nullable

Whether to return all results with a warning.

  • 1 — Return only warnings that exceed the warninglevel parameter's value.
  • 0 — Return all results.
warnout1 | 0 nullable

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%.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "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
      }
    ],
    "status": 1
  }
}