# Return resource usage and custom statistics

This function retrieves resource usage and custom statistics for a cPanel user account.

Endpoint: GET /ResourceUsage/get_usages
Version: 11.136.0.25
Security: BasicAuth

## Response 200 fields (application/json):

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

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

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

  - `result` (object)

  - `result.data` (array)
    An array of objects containing resource usage information from the account's query.

  - `result.data.description` (string)
    The resource's UI display name.
    Example: "MySQL® Databases"

  - `result.data.error` (string,null)
    An error message, if applicable.

  - `result.data.formatter` (any)
    The resource's defined output format.

* format_bytes
* format_bytes_per_second
* percent
* null — No defined output format.

Note:

Third-party modules will return their defined formatter value.
    Example: "format_bytes"

  - `result.data.id` (string)
    The resource's reference name.
* disk_usage
 filesusage - This function only returns this value if the Display File Usage information in the cPanel stats bar setting is enabled in the Display section of WHM's [Tweak Settings](https://go.cpanel.net/whmdocsTweakSettings#display) interface (WHM >> Home >> Server Configuration >> Tweak Settings*).
* cachedmysqldiskusage
* cachedpostgresdiskusage - This function only returns this value if [PostgreSQL® databases](https://go.cpanel.net/cpaneldocsPostgreSQLDatabases) are enabled.
* bandwidth
* addon_domains
* subdomains
* aliases
* email_accounts
 mailing_lists - This function only returns this value if the Mailman service is enabled in WHM's [Service Manager](https://go.cpanel.net/whmdocsServiceManager) interface (WHM >> Home >> Service Configuration >> Service Manager*).
* autoresponders
* forwarders
* email_filters
* ftp_accounts - This function only returns this value if FTP accounts exist on the server.
* mysql_databases - This function only returns this value if MySQL® databases are enabled.
* postgresql_databases

Note:

Certain id values may not appear, based on the [server's current profile](https://go.cpanel.net/howtouseserverprofiles#profiles).
    Example: "mysql_databases"

  - `result.data.maximum` (integer,null)
    The resources's maximum usage value.

Note:

 This function returns an null value for an (unlimited) quota.
    Example: 15

  - `result.data.url` (string)
    The resource's defined URL link to its corresponding interface, in applicable.
    Example: "sql/index.html"

  - `result.data.usage` (integer)
    The resource's current usage value.

  - `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: 0, 1

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


