List
List all billable metrics
client.V1.BillableMetrics.List(ctx, query) (*CursorPage[IDstringNamestringAggregationKeystringAggregationTypeV1BillableMetricListResponseAggregationTypeArchivedAtTimeCustomFieldsmapEventTypeFilterEventTypeFilterGroupKeysarrayPropertyFiltersarraySqlstringV1BillableMetricListResponse], error)
get/v1/billable-metrics
List all billable metrics.
Parameters
queryIncludeArchivedfieldLimitfieldNextPagefieldV1BillableMetricListParams
Returns
V1BillableMetricListResponsestruct
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.BillableMetrics.List(context.TODO(), metronome.V1BillableMetricListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
200 Example
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name",
"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"
]
},
"group_keys": [
[
"string"
]
],
"property_filters": [
{
"name": "name",
"exists": true,
"in_values": [
"string"
],
"not_in_values": [
"string"
]
}
],
"sql": "sql"
}
],
"next_page": "next_page"
}