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, ...).
Only the owner of the dataset can update the dataset. Other users can be made owner by associating them with the dataset and using the 'flagOwner'.
npm install @luzmo/nodejs-sdkimport Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '<your Luzmo API key>',
api_token: '<your Luzmo API token>',
host: 'https://api.luzmo.com'
});
const response = await client.update('securable', '<the dataset id>',
{
name: {
en: "Sales dataset",
nl: "Verkoopsgegevens",
fr: "Données de ventes"
},
description: {
en: "Dataset with demo sales data.",
nl: "Dataset met demo verkoopsgegevens",
fr: "Dataset contenant des données de ventes"
},
cache: 0
}
);{
"id": "f13df731-fff4-4b6b-b6e0-58a7d3956685",
"type": "dataset",
"subtype": "demodataplugin",
"name": {
"en": "Sales dataset",
"nl": "Verkoopsgegevens",
"fr": "Données de ventes"
},
"description": {
"en": "Dataset with demo sales data.",
"nl": "Dataset met demo verkoopsgegevens",
"fr": "Dataset contenant des données de ventes"
},
"subtitle": null,
"contents": null,
"css": null,
"source_dataset": "8b7954e2-3664-4437-b8cb-4b05b6ddee91",
"source_sheet": "sales_dataset",
"source_query": null,
"transformation": null,
"rows": 102,
"featured": false,
"modified_at": "2023-09-14T15:36:26.338Z",
"cache": 0,
"storage": "client",
"is_variant": false,
"migrated_rows": null,
"uses_clickhouse_experimental": false,
"meta_sync_interval": 1,
"meta_sync_inherit": true,
"meta_sync_enabled": true,
"last_metadata_sync_at": "2024-02-21T11:47:27.432Z",
"last_metadata_sync_attempt_at": "2024-02-21T11:47:25.391Z",
"created_at": "2023-09-14T15:36:26.338Z",
"updated_at": "2024-02-21T11:47:27.431Z",
"acceleration_id": null,
"account_id": "8b7954e2-3664-4437-b8cb-4b05b6ddee91",
"template_id": null,
"original_id": null,
"modifier_id": "8ad836a8-3547-4ed6-ba59-b445bfed05ed",
"owner_id": "8ad836a8-3547-4ed6-ba59-b445bfed05ed",
"source_template_id": null
}