---
title: "Query and filter usage data"
method: POST
path: "/organizations/{orgId}/usage/query"
tags: ["DataExplorerV2"]
---

# Query and filter usage data

`POST /organizations/{orgId}/usage/query`

Query and filter usage data collected for your Organization.

You can use several parameters to filter the range of usage data returned:
* **Time period.** Use `startDate` and `endDate` to define a period. The query references the `timestamp` values of usage data submissions for applying the defined time period, and not the time submissions were `receivedAt` by the platform. Only usage data with a `timestamp` that falls in the defined time period are returned.(Required)
* **Meters.** Specify the Meters you want the query to return data for.
* **Accounts.** Specify the Accounts you want the query to return data for.
* **Dimension Filters.** Specify values for Dimension data fields on included Meters. Only data that match the specified Dimension field values will be returned for the query.

You can apply Aggregations functions to the usage data returned for the query. If you apply Aggregations, you can select to group the data by:
* **Account**
* **Time**
* **Dimension**

## Path parameters

- `orgId` string, required

## Request body

- UsageQueryRequest
  - `startDate` string, date-time — The inclusive start date to define a time period to filter by. (*ISO 8601 formatted*)
  - `endDate` string, date-time — The exclusive end date to define a time period to filter by. (*ISO 8601 formatted*)

## Response `200`

Returns a list of usage data

- UsageQueryResponse
  - `data` object[]
  - `hasMoreData` boolean — Boolean flag to indicate whether or not there are more data available for the query than are returned: * If there are more data, then TRUE. * If there are no more data, then FALSE. **NOTES:** * The limit on the size of the return is 20000 data items. If the query returns more than this limit, only 20000 items are returned with most recent first and `hasMoreData` will be TRUE. * If you have set `limit` in your query request at fewer than the number returned by the query, then `hasMoreData` will be TRUE in the response.

## Other responses

- `4XX` — Error message
- `5XX` — Error message

---

[API](https://skmtc.net/m3ter-com/apis/m3ter-api.md) · [All operations](https://skmtc.net/m3ter-com/apis/m3ter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/m3ter-com/m3ter-api/versions/ac93d1a9e6d9/schema)
