Skip to main content
GET
/
organizations
/
{orgId}
/
usage
/
savedqueries
/
{id}
Retrieve UsageSavedQuery
curl --request GET \
  --url https://api.m3ter.com/organizations/{orgId}/usage/savedqueries/{id} \
  --header 'Authorization: Bearer <token>'
{
  "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"
  }
}

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

id
string
required

The UUID of the UsageSavedQuery to retrieve.

Response

Return the UsageSavedQuery

Request representing a usage saved query

id
string
required

The UUID of the entity.

version
integer<int64>

The version number:

  • Create: On initial Create to insert a new entity, the version is set at 1 in the response.
  • Update: On successful Update, the version is incremented by 1 in the response.
name
string

Name of the saved query

usageQuery
object