SQL
dashboard.create
Create a dashboard
Details
- Endpoint
- POST /v1/dashboard
- Credits
- Free
- Rate class
- Light. Counts against your light requests per second.
Creates a dashboard of saved-query visualizations, text and section widgets with shared filters, a theme and a refresh schedule. Needs a login or an API key.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | |
| slug | string | |
| description | string | |
| widgets | array of any | [{ id, kind: viz | text | section, query_id, viz_id, text, title, link?, x, y, w, h }] on a 12 column grid. A section may carry link: { label, href } shown beside its title. |
| params | array of any | Shared filters: [{ key, type: text | number | date | list, value, options?, label? }]. A filter applies to every widget whose query has a parameter with the same key. |
| theme | string | One of "dark", "light". |
| refresh_sec | integer | Re-run every widget's query this often (10 s to 7 days, 0 = never). Short schedules run while someone is viewing. |
| tags | array of any | |
| links | array of any | Up to 4 outward links shown in the header: [{ label, href }], href a full https URL. |
| is_private | boolean |
Request
Send your key in the x-api-key header, or leave it out to use the keyless tier.
curl
curl -X POST "https://api.tide.ad/v1/dashboard" \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"name": "My dashboard",
"widgets": []
}'TypeScript
const res = await fetch("https://api.tide.ad/v1/dashboard", {
method: "POST",
headers: {
"x-api-key": process.env.TIDE_API_KEY!,
"content-type": "application/json",
},
body: JSON.stringify({
"name": "My dashboard",
"widgets": []
}),
});
const data = await res.json();Response
No example response is available for this method yet.