# Return cPanel account statistics

This function retrieves a cPanel account's statistics.

Endpoint: GET /StatsBar/get_stats
Version: 11.136.0.4
Security: BasicAuth

## Query parameters:

  - `display` (string, required)
    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: "bandwidthusage|diskusage"

  - `infinityimg` (string,null)
    The absolute file path to an alternative infinity symbol image.
    Example: "/home/example/infinity.png"

  - `infinitylang` (string,null)
    A phrase to represent infinity that the locales system can use.
    Example: "infinity"

  - `rowcounter` (string,null)
    The type of row.

* odd
* even
    Example: "even"

  - `warninglevel` (integer,null)
    The minimum level at which to return warnings.
    Example: 87

  - `warnings` (integer,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

  - `warnout` (integer,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

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "get_stats"

  - `module` (string)
    The name of the module called.
    Example: "StatsBar"

  - `result` (object)

  - `result.data` (array)
    An array of objects containing results from the queried account.
    Example: [{"_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}]

  - `result.data._count` (string)
    The queried data's value.

  - `result.data._max` (string)
    The queried parameter's limit.

  - `result.data._maxed` (integer)
    Whether the queried value reached its maximum value.

* 1 — Reached maximum value.
* 0 — Has not reached maximum value.
    Enum: 1, 0

  - `result.data.condition` (integer)
    Whether the queried data's value possesses a conditional requirement.

* 1 — Possesses a condition.
* 0 — Does not possess a condition.

Note:

The function will only return this value if it determines that the
related statistic meets the subsystem installation requirements.
    Enum: 1, 0

  - `result.data.count` (string)
    The queried data's value.

  - `result.data.feature` (string)
    The queried item's feature name.

  - `result.data.id` (string)
    The queried item's reference name.

  - `result.data.is_maxed` (integer)
    Whether the queried value has reached its maximum value.

* 1 — The queried value has reached its maximum value.
* 0 — The queried value has not reached its maximum value.
    Enum: 1, 0

  - `result.data.item` (string)
    A human-readable version of the queried item.

  - `result.data.max` (string)
    The queried value's maximum limit.

  - `result.data.maxed_phrase` (string)
    The [maketext-formatted](https://go.cpanel.net/locale) message
that the interface displays when the user reaches their maximum
allowed value.

  - `result.data.module` (string)
    The module that retrieved the information.
    Example: "Quota"

  - `result.data.name` (string)
    The display key.
    Example: "diskusage"

  - `result.data.near_limit_phrase` (string)
    The [maketext-formatted](https://go.cpanel.net/locale) message
that the interface displays when the user approaches their
maximum allowed value.

  - `result.data.normalized` (integer)
    Whether the function normalized the output values.

* 1 — Normalized.
* 0 — Did not normalize.
    Enum: 1, 0

  - `result.data.percent` (integer)
    The percentage of value, if applicable.

  - `result.data.percent10` (integer)
    The percentage of value that the system rounds to the nearest ten, if applicable.

  - `result.data.percent20` (integer)
    The percentage of value that the system rounds to the nearest twenty, if applicable.

  - `result.data.percent5` (integer)
    The percentage of value that the system rounds to the nearest five, if applicable.

  - `result.data.phrase` (string)
    The human-readable name of the queried item.

  - `result.data.role` (string)
    The queried value's role.

* CalendarContact
* DNS
* FileStorage
* FTP
* MailLocal
* MailReceive
* MailSend
* MySQL
* Postgres
* SpamFilter
* Webmail
* WebDisk
* WebServer
    Enum: "CalendarContact", "DNS", "FileStorage", "FTP", "MailLocal", "MailReceive", "MailSend", "MySQL", "Postgres", "SpamFilter", "Webmail", "WebDisk", "WebServer"

  - `result.data.rowtype` (string)
    The queried value's row type.

* even
* odd
    Enum: "even", "odd"

  - `result.data.units` (string)
    The queried value's unit of measure.

  - `result.data.zeroisunlimited` (integer)
    Whether a value of 0 means unlimited or zero.

* 1 — Unlimited.
* 0 — Zero.
    Enum: 1, 0

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 — Success.
* 0 — Failed. Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


