- Documentation
- Learning Hub
- Dashboards as Code with the Foundation SDK
- Foundation SDK fundamentals
The Foundation SDK builder pattern
Slide 1 of 3
How builders work in the Foundation SDK
With the Foundation SDK you define dashboards one step at a time with chained method calls instead of one giant config object.
Follow the builder sequence
Most dashboard code follows this flow:
- Start with DashboardBuilder for dashboard-level settings.
- Add each panel with PanelBuilder.
- Add panel queries with DataqueryBuilder.
- Export the final dashboard JSON from the completed builder chain.
Why this matters
The builder pattern has practical advantages when defining dashboards in code.