API ReferenceSavings
Get saved recommendations breakdown with pagination
Authorization
BearerAuth AuthorizationBearer <token>
API key with l4_live_ or l4_test_ prefix
In: header
Query Parameters
page?integer
Page number (1-indexed)
Default
1Range
1 <= valuepage_size?integer
Items per page (max 100)
Default
10Range
1 <= value <= 100sort_by?string
Field to sort by (period, account_id, environment, service, usage_type, usage_quantity, usage_unit, pre_optimization_cost, post_optimization_cost, monthly_savings, roi, approved_by)
Default
"period"sort_order?string
Sort order (asc or desc)
Default
"desc"Match
^(asc|desc)$start?|
Start date filter (YYYY-MM-DD or YYYY-MM format)
end?|
End date filter (YYYY-MM-DD or YYYY-MM format)
preset?|
Date preset: '30D', '6M', or '12M' (takes precedence over start/end)
provider?|
Filter by provider ID (aws, gcp, azure, k8s)
service?array<>|
Filter by service(s) - can be repeated for multiple values
environment?array<>|
Filter by environment(s) - can be repeated for multiple values
account_id?array<>|
Filter by account ID(s) - can be repeated for multiple values
Header Parameters
authorization*string
Response Body
application/json
application/json
curl -X GET "https://api.levelfour.ai/api/v1/savings/breakdown" \ -H "authorization: string"{
"success": true,
"timestamp": "2019-08-24T14:15:22Z",
"data": {
"total_savings": 0,
"items": [
{
"period": "string",
"account_id": "string",
"environment": "string",
"service": "string",
"usage_type": "string",
"usage_quantity": 0,
"usage_unit": "string",
"approved_by": "string",
"pre_optimization_cost": 0,
"post_optimization_cost": 0,
"monthly_savings": 0,
"annual_savings": 0,
"roi": 0
}
],
"pagination": {
"total_items": 0,
"total_pages": 0,
"current_page": 0,
"page_size": 0,
"has_next": true,
"has_previous": true
}
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}