GET
/
v1
/
customers
/
{customer_id}
/
billable-metrics
Get billable metrics for a customer
curl --request GET \
  --url https://api.metronome.com/v1/customers/{customer_id}/billable-metrics \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "name": "data transfer (GB)",
      "id": "9570e4f3-d1da-4b95-ba81-bd40ee002727",
      "group_by": [
        "cluster",
        "region"
      ],
      "aggregate": "sum",
      "aggregate_keys": [
        "bytes"
      ],
      "aggregation_type": "SUM",
      "aggregation_key": "bytes",
      "event_type_filter": {
        "in_values": [
          "cpu_usage"
        ]
      },
      "property_filters": [
        {
          "name": "cpu_hours",
          "exists": true
        },
        {
          "name": "region",
          "exists": true,
          "in_values": [
            "EU",
            "NA"
          ]
        },
        {
          "name": "machine_type",
          "exists": true,
          "in_values": [
            "slow",
            "fast"
          ]
        }
      ],
      "group_keys": [
        [
          "region"
        ],
        [
          "machine_type"
        ]
      ]
    },
    {
      "name": "CPU hours",
      "id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
      "aggregation_type": "SUM",
      "aggregation_key": "bytes",
      "event_type_filter": {
        "in_values": [
          "cpu_usage"
        ]
      },
      "property_filters": [
        {
          "name": "cpu_hours",
          "exists": true
        },
        {
          "name": "region",
          "exists": true,
          "in_values": [
            "EU",
            "NA"
          ]
        },
        {
          "name": "machine_type",
          "exists": true,
          "in_values": [
            "slow",
            "fast"
          ]
        }
      ],
      "group_keys": [
        [
          "region"
        ],
        [
          "machine_type"
        ]
      ],
      "archived_at": "2024-10-01T11:23:44Z"
    }
  ],
  "next_page": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customer_id
string<uuid>
required

Query Parameters

limit
integer

Max number of results that should be returned

Required range: 1 <= x <= 100
next_page
string

Cursor that indicates where the next page of results should start.

on_current_plan
boolean

If true, the list of metrics will be filtered to just ones that are on the customer's current plan

include_archived
boolean

If true, the list of returned metrics will include archived metrics

Response

200 - application/json

Success

The response is of type object.