Skip to main content
This example pulls 30 days of cost trend data, checks for cost anomalies, generates a 30-day spend forecast, and downloads a PDF report — all through the InfraAudit REST API.

Prerequisites

  • A connected AWS, GCP, or Azure provider with at least one completed billing sync

Step 1: Trigger a billing sync (if needed)

Use the same polling pattern from the drift scan example to wait for it to finish.

Step 2: Get the cost overview

Output:

Step 3: Fetch 30-day trend by service

Output for the most recent day:

Step 4: Check for anomalies

Step 5: Get a 30-day forecast

Output:

Step 6: Generate and download a PDF report