LAGO_URL="https://api.getlago.com" API_KEY="__YOUR_API_KEY__" curl --location --request GET "$LAGO_URL/api/v1/billable_metrics?per_page=2&page=1" \ --header "Authorization: Bearer $API_KEY"
{ "billable_metrics": [ { "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "name": "Storage", "code": "storage", "recurring": false, "created_at": "2022-09-14T16:35:31Z", "aggregation_type": "sum_agg", "description": "GB of storage used in my application", "rounding_function": "round", "rounding_precision": 2, "expression": "round((ended_at - started_at) * units)", "field_name": "gb", "weighted_interval": "seconds", "filters": [ { "key": "region", "values": [ "us-east-1" ] } ] } ], "meta": { "current_page": 2, "total_pages": 4, "total_count": 70, "next_page": 3, "prev_page": 1 } }
This endpoint retrieves all existing billable metrics that represent pricing components of your application.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Page number.
1
Number of records per page.
20
List of billable metrics
Show child attributes