List Billable Metrics
Get billable metrics for a customer
v1.customers.list_billable_metrics(**kwargs) -> CursorPage<idStringnameStringaggregateStringaggregate_keysarrayaggregation_keyStringaggregation_typeunionarchived_atTimecustom_fieldshashevent_type_filterEventTypeFilterfilterhashgroup_byarraygroup_keysarrayproperty_filtersarraysqlStringCustomerListBillableMetricsResponse>
get/v1/customers/{customer_id}/billable-metrics
Get all billable metrics for a given customer.
Parameters
customer_idString
formatuuid
include_archivedbool
optional
If true, the list of returned metrics will include archived metrics
limitInteger
optional
Max number of results that should be returned
minimum1
maximum100
next_pageString
optional
Cursor that indicates where the next page of results should start.
on_current_planbool
optional
If true, the list of metrics will be filtered to just ones that are on the customer's current plan
Returns
CustomerListBillableMetricsResponseclass
require "metronome_sdk"
metronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")
page = metronome.v1.customers.list_billable_metrics(customer_id: "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc")
puts(page)
200 Example
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name",
"aggregate": "aggregate",
"aggregate_keys": [
"string"
],
"aggregation_key": "aggregation_key",
"aggregation_type": "COUNT",
"archived_at": "2019-12-27T18:11:19.117Z",
"custom_fields": {
"foo": "string"
},
"event_type_filter": {
"in_values": [
"string"
],
"not_in_values": [
"string"
]
},
"filter": {
"foo": "bar"
},
"group_by": [
"string"
],
"group_keys": [
[
"string"
]
],
"property_filters": [
{
"name": "name",
"exists": true,
"in_values": [
"string"
],
"not_in_values": [
"string"
]
}
],
"sql": "sql"
}
],
"next_page": "next_page"
}