List Billable Metrics
Get billable metrics for a customer
client.V1.Customers.ListBillableMetrics(ctx, params) (*CursorPage[IDstringNamestringAggregatestringAggregateKeysarrayAggregationKeystringAggregationTypeV1CustomerListBillableMetricsResponseAggregationTypeArchivedAtTimeCustomFieldsmapEventTypeFilterEventTypeFilterFiltermapGroupByarrayGroupKeysarrayPropertyFiltersarraySqlstringV1CustomerListBillableMetricsResponse], error)
get/v1/customers/{customer_id}/billable-metrics
Get all billable metrics for a given customer.
Parameters
paramsCustomerIDfieldIncludeArchivedfieldLimitfieldNextPagefieldOnCurrentPlanfieldV1CustomerListBillableMetricsParams
Returns
V1CustomerListBillableMetricsResponsestruct
package main
import (
"context"
"fmt"
"github.com/Metronome-Industries/metronome-go"
"github.com/Metronome-Industries/metronome-go/option"
)
func main() {
client := metronome.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.V1.Customers.ListBillableMetrics(context.TODO(), metronome.V1CustomerListBillableMetricsParams{
CustomerID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", 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"
}