Report setup guide
This document explains how reporting is configured for the legacy facade and how to add or update reports.
Overview
The legacy report endpoints load configuration from platform configuration keys under the report prefix.
The current model separates report selection metadata from report implementation details:
report.Settings.Reports: list of reports the UI can show.report.Settings.Default: the default report key when no report is explicitly requested.report.Configurations.<configurationKey>.*: the actual configuration used to build a report.
This allows one UI report key to point to one specific configuration block.
Configuration shape
1. Report list shown to the UI
Create report.Settings.Reports as a JSON array.
[
{
"key": "afv-all",
"name": "AFV All",
"configurationKey": "afvAll"
},
{
"key": "afv-summary",
"name": "AFV Summary",
"configurationKey": "afvSummary"
}
]Meaning of each field:
key: external key used by the UI and query parameters.name: display name for the settings UI.configurationKey: the configuration block used at runtime.
2. Default report
Create report.Settings.Default as a string.
afv-allIf no option or report query parameter is passed, the legacy facade will use this report.
Runtime selection order
When /v1/Report or /v1/Report/download is called, the legacy facade resolves the report in this order:
?option=<report-key>?report=<report-key>report.Settings.Default- the first report available in
report.Settings.Reports
Create a report configuration
Each report implementation lives under:
report.Configurations.<configurationKey>For example:
report.Configurations.afvAll.FileName
report.Configurations.afvAll.Main.Filter.DimensionName
report.Configurations.afvAll.Columns.Date
report.Configurations.afvAll.Columns.Account
report.Configurations.afvAll.Filters.ScenarioNameRequired and optional keys
File name
Optional, but recommended.
Key
report.Configurations.afvAll.FileNameType
stringExample
AFV_ReportThis becomes the prefix of the exported file name.
Dimension pre-filter
Optional, but useful for performance.
Key
report.Configurations.afvAll.Main.Filter.DimensionNameType
stringExample
AFV RecognitionThis is applied before the report rows are built, so the DB/runtime only returns the dimensions you want.
Columns
Columns are stored one key per column under:
report.Configurations.<configurationKey>.Columns.<columnKey>Each value is JSON.
Example columns
Date
Key
report.Configurations.afvAll.Columns.DateType
{"name":"Date","expression":"from","type":"datetime","format":"yyyy-MM-dd","source":"scenarioInstance","order":1}Time
Key
report.Configurations.afvAll.Columns.TimeType
{"name":"Time","expression":"from","type":"datetime","format":"HH:mm:ss","source":"scenarioInstance","order":2}Account
Key
report.Configurations.afvAll.Columns.AccountType
{"name":"Account Name","expression":"username","type":"string","source":"user","order":3}Dimension name
Key
report.Configurations.afvAll.Columns.DimensionNameType
{"name":"Dimension Name","expression":"dimensionName","type":"string","source":"scenarioInstance","order":4}Available column JSON properties
A column definition can use these fields:
name: output column header.expression: JMESPath-like expression evaluated against the selected source.type:string,numeric, ordatetime.format: used fordatetimecolumns.source: one of:dimensionmetadatascenarioInstanceuser
order: column order in export.regex: optional regex applied after the expression result.regexGroup: optional capture group index or group name.
Filters
Filters are stored under:
report.Configurations.<configurationKey>.Filters.<filterKey>Each value is JSON.
Example filter
Key
report.Configurations.afvAll.Filters.ScenarioNameType
{"name":"AFV All","expression":"scenario_type","value":"AFV","source":"metadata"}Full example
Below is a small but complete report setup:
report.Settings.Reports
[
{
"key": "afv-all",
"name": "AFV All",
"configurationKey": "afvAll"
}
]report.Settings.Default
afv-allreport.Configurations.afvAll.FileName
AFV_Reportreport.Configurations.afvAll.Main.Filter.DimensionName
AFV Recognitionreport.Configurations.afvAll.Columns.Date
{"name":"Date","expression":"from","type":"datetime","format":"yyyy-MM-dd","source":"scenarioInstance","order":1}report.Configurations.afvAll.Columns.Account
{"name":"Account Name","expression":"username","type":"string","source":"user","order":2}report.Configurations.afvAll.Columns.DimensionName
{"name":"Dimension Name","expression":"dimensionName","type":"string","source":"scenarioInstance","order":3}report.Configurations.afvAll.Filters.ScenarioName
{"name":"AFV All","expression":"scenario_type","value":"AFV","source":"metadata"}Query parameters supported by the legacy facade
Select a report
/v1/Report/download?option=afv-allor
/v1/Report/download?report=afv-allFilter by user
userId is optional.
If it is provided, the facade:
- sends
externalHeatId=<userId>to dimension lookup, - keeps only dimensions that actually contain that user in
dimensionUsers.
Example:
/v1/Report/download?from=2026-02-01T00:00:00.000Z&to=2026-02-27T23:59:59.999Z&userId=7bd8d6f2-864f-486c-b258-51ab3How to add a new report
- Add a new entry to
report.Settings.Reports. - Set
configurationKeyto a unique value. - Create:
report.Configurations.<configurationKey>.FileNamereport.Configurations.<configurationKey>.Main.Filter.DimensionNameif neededreport.Configurations.<configurationKey>.Columns.*report.Configurations.<configurationKey>.Filters.*
- If you want it to be the default, update
report.Settings.Default. - Test with
/v1/Reportand/v1/Report/download.
Troubleshooting
Report downloads with no rows
Check:
- the
Main.Filter.DimensionNamevalue, - the report filters under
Filters.*, - whether the selected
userIdexists indimensionUsers.
Export headers are wrong
Check the JSON stored in Columns.*, especially:
nameordertype
JSON parsing warnings
If the facade logs errors such as:
Invalid JSON for report.Configurations.afvAll.Columns.Datethen the stored config value is malformed JSON and must be corrected.