Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/admbe/FluxOp/llms.txt

Use this file to discover all available pages before exploring further.

The reports endpoints provide governed analysis views over Flux’s analytical store, from cost summaries and rolling forecasts to governance posture and FOCUS v1.0 charge-level detail. All report endpoints require a reader session; write endpoints for fiscal outlook configuration require admin. Report data reflects the active analytical snapshot (or live store) as indicated by /api/session.

GET /api/reports/cost

Returns a cost summary for the requested period and scope, a per-resource breakdown, and a forward forecast series. Authentication: reader

Query parameters

ParameterTypeDefaultDescription
costTypestring"AmortizedCost"ActualCost or AmortizedCost.
currencystring""Preferred output currency (ISO 4217). Falls back to the estate’s native currency.
startDatedatenullInclusive period start (YYYY-MM-DD). Defaults to the start of the current month.
endDatedatenullInclusive period end (YYYY-MM-DD). Defaults to today.
subscriptionIdstring""Narrow to a single subscription GUID.
serviceNamestring""Narrow to a single Azure service (e.g. Virtual Machines).
resourceIdstring""Narrow to a single resource ID.
forecastDaysinteger30Forecast horizon in days. Must be between 7 and 120.
startDate must be on or before endDate. The endpoint returns 422 Unprocessable Entity if the constraint is violated.

Response

{
  "period": { "start": "2024-06-01", "end": "2024-06-10" },
  "summary": {
    "total": 18420.55,
    "currency": "USD",
    "breakdown": { /* by service */ }
  },
  "resources": [ /* per-resource cost rows */ ],
  "forecast": [ /* daily projected spend series */ ]
}

Example

curl "https://your-flux-host/api/reports/cost?costType=AmortizedCost&forecastDays=60" \
  -H "Cookie: AppServiceAuthSession=<token>"

GET /api/reports/cost/export

Streams the cost summary as a flat resource-level CSV or XLSX file. Authentication: reader

Query parameters

Same as GET /api/reports/cost plus:
ParameterTypeDefaultDescription
formatstring"csv"csv or xlsx.

CSV/XLSX columns

costType, currency, periodStart, periodEnd, subscriptionId, resourceId, resourceName, resourceType, resourceGroup, region, cost XLSX exports include a Metadata sheet with generation timestamp, analytics read mode, active snapshot version, and applied filters.

GET /api/reports/focus-cost

Returns FOCUS v1.0 charge-level data for the requested period and scope, including billed, effective, contracted, and list costs alongside pricing model, commitment discount, and manifest lineage fields. Authentication: reader

Query parameters

ParameterTypeDefaultDescription
currencystring""Preferred output currency.
startDatedatenullInclusive period start (YYYY-MM-DD).
endDatedatenullInclusive period end (YYYY-MM-DD).
subscriptionIdstring""Filter to a single subscription GUID.
serviceNamestring""Filter to a single Azure service name.
resourceIdstring""Filter to a single resource ID.
chargeCategorystring""FOCUS ChargeCategory value (e.g. Usage, Purchase).
pricingCategorystring""FOCUS PricingCategory value (e.g. Standard, Committed).
commitmentDiscountTypestring""FOCUS CommitmentDiscountType value (e.g. Reservation, SavingsPlan).
startDate must be on or before endDate. Returns 422 if violated.

GET /api/reports/workload

Returns a workload optimization report covering resource value classification, retirement candidates, and coverage gaps. Authentication: reader No query parameters. The response contains sections for overall workload health, retirement candidates ranked by risk-adjusted savings, and resources where coverage signals are insufficient for a confident recommendation.

GET /api/reports/governance

Returns Azure Policy compliance posture and a per-resource drilldown. Authentication: reader

Query parameters

ParameterTypeDefaultDescription
subscriptionIdstring""Filter to a single subscription.
assignmentIdstring""Filter to a specific policy assignment.
complianceStatestring""Filter by compliance state (e.g. NonCompliant, Compliant).

GET /api/reports/catalog

Returns the governed report catalog — the read-only set of approved measures, dimensions, filters, lineage declarations, and guardrails that constrain what report requests can specify. Authentication: reader No query parameters. Use this endpoint to discover available report models before calling POST /api/reports/catalog/validate or the semantic layer.

POST /api/reports/catalog/validate

Validates a governed report request against the approved catalog — checking that every measure, dimension, and filter key is declared and that no prohibited field is requested. Authentication: reader

Request body

{
  "reportId": "cost_by_service",
  "measures": ["totalCost"],
  "dimensions": ["serviceName", "subscriptionId"],
  "filters": {
    "costType": "AmortizedCost"
  }
}
FieldTypeDescription
reportIdstringIdentifier of the target report from the catalog.
measuresstring[]Requested aggregation measures.
dimensionsstring[]Requested grouping dimensions.
filtersobjectKey-value filter pairs.
Returns a validation result object. Returns 422 if any field falls outside the approved catalog.

GET /api/reports/fiscal-outlook

Returns fiscal-year actuals to date, projected remaining months with confidence bounds, and budget variance. The fiscal year start month and projection assumptions are configured by admins via PUT /api/reports/fiscal-outlook/config. Authentication: reader No query parameters.

PUT /api/reports/fiscal-outlook/config

Persists the fiscal year projection assumptions. Returns the updated fiscal outlook report immediately after saving. Authentication: admin

Request body

{
  "fyStartMonth": 7,
  "costType": "AmortizedCost",
  "growthPercentMonthly": 1.5,
  "includePlannedSavings": true,
  "savingsRampMonths": 3,
  "notes": "Assumes Q4 Reserved Instance purchases will complete."
}
FieldTypeConstraintsDescription
fyStartMonthinteger1–12, default 7Month number that starts the fiscal year (1 = January).
costTypestringActualCost | AmortizedCostCost metric for projection. Default AmortizedCost.
growthPercentMonthlyfloat−10 to 10Assumed month-over-month growth rate (%).
includePlannedSavingsbooleanWhether planned savings initiatives are modelled into the projection.
savingsRampMonthsinteger0–12Number of months over which planned savings ramp to full effect.
notesstringMax 500 charsOptional free-text notes attached to the configuration.

GET /api/reports/commitments

Returns the active commitment inventory providing a directional cost-mix view by pricing model (on-demand, reserved instance, savings plan, spot, and other). Authentication: reader No query parameters.

GET /api/reports/budgets

Returns the budget report with actuals-vs-targets comparison across configured estate and subscription scopes. Authentication: reader No query parameters.

GET /api/reports/executive-summary/export

Streams an XLSX executive summary workbook containing key KPIs, cost trends, top opportunities, and governance posture in a format suitable for distribution to non-Flux users. Authentication: reader No query parameters. The response is an application/vnd.openxmlformats-officedocument.spreadsheetml.sheet file with a date-stamped filename (e.g. flux-executive-2024-06-10.xlsx).
curl "https://your-flux-host/api/reports/executive-summary/export" \
  -H "Cookie: AppServiceAuthSession=<token>" \
  -o flux-executive-summary.xlsx

Build docs developers (and LLMs) love