External Dashboards API: support container repeat field
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9.9k
- Forks
- 471
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 117
Description
Context
PR #2201 wires the basic dashboard containers and tabs shape through the v2 external API. The container-level repeat field (which expands a single container into one instance per group-by value at render time) was called out in #2015 review notes as future work and is not yet exposed.
Scope
- Add
repeattoDashboardContainerSchemain@hyperdx/common-utilsif not already there (the UI already uses it). - Mirror it on the v2 external API body schema and OpenAPI JSDoc.
- Conversion utilities in
packages/api/src/routers/external-api/v2/utils/dashboards.tspropagate the field on create / get / update. - Integration tests in
packages/api/src/routers/external-api/__tests__/dashboards.test.tscover round-trip withrepeatset, and the empty case (omitted) round-trips as before.
Out of scope
- The render-time expansion logic in the app is unchanged. This issue is purely about the API surface.
- MCP is tracked separately as part of the containers/tabs MCP follow-up.
Acceptance
- API consumers can set
repeaton a container and read it back unchanged. - OpenAPI spec lists the field with constraint parity to the Zod schema.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/api/src/routers/external-api/v2/utils/dashboards.ts and the schemas used by the v2 external API, then inspect packages/api/src/routers/external-api/tests/dashboards.test.ts. Add coverage for containers with repeat set and omitted, and verify create/get/update round-trip behavior plus OpenAPI constraint parity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100