---
title: "Get usage meter"
method: GET
path: "/usage_meters/{usage_meter_id}"
tags: ["Usage Meters"]
---

# Get usage meter

`GET /usage_meters/{usage_meter_id}`

## Request

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

Get an usage meter using event schema name and usage meter id.

## Path parameters

- `usage_meter_id` string, required

## Response `200`

Response for Create and Get usage event requests

- UsageMeter: Structure of usage meter
  - `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

## 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 `filters` to the response with the `200` status
- **2023-11-30** `b3351be4b462`: 1 info
  - added the required property `displayName` to the response with the `200` status
- **2023-11-03** `a6c96c5ec06e`: 1 info
  - added the optional property `billableName` to the response with the `200` status
- **2023-09-02** `6b13f6f47735`: 1 breaking, 2 warning
  - removed the required property `displayName` from the response with the `200` status
  - removed the optional property `billableName` from the response with the `200` status
  - removed the optional property `filters` from the response with the `200` status

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/usage_meters/:usage_meter_id/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)
