Skip to main content

Get all groups for a billable metric

Route

GET
/api/v1/billable_metrics/:code/groups?per_page=2&page=1

Usage

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"

Arguments

AttributesTypeDescription
codeString      RequiredCode identifying the billable metric
per_pageString      OptionalNumber of records per page.
pageString      OptionalPage number

Responses

Groups were successfully found

Returns a list of groups objects.

{
"groups": [
{
"lago_id": "b7ab2926-1de8-4428-9bcd-779314ac129b",
"key": "group_key",
"value": "group_value"
}
]
}
AttributesDescription
lago_id     String     Not nullUnique identifier of the group in Lago application.
key     StringGroup key, only defined if two dimensions
value     String     Not nullGroup value