GET
/
billable_metrics
/
{code}
/
groups
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request GET "$LAGO_URL/api/v1/billable_metrics/:code/groups?per_page=2&page=1" \
  --header "Authorization: Bearer $API_KEY"
{
  "groups": [
    {
      "key": "region",
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "value": "us-east-1"
    },
    {
      "key": "region",
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a288d80",
      "value": "us-east-2"
    },
    {
      "key": "region",
      "lago_id": "3b288a90-1a20-1a90-1a90-1a921d921a90",
      "value": "eu-west-1"
    }
  ],
  "meta": {
    "current_page": 1,
    "total_count": 2,
    "total_pages": 1
  }
}

Authorizations

Authorization
string
headerrequired

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

Path Parameters

code
string
required

Code of the existing billable metric.

Query Parameters

page
integer

Page number.

per_page
integer

Number of records per page.

Response

200 - application/json
groups
object[]
required
meta
object
required