---
title: "List usage meters for event schema"
method: GET
path: "/usage_meters"
tags: ["Usage Meters"]
---

# List usage meters for event schema

`GET /usage_meters`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/usage_meters`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/usage_meters/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a list of usage meters associated with an event schema

## Query parameters

- `status` 'ACTIVE' | 'INACTIVE'
- `aggregations` 'COUNT' | 'SUM'
- `nextToken` string
- `pageSize` number

## Response `200`

Response for list usage_meters request

- UsageMeterPaginatedResponse
  - `data` UsageMeter[]
    - `id` string, required: Identifier of the usage meter
    - `name` string, required: Name of the usage meter
    - `billableName` string: Billable name of addon. Billable name takes precedence over name to display in invoice.
    - `displayName` string, required: Display name of usage meter. This is an auto-generated field which contains billableName of usage meter. If billableName is not provided, name will be used as display name.
    - `description` string
    - `filters` UsageMeterFilterEntry[]
      - `field` string, required
      - `value` string, required
    - `type` 'COUNTER', required: Type of usage meter
    - `status` 'DRAFT' | 'ACTIVE' | 'INACTIVE' | 'ARCHIVED': Status of usage meter
    - `aggregation` 'COUNT' | 'SUM', required: Aggregation to be applied on usage meter result * COUNT - Counts number of events matching the usage meter * SUM - Sums up results of computation of all events matching usage meter
    - `computations` Computation[]
      - `id` string: Optional identifier describing the matcher and computation pair
      - `matcher` string: Condition to be applied on event. Upon matching it the corresponding computation will be considered for usage_meter unit calculation. The result of the matcher needs to be [truthy](https://jsonlogic.com/truthy.html) in order to be considered as a match.
      - `computation` string, required: Computation to be applied on an event if it matches the matcher. In case of a COUNT aggregation type, computation should be passed as '1'
      - `order` integer, required: The order in which multiple matched computations will get evaluated
    - `createdAt` string, date-time
    - `lastActivatedAt` string, date-time
    - `updatedAt` string, date-time
  - `nextToken` string
  - `context` PaginationOptions
    - `pageSize` integer
    - `sortOrder` 'ASC' | 'DESC'

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response
- `default`: Error response

## Changes

- **2024-05-27** `2b8be460ec6a`: 1 info
  - added the optional property `data/items/filters` to the response with the `200` status
- **2023-11-30** `b3351be4b462`: 1 info
  - added the required property `data/items/displayName` to the response with the `200` status
- **2023-11-03** `a6c96c5ec06e`: 1 info
  - added the optional property `data/items/billableName` to the response with the `200` status
- **2023-09-02** `6b13f6f47735`: 1 breaking, 2 warning
  - removed the required property `data/items/displayName` from the response with the `200` status
  - removed the optional property `data/items/billableName` from the response with the `200` status
  - removed the optional property `data/items/filters` from the response with the `200` status

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/usage_meters/get.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
