Custom dashboards let you build live monitoring views for your infrastructure by combining reusable code snippets into a configurable grid layout. Each widget runs a snippet that queries the Akua API and displays the result as a table, stat, JSON tree, or log output. Snippets use the same sandboxed JavaScript execution as MCP Code Mode: the sameDocumentation Index
Fetch the complete documentation index at: https://akua-1dce587a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
cnap.request() API, the same V8 isolate, the same security model. You can write snippets by hand, or let an AI agent build your dashboards for you.
How it works
Dashboards are built from two building blocks:- Snippets: JavaScript functions that query the Akua API and return data. Each snippet has a display type (table, stat, JSON, or logs) that controls how the result is rendered.
- Dashboards: Grid layouts that arrange snippets as widgets. Each widget can span 1–4 columns and runs its snippet automatically when you open the dashboard.
Creating a snippet
Navigate to Dashboards → Snippets tab and click New snippet. Snippets areasync JavaScript functions that use cnap.request() to call the Akua API. The workspace header is injected automatically, so you don’t need to pass authentication or workspace IDs.
Display types
The display type controls how the snippet result is rendered in dashboard widgets:| Display type | Return value | Use case |
|---|---|---|
| Table | Array of objects | List resources with columns |
| Stat | Single number or string | KPIs, counts, status values |
| JSON | Any object | Structured data, breakdowns |
| Logs | String | Text reports, log output |
The cnap.request() API
This is the same API available in MCP Code Mode. Snippets run in a sandboxed environment with access to a single function:
Snippets execute server-side in an isolated sandbox (the same sandbox that powers Code Mode). They cannot access
require, process, fs, or any Node.js APIs; only cnap.request() is available.Creating a dashboard
Navigate to Dashboards tab and click New dashboard. Give it a name and optional description, then click Create dashboard to open the builder.The dashboard builder
Dashboards open in view mode by default, showing your widgets in a live grid. Click Edit to enter edit mode, where overlay controls appear on each widget:- Move up/down: reorder widgets in the grid
- Resize (−/+): adjust column span from 1/4 to full width
- Edit snippet: jump to the snippet editor
- Delete: remove the widget
Workspace scoping
Snippets and dashboards follow the same workspace scoping as other Akua resources:- When a workspace is selected: you see snippets and dashboards belonging to that workspace.
- When “All workspaces” is selected: you see snippets and dashboards from all workspaces you have access to.
API
Manage snippets and dashboards programmatically.Snippets API
Create, update, run, and delete snippets.
Dashboards API
Create dashboards and manage their widget layout.
Related topics
Generate dashboards with AI
Let an AI agent build and iterate on dashboards.
Code Mode in action
How the same sandbox powers AI agent operations.
API introduction
API endpoints for snippets and beyond.
Workspaces
How workspaces organize resources.