Skip to main content
Anomalies are days where your actual cloud spend or resource performance deviates significantly from the expected range. InfraAudit uses statistical analysis to detect these deviations and surfaces the top contributing services for each anomaly. Base path: /api/v1/anomalies

GET /anomalies — list anomalies

Returns a list of detected anomalies within the specified time window.
GET /api/v1/anomalies
Authorization: Bearer <token>

Query parameters

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

Response

{
  "data": [
    {
      "id": 1,
      "type": "cost",
      "provider_id": 1,
      "date": "2024-01-14",
      "actual_amount": 452.30,
      "expected_amount": 290.00,
      "expected_upper": 377.00,
      "deviation_percent": 56.0,
      "top_services": [
        {
          "service": "EC2",
          "amount": 380.00,
          "vs_expected": 180.00
        }
      ],
      "status": "active",
      "detected_at": "2024-01-15T03:30:00Z"
    }
  ]
}
expected_amount
number
The expected daily spend based on historical patterns.
expected_upper
number
The upper bound of the expected range. Spend above this value triggers anomaly detection.
deviation_percent
number
How far the actual spend exceeded the expected amount, as a percentage.
top_services
array
The cloud services that contributed most to the anomaly, with their actual spend and variance from expected.

GET /anomalies/ — get anomaly details

Returns full details for a single anomaly.
GET /api/v1/anomalies/{id}
Authorization: Bearer <token>

POST /anomalies//dismiss — dismiss an anomaly

Dismisses an anomaly with an optional reason.
POST /api/v1/anomalies/{id}/dismiss
Authorization: Bearer <token>
Content-Type: application/json

Request body

reason
string
Explanation for dismissing this anomaly.
{
  "reason": "Planned deployment caused spend increase"
}