Endpoints for managing and optimizing cloud costs including retrieving cost overviews and detailed cost information.
Endpoints for managing and optimizing cloud costs including retrieving cost overviews and detailed cost information.
/costs/{resourceId}
Retrieve cost data for a specific resource.
cost_type
string
The type of cost to retrieve (e.g., compute, storage, network, total)
start_date
string
The start date for the cost query in YYYY-MM-DD format
end_date
string
The end date for the cost query in YYYY-MM-DD format
granularity
string
The granularity of the cost data (e.g., daily, monthly)
resourceId
string
required
The unique identifier of the resource
Cost data retrieved successfully
resource_id
string
The unique identifier of the resource
costs
array
This response does not contain any headers
Resource not found
This response is empty
This response does not contain any headers
Cost data retrieved successfully
{ "resource_id": "resource_123", "costs": [ { "date": "2023-05-01", "cost_type": "compute", "amount": 15.0 }, { "date": "2023-05-01", "cost_type": "storage", "amount": 5.0 }, { "date": "2023-05-01", "cost_type": "network", "amount": 2.5 }, { "date": "2023-05-02", "cost_type": "compute", "amount": 16.0 }, { "date": "2023-05-02", "cost_type": "storage", "amount": 5.5 }, { "date": "2023-05-02", "cost_type": "network", "amount": 3.0 } ] }
/costs
Retrieve a summary of all costs across resources and services.
start_date
string
The start date for the cost query in YYYY-MM-DD format
end_date
string
The end date for the cost query in YYYY-MM-DD format
granularity
string
The granularity of the cost data (e.g., daily, monthly)
Summary of costs retrieved successfully
total_cost
number
The total cost for the specified period
costs_by_resource
array
This response does not contain any headers
Invalid input
This response is empty
This response does not contain any headers
Summary of costs retrieved successfully
{ "total_cost": 5000.0, "costs_by_resource": [ { "resource_id": "resource_123", "resource_name": "VM Instance A", "total_cost": 1500.0, "cost_breakdown": [ { "date": "2023-05-01", "cost_type": "compute", "amount": 50.0 }, { "date": "2023-05-01", "cost_type": "storage", "amount": 20.0 }, { "date": "2023-05-02", "cost_type": "compute", "amount": 55.0 }, { "date": "2023-05-02", "cost_type": "storage", "amount": 22.0 } ] }, { "resource_id": "resource_456", "resource_name": "Database Instance B", "total_cost": 3500.0, "cost_breakdown": [ { "date": "2023-05-01", "cost_type": "storage", "amount": 200.0 }, { "date": "2023-05-01", "cost_type": "network", "amount": 100.0 }, { "date": "2023-05-02", "cost_type": "storage", "amount": 210.0 }, { "date": "2023-05-02", "cost_type": "network", "amount": 110.0 } ] } ] }
/budgets
Retrieve a list of all budgets for managing and tracking cloud expenses.
start_date
string
Filter budgets created after this date in YYYY-MM-DD format
end_date
string
Filter budgets created before this date in YYYY-MM-DD format
List of budgets retrieved successfully
This response does not contain any headers
Invalid input
This response is empty
This response does not contain any headers
List of budgets retrieved successfully
[ { "id": "budget_123", "name": "Production Budget", "description": "Budget for production environment", "amount": 5000.0, "start_date": "2023-06-01", "end_date": "2023-12-31", "notifications": [ { "threshold": 80.0, "email": "admin@example.com" }, { "threshold": 100.0, "email": "alerts@example.com" } ], "created_at": "2023-05-18T12:34:56Z", "updated_at": "2023-05-18T12:34:56Z" }, { "id": "budget_456", "name": "Development Budget", "description": "Budget for development environment", "amount": 3000.0, "start_date": "2023-07-01", "end_date": "2023-12-31", "notifications": [ { "threshold": 75.0, "email": "dev@example.com" }, { "threshold": 90.0, "email": "dev-alerts@example.com" } ], "created_at": "2023-06-01T12:34:56Z", "updated_at": "2023-06-01T12:34:56Z" } ]
/budgets
Create a new budget for managing and tracking cloud expenses.
name
string
required
The name of the budget
description
string
A brief description of the budget
amount
number
required
The total amount allocated for the budget
start_date
string
required
The start date for the budget in YYYY-MM-DD format
end_date
string
required
The end date for the budget in YYYY-MM-DD format
notifications
array
Budget created successfully
id
string
The unique identifier for the new budget
name
string
The name of the budget
description
string
The description of the budget
amount
number
The total amount allocated for the budget
start_date
string
The start date for the budget
end_date
string
The end date for the budget
notifications
array
created_at
string
The date and time when the budget was created
updated_at
string
The date and time when the budget was last updated
This response does not contain any headers
Invalid input
This response is empty
This response does not contain any headers
{ "name": "Production Budget", "description": "Budget for production environment", "amount": 5000.0, "start_date": "2023-06-01", "end_date": "2023-12-31", "notifications": [ { "threshold": 80.0, "email": "admin@example.com" }, { "threshold": 100.0, "email": "alerts@example.com" } ] }
Budget created successfully
{ "id": "budget_123", "name": "Production Budget", "description": "Budget for production environment", "amount": 5000.0, "start_date": "2023-06-01", "end_date": "2023-12-31", "notifications": [ { "threshold": 80.0, "email": "admin@example.com" }, { "threshold": 100.0, "email": "alerts@example.com" } ], "created_at": "2023-05-18T12:34:56Z", "updated_at": "2023-05-18T12:34:56Z" }
/budgets/{id}
Delete an existing budget by its identifier.
id
string
required
The unique identifier of the budget
Budget deleted successfully
This response is empty
This response does not contain any headers
Budget not found
This response is empty
This response does not contain any headers
/cost-optimization/recommendations
Retrieve recommendations for optimizing cloud costs.
resource_id
string
Filter recommendations by the unique identifier of the resource
start_date
string
The start date for the recommendations in YYYY-MM-DD format
end_date
string
The end date for the recommendations in YYYY-MM-DD format
Recommendations retrieved successfully
This response does not contain any headers
Invalid input
This response is empty
This response does not contain any headers
Recommendations retrieved successfully
[ { "id": "rec_123", "resource_id": "resource_123", "recommendation_type": "rightsizing", "description": "Resize instance to a smaller type to save costs.", "potential_savings": 50.0, "start_date": "2023-05-01", "end_date": "2023-05-31" }, { "id": "rec_456", "resource_id": "resource_456", "recommendation_type": "reserved instances", "description": "Purchase reserved instances for consistent workloads.", "potential_savings": 200.0, "start_date": "2023-06-01", "end_date": "2023-12-31" } ]
/budgets/{id}/cost-history
Retrieve the cost history of a specific budget.
start_date
string
Filter cost history starting from this date in YYYY-MM-DD format
end_date
string
Filter cost history up to this date in YYYY-MM-DD format
granularity
string
The granularity of the cost data (e.g., daily, monthly)
id
string
required
The unique identifier of the budget
Cost history retrieved successfully
budget_id
string
The unique identifier of the budget
cost_history
array
This response does not contain any headers
Budget not found
This response is empty
This response does not contain any headers
Cost history retrieved successfully
{ "budget_id": "budget_123", "cost_history": [ { "date": "2023-06-01", "amount": 200.0 }, { "date": "2023-06-02", "amount": 180.0 }, { "date": "2023-06-03", "amount": 210.0 } ] }