Create #
Creates a new dashboard inside a tenant index.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/dashboard/:index
Method: POST
Body:
{
"label": "string",
"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"
}
}
Javascript #
kuzzle.query({
controller: 'dashboard-builder/dashboard',
action: 'create',
index: '<index>',
body: {
label: '<dashboard label>',
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: '<icon>',
defaultDateTimeRange: {
relativeDateRange: '<relativeDateRange>',
time: {
start: '<start-time>',
end: '<end-time>',
},
},
refreshInterval: '<refresh-interval>',
layoutPrecision: 12,
template: {
category: '<category>',
model: '<model>',
},
},
});
Arguments #
Arguments | Type | Description |
---|---|---|
index | string | Index name where the dashboard will be created. |
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. |
Layout Properties #
Arguments | Type | Description |
---|---|---|
settings | object | Specific settings of the widget. |
x | number | X position of the widget in the layout. |
y | number | Y position of the widget in the layout. |
w | number | Width of the widget. |
h | number | Height of the widget. |
i | string | ID of the widget. |
name | string | Name of the widget. |
mobileLayout | object | Layout configuration for mobile view. |
DefaultDateTimeRange Properties #
Arguments | Type | Description |
---|---|---|
relativeDateRange | string | Relative date range for the dashboard. |
time.start | string | Start time in HH:mm:ss format. |
time.end | string | End time in HH:mm:ss format. |
Template Properties #
Arguments | Type | Description |
---|---|---|
category | string | Template category (e.g., asset, group). |
model | string | Template model (e.g., Container). |