v1

latestOpenAPI 3.1.0AGPLv32026-07-26168262527.5 KB
billable_metrics

List all billable metrics

This endpoint retrieves all existing billable metrics that represent pricing components of your application.

get/billable_metrics

Query parameters

pageinteger
Example:1

Page number.

per_pageinteger
Example:20

Number of records per page.

Response

List of billable metrics

Example response

{
  "billable_metrics": [
    {
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "name": "Storage",
      "code": "storage",
      "description": "GB of storage used in my application",
      "rounding_function": "round",
      "rounding_precision": 2,
      "created_at": "2022-09-14T16:35:31Z",
      "expression": "round((ended_at - started_at) * units)",
      "field_name": "gb",
      "aggregation_type": "sum_agg",
      "weighted_interval": "seconds",
      "filters": [
        {
          "key": "region",
          "values": [
            "us-east-1"
          ]
        }
      ]
    }
  ],
  "meta": {
    "current_page": 2,
    "next_page": 3,
    "prev_page": 1,
    "total_pages": 4,
    "total_count": 70
  }
}