Skip to main content
The costs endpoints give you programmatic access to InfraAudit’s multi-cloud billing data. You can retrieve current-month overviews, daily or weekly trend breakdowns by service, cost forecasts with confidence intervals, and anomaly detection results. Base path: /api/v1/costs

POST /costs/sync — trigger billing sync

Fetches the latest billing data from all connected providers.

Response 202


GET /costs/overview — get cost overview

Returns the current month’s spend, last month’s total, and a breakdown by provider.

Response


GET /costs/trend — get cost trend

Returns daily, weekly, or monthly cost data grouped by provider, service, or region.

Query parameters

provider_id
integer
Filter to a specific provider. Defaults to all providers.
days
integer
default:"30"
Number of days of history to return.
granularity
string
default:"day"
Aggregation granularity: day, week, or month.
group_by
string
default:"provider"
Group breakdown by: provider, service, or region.

Response


GET /costs/forecast — get cost forecast

Returns a projected spend total with confidence interval and daily breakdown.

Query parameters

days
integer
default:"30"
Forecast horizon in days: 30, 60, or 90.
provider_id
integer
Scope forecast to a specific provider.

Response


GET /costs/anomalies — list cost anomalies

Returns days where actual spend exceeded the expected range.

Query parameters

provider_id
integer
Filter by provider.
days
integer
default:"30"
Look-back window in days.
status
string
Filter by status: active or dismissed.

POST /costs/anomalies//dismiss — dismiss anomaly

Request body

reason
string
Reason for dismissing the anomaly, for example Planned migration.