The Cost Report API in Redis Cloud generates FOCUS-compliant cost files (CSV or JSON) for your subscriptions and databases. Reports are created asynchronously and must be retrieved using the task workflow, and output may differ from invoices because the API returns list-price usage with optional filtering.
This article walks through the prerequisites required to generate a valid report, provides a Quick Fix Table for the most common request and filtering errors, details step-by-step troubleshooting for request bodies, async behavior, and output validation, and outlines known behaviors and workarounds that explain differences from invoices and tag-handling nuances.
Read more here: Generate FOCUS-compliant cost report
Prerequisites
You’re using Owner or Viewer credentials (not Billing Admin).
startDate/endDateuseYYYY-MM-DDwith a range ≤ 40 days.You follow the async flow: POST
/cost-report→ poll GET/tasks/{taskId}untilstatus=processing-completed→ GET/cost-report/{costReportId}.
Quick Fix Table
Problem |
Likely cause |
Fast fix |
|---|---|---|
“Forbidden” as Billing Admin |
Role mismatch for this endpoint |
Use an Owner or Viewer API key. |
400 / “Invalid request” |
Dates not |
Correct the date format and keep the range ≤ 40 days. |
Report never appears |
Task status not polled to completion |
Poll |
Empty or overly broad output |
Missing/loose filters |
Add |
Tag filter ignored |
Tag objects missing |
Provide both |
Got JSON but expected CSV |
|
Set |
Totals differ from invoice |
List-price view; network costs may lag near month-end |
Reconcile with invoice/marketplace bill; re-run after finalization if needed. |
Step-by-Step Troubleshooting
Request body: Require
startDate,endDate(YYYY-MM-DD, ≤ 40 days). Add filters as needed:format,subscriptionIds,databaseIds,subscriptionType(essentials/pro),regions,tags(each withkeyandvalue).Async workflow: Generate (
POST /cost-report→taskId), poll (GET /tasks/{taskId}→status=processing-completed), then download (GET /cost-report/{costReportId}).Validate output: File includes all FOCUS columns; if sparse, tighten filters and verify the date window and actual usage.
Invoice parity: Expect differences vs invoices due to list price, discounts/credits, and timing (especially network-cost finalization).
Known Behaviors & Workarounds
Behavior |
What This Means |
Workaround / Note |
|---|---|---|
Role differs from Console |
Console permissions don’t map 1:1 to API |
Use Owner/Viewer for API generation. |
Date window cap |
Requests must use |
Split larger timeframes into multiple requests. |
Strict tag filter |
Missing either |
Send complete tag objects; validate server response. |
FOCUS-compliant output |
All FOCUS columns for FinOps tools |
Use CSV/JSON directly in BI pipelines. |
Timing differences vs invoices |
List price only; network cost finalization may lag |
Reconcile post-finalization; re-run near month-end +72h if needed. |
0 comments
Please sign in to leave a comment.