Datasets and dashboards are in the Luzmo API a type of securable . As such, the API calls to create, update, delete, ... datasets or dashboards are executed against the securable endpoint.
Properties relevant to one, may not be relevant to the other. Those will be null (e.g. contents is null for a dataset while for dashboards it is one of the most important properties as it holds the definition of screenmodes, charts, ...).
Dashboards can be created, retrieved, updated and associated programmatically.
The dashboard definition itself is configured via a json object in the contents property. This json object defines per view modus which visualization elements that are contained within the dashboard and what position and data connections each of them have. It is important to notice that the structure of this json evolves as we add new visualization types or adapt existing ones. That is why the json starts by declaring the version of the dashboard config. This makes sure that we are backward compatible with dashboard configurations that are created according to an older structure. Although it is possible, typically users do not create a dashboard from scratch. If you want to learn more about this structure, we advice to make a dashboard via the UI and retrieve it via the API to see what it looks like. A common use case is to create dashboards via the editor and add a logo or change colors programmatically.
npm install @luzmo/nodejs-sdk{
"subtype": "api",
"rows": 0,
"featured": false,
"modified_at": "2024-03-28T09:24:17.444Z",
"cache": 0,
"storage": "clickhouse",
"uses_clickhouse_experimental": false,
"meta_sync_interval": 1,
"meta_sync_inherit": true,
"meta_sync_enabled": true,
"name": {
"en": "Test dashboard"
},
"description": {
"en": "This is a test dashboard"
},
"type": "dashboard",
"id": "aafca78a-0f21-41ae-862e-7e46a511c800",
"updated_at": "2024-03-28T09:24:17.570Z",
"created_at": "2024-03-28T09:24:17.450Z",
"subtitle": null,
"contents": {
"version": "0.1.97",
"syncScreenModes": true,
"datasetLinks": {},
"views": [
{
"screenModus": "desktop",
"options": {
"share": {
"poweredBy": false
},
"theme": {
"id": "default"
},
"alertingEnabled": true
},
"filterGroups": [],
"items": []
},
{
"screenModus": "tablet",
"options": {
"share": {
"poweredBy": false
},
"theme": {
"id": "default"
},
"alertingEnabled": true
},
"filterGroups": [],
"items": []
},
{
"screenModus": "mobile",
"options": {
"share": {
"poweredBy": false
},
"theme": {
"id": "default"
},
"alertingEnabled": true
},
"filterGroups": [],
"items": []
}
],
"parameters": [],
"timezone": {
"type": "fixed",
"id": "UTC"
}
},
"css": null,
"source_dataset": null,
"source_sheet": null,
"source_query": null,
"transformation": null,
"is_variant": false,
"migrated_rows": null,
"last_metadata_sync_at": null,
"last_metadata_sync_attempt_at": "2024-03-28T09:24:17.488Z",
"acceleration_id": null,
"account_id": null,
"template_id": null,
"original_id": null,
"modifier_id": "34b22f36-4904-497f-8acf-b0ba1d7e83cb",
"owner_id": "34b22f36-4904-497f-8acf-b0ba1d7e83cb",
"source_template_id": null
}