Get provider service breakdown
Authorization
BearerAuth API key with l4_live_ or l4_test_ prefix
In: header
Path Parameters
Query Parameters
Response format: table (paginated UI), chart (aggregated stacked bar), csv (export), raw (all records)
"table"^(table|chart|csv|raw)$Start date in ISO 8601 format (e.g., 2026-02-01T00:00:00.000Z). Defaults to first of current month
End date in ISO 8601 format (e.g., 2026-02-01T00:00:00.000Z). Defaults to today
Granularity: 'daily' or 'monthly' (used for chart format)
"daily"^(daily|monthly)$Page number (1-indexed, table format only)
11 <= valueItems per page (max 100, table format only)
101 <= value <= 100Field to sort by (service, environment, region, account_id, cost, previous_cost, change_percentage)
"cost"Sort order (asc or desc)
"desc"^(asc|desc)$Sort by a specific date's cost (YYYY-MM-DD for daily, YYYY-MM for monthly). Overrides sort_by.
Date preset: '30D', '6M', or '12M' (takes precedence over start/end)
Filter by service(s) - can be repeated for multiple values
Filter by environment(s) - can be repeated for multiple values
Filter by account ID(s) - can be repeated for multiple values
Filter by region(s) - can be repeated for multiple values
Filter by tag key(s) - required when group_by=tag
Filter by tag value(s) - can be repeated for multiple values
Group by field(s). Valid: service, account_id, region, tag
Header Parameters
Response Body
application/json
application/json
curl -X GET "https://api.levelfour.ai/api/v1/providers/string/spending/breakdown" \ -H "authorization: string"{
"success": true,
"timestamp": "2019-08-24T14:15:22Z",
"data": {
"provider_id": "string",
"provider_name": "string",
"period": "string",
"start_date": "string",
"end_date": "string",
"total_period_cost": 0,
"items": [
{
"service": "string",
"environment": "string",
"region": "string",
"account_id": "string",
"tag_key": "string",
"tag_value": "string",
"cost": 0,
"previous_cost": 0,
"change_percentage": 0,
"spendings_by_date": [
{
"date": "string",
"value": 0,
"change_percentage": 0
}
]
}
],
"pagination": {
"total_items": 0,
"total_pages": 0,
"current_page": 0,
"page_size": 0,
"has_next": true,
"has_previous": true
},
"totals_by_date": [
{
"date": "string",
"value": 0,
"change_percentage": 0
}
]
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}