List #
Lists all dashboards in a tenant index.
Returns an error if the index does not exist.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/dashboard/:index
Method: GET
Javascript #
kuzzle.query({
controller: 'dashboard-builder/dashboard',
action: 'list',
index: '<index>',
body: {
filter: '<filter>',
sort: {
_kuzzle_info: {
createdAt: { order: 'desc' },
},
dashboard: {
label: { order: 'asc' },
},
},
templateFilter: 'onlyTemplates', // or 'noTemplates'
dashboardIds: ['<dashboardId>'],
},
});
Arguments #
Arguments | Type | Description |
---|---|---|
index | string | Index name where the dashboards are located. |
Body Properties #
Arguments | Type | Description |
---|---|---|
filter | string | Filter to apply on the dashboard label. |
sort | object | Sort options for the dashboards. |
templateFilter | string | Filter to apply on the dashboard template. |
dashboardIds | array | Retrieve dashboards with the specified ids. |
Response #
The response contains an array of dashboards.
Example Response #
[
{
"_id": "dashboard-id-1",
"_source": {
"label": "Dashboard Label 1",
"layout": [
{
"settings": { "key": "value" },
"x": 0,
"y": 0,
"w": 4,
"h": 2,
"i": "widget-id",
"name": "Widget Name",
"mobileLayout": {
"x": 0,
"y": 0,
"w": 2,
"h": 1
}
}
],
"icon": "string",
"defaultDateTimeRange": {
"relativeDateRange": "string",
"time": {
"start": "string",
"end": "string"
}
},
"refreshInterval": "string",
"layoutPrecision": 12,
"template": {
"category": "string",
"model": "string"
}
}
},
{
"_id": "dashboard-id-2",
"_source": {
"label": "Dashboard Label 2",
"layout": [ … ],
"icon": "string",
"defaultDateTimeRange": { … },
"refreshInterval": "string",
"layoutPrecision": 12,
"template": { … }
}
}
]
Dashboard Properties #
Arguments | Type | Description |
---|---|---|
label | string | A descriptive name for the dashboard. |
layout | array | Layout configuration of the dashboard widgets. |
icon | string | FontAwesome icon for the dashboard. |
defaultDateTimeRange | object | Default date and time range for the dashboard. |
refreshInterval | string | Refresh interval for the dashboard. |
layoutPrecision | number | Number of columns for the dashboard grid. |
template | object | Template configuration for the dashboard. |