Cost Treemap
GET/api/v1/reports/cost-treemap
Cost treemap: items with cost, optionally grouped by a related type.
When aggregate is non-empty, each entry is a "<typeKey>:<costFieldKey>"
pair identifying a cost field on a related card type. The endpoint sums that
field across each primary card's related cards (relations resolved
bidirectionally, parallel relations de-duped) and adds the per-pair totals.
Because every pair targets a different card type or a different cost field
on the same type, no related card contributes more than once to a given
primary card's roll-up. This lets a type that has no cost field of its own
(e.g. Provider) display costs sourced from related Applications, IT
Components, etc., even all of them at once.
When parent_card_id is set, the primary card set is restricted to cards
that have at least one relation (in either direction) to that parent. This
powers the treemap drill-down — clicking a parent rectangle re-queries with
the related type as type and the parent's id as parent_card_id.
Request
Responses
- 200
- 422
Successful Response
Validation Error