## Retrieve `client.v1.billableMetrics.retrieve(BillableMetricRetrieveParamsparams, RequestOptionsoptions?): BillableMetricRetrieveResponse` **get** `/v1/billable-metrics/{billable_metric_id}` Get a billable metric. ### Parameters - **params:** `BillableMetricRetrieveParams` - **billable\_metric\_id:** `string` ### Returns - `BillableMetricRetrieveResponse` - **data:** `Data` - **id:** `string` ID of the billable metric - **name:** `string` The display name of the billable metric. - **aggregation\_key:** `string` A key that specifies which property of the event is used to aggregate data. This key must be one of the property filter names and is not applicable when the aggregation type is 'count'. - **aggregation\_type:** `"COUNT" | "LATEST" | "MAX" | 2 more` Specifies the type of aggregation performed on matching events. - `"COUNT"` - `"LATEST"` - `"MAX"` - `"SUM"` - `"UNIQUE"` - **archived\_at:** `string` RFC 3339 timestamp indicating when the billable metric was archived. If not provided, the billable metric is not archived. - **custom\_fields:** `Record` - **event\_type\_filter:** `EventTypeFilter` An optional filtering rule to match the 'event_type' property of an event. - **group\_keys:** `Array>` Property names that are used to group usage costs on an invoice. Each entry represents a set of properties used to slice events into distinct buckets. - **property\_filters:** `Array` A list of filters to match events to this billable metric. Each filter defines a rule on an event property. All rules must pass for the event to match the billable metric. - **name:** `string` The name of the event property. - **exists:** `boolean` Determines whether the property must exist in the event. If true, only events with this property will pass the filter. If false, only events without this property will pass the filter. If null or omitted, the existence of the property is optional. - **in\_values:** `Array` Specifies the allowed values for the property to match an event. An event will pass the filter only if its property value is included in this list. If undefined, all property values will pass the filter. Must be non-empty if present. - **not\_in\_values:** `Array` Specifies the values that prevent an event from matching the filter. An event will not pass the filter if its property value is included in this list. If null or empty, all property values will pass the filter. Must be non-empty if present. - **sql:** `string` The SQL query associated with the billable metric ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); const billableMetric = await client.v1.billableMetrics.retrieve({ billable_metric_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', }); console.log(billableMetric.data); ```