billable_metrics
Retrieve a billable metric
Changed onThis endpoint retrieves an existing billable metric that represents a pricing component of your application. The billable metric is identified by its unique code.
get/billable_metrics/{code}
Request
- Base URLhttps://api.getlago.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Response
Billable metric
Example response
{
"billable_metric": {
"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((event.properties.ended_at - event.properties.started_at) * event.properties.units)",
"field_name": "gb",
"aggregation_type": "sum_agg",
"weighted_interval": "seconds",
"filters": [
{
"key": "region",
"values": [
"us-east-1"
]
}
]
}
}Changes
- info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status
- info
- breaking
the response property
/became nullable for the status - info
the response property
/became required for the status
- breaking