Skip to main content
GET
/
organizations
/
{orgId}
/
usage
/
savedqueries
List UsageSavedQueries
curl --request GET \
  --url https://api.m3ter.com/organizations/{orgId}/usage/savedqueries \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "version": 123,
      "name": "<string>",
      "usageQuery": {
        "startDate": "2023-11-07T05:31:56Z",
        "endDate": "2023-11-07T05:31:56Z",
        "meterIds": [
          "<string>"
        ],
        "accountIds": [
          "<string>"
        ],
        "dimensionFilters": [
          {
            "meterId": "<string>",
            "fieldCode": "<string>",
            "values": [
              "<string>"
            ]
          }
        ],
        "aggregations": [
          {
            "meterId": "<string>",
            "fieldCode": "<string>",
            "fieldType": "DIMENSION",
            "function": "SUM"
          }
        ],
        "groups": [
          {
            "groupType": "ACCOUNT"
          }
        ],
        "limit": 10000,
        "timePeriod": "TODAY"
      }
    }
  ],
  "nextToken": "<string>"
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

UUID of the organization

Query Parameters

pageSize
integer<int32>

Number of UsageSavedQueries to retrieve per page

Required range: 1 <= x <= 100
nextToken
string

nextToken for multi page retrievals

ids
string[] | null
Maximum array length: 200

Response

ListUsageSavedQueries 200 response

data
object[]
nextToken
string