# Return cPanel account's bandwidth usage report This function queries an account's bandwidth data and returns a report. This function also returns the bandwidth use of a distributed cPanel account. Endpoint: GET /Bandwidth/query Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `grouping` (any, required) How to group the data in the report, in pipe-separated format. This list contain one or both of the following parameters: A pipe-separated list that contains one or both of the following parameters: * * This parameter can also include only of the following start time interval types: * * * * * * This parameter accepts a maximum of three values. * The function nests the return objects in the order that you declare the values in this parameter. - `domains` (string) A pipe-separated list of domains for which to provided data. * If you do not include this parameter, the function will return data for all domains on the cPanel account. * The "pseudo-domain" refers to data recorded without a specific domain. All traffic except HTTP traffic is recorded without a specific domain. - `end` (integer) The end date of the report window. Example: 1446664809 - `interval` (string) Length of time between bandwidth data samples. * * * The interval's retention period determines availability of the interval's data. Use the API to determine an interval's retention period. Enum: "daily", "hourly", "5min" - `protocols` (string) A pipe-separated list of the protocols for which to provide data. * * * * * - `start` (integer) The start date of the report window. Example: 1445664609 - `timezone` (string) The timezone in which to report the data. Example: "America/Chicago" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "query" - `module` (string) The name of the module called. Example: "Bandwidth" - `result` (object) - `result.data` (object) The function returns data in a hierarchy of objects that the order of values in the parameter determines. For example: * - Returns data by domain. * - Returns data by protocol and nests it within the object for each domain. * - Returns data by year and nests it within the object for each domain. * - Returns data by domain and nests it within object for each year. * - Returns data by protocol and nests it within object for each year, which the result then nests in objects for each domain. The deepest child object contains the bandwidth data in bytes. - `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) An object containing any additional data returned by the API. - `result.status` (integer) * - Success. * - Failed. Check the 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 a API.