Common workflows
Practical recipes for the most common integrations. All examples assume a Bearer token in
$TOKEN and the base URL https://app.cloudoptify.com/api/v1.
Get a cost summary
Section titled “Get a cost summary”curl -H "Authorization: Bearer $TOKEN" \ "$BASE/cost/summary?from=2026-05-01&to=2026-05-31"Returns totals, per-provider split, and the forecast for the window. Related reads:
/cost/services, /cost/daily, /cost/forecast, /cost/comparison.
List open findings
Section titled “List open findings”curl -H "Authorization: Bearer $TOKEN" "$BASE/insights"curl -H "Authorization: Bearer $TOKEN" "$BASE/waste"curl -H "Authorization: Bearer $TOKEN" "$BASE/recommendations"Acknowledge a finding (requires write):
curl -X POST -H "Authorization: Bearer $TOKEN" "$BASE/insights/123/acknowledge"Create a Cloud Group
Section titled “Create a Cloud Group”curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{ "name": "Platform Engineering" }' \ "$BASE/groups"Then assign members via the group’s membership endpoints (Azure subscription IDs and AWS account IDs). Groups created by API behave exactly like portal-created ones — they appear in the global filter and group reports immediately.
Trigger a scan and poll status
Section titled “Trigger a scan and poll status”Requires the run scope:
RUN_ID=$(curl -s -X POST -H "Authorization: Bearer $TOKEN" "$BASE/scans" | jq -r '.runId')
curl -H "Authorization: Bearer $TOKEN" "$BASE/scans/$RUN_ID"The status endpoint reports the run’s state and result; GET /scans lists recent runs.
Manage alerts and reports
Section titled “Manage alerts and reports”Budget alerts and scheduled reports support full CRUD under /alerts and /reports — create
them from infrastructure-as-code, keep them in sync with your team list, or clean up
programmatically.