Metadata API
Current implementation includes two read-only endpoints for source discovery and field metadata.
Base URL
Default prefix: /report-builder
Config key: report-builder.route_prefix
GET /report-builder/sources
Returns source summaries that are authorized for the current request.
Response 200:
json
{
"data": [
{
"key": "orders",
"label": "Orders"
}
]
}GET /report-builder/sources/{source}
Returns metadata for a single source.
Response 200:
json
{
"data": {
"key": "orders",
"label": "Orders",
"fields": [
{
"key": "total_amount",
"label": "Total Amount",
"type": "decimal",
"sortable": true,
"groupable": true,
"filter_operators": ["eq", "between"],
"aggregate_functions": ["sum"],
"format": "currency"
}
]
}
}Error behavior
403if source exists but request is not authorized404if source key does not exist
Notes
- Response metadata intentionally excludes private query internals.
- Build frontend controls from
fields,filter_operators, andaggregate_functions. - Do not assume future preview/run endpoints are available yet.