Accounts/Connections contain the information necessary to access a certain plugin (e.g. Google Drive, your own custom plugin, etc.) or database. When you add a database connection and click 'Connect', an account/connection is created, allowing you to retrieve datasets later on.
Note that accounts/connections use general terminology to accommodate various plugins as dataproviders. For example, a 'token' in Luzmo terminology corresponds to a 'password' in a database, whereas a 'scope' in Luzmo terminology may refer to a 'database' and can have a different meaning in a plugin.
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.create('account',
{
provider: "demodataplugin",
name: "Demo data connection",
description: {
en: "Connection to the demo data plugin"
}
}
);{
"properties": {},
"date": "2024-01-13T13:42:05.736Z",
"active": true,
"invalid": false,
"cache": 0,
"synced": false,
"datasets_meta_sync_interval": 1,
"datasets_meta_sync_enabled": true,
"provider": "demodataplugin",
"name": "Demo data connection",
"description": {
"en": "test for demo data connection"
},
"id": "35ce5450-a4e8-446b-8ab3-3845a0d07022",
"user_id": "690b7bd5-2c92-4432-ba47-35d785df1bi4",
"updated_at": "2024-01-13T13:42:05.757Z",
"created_at": "2024-01-13T13:42:05.738Z",
"identifier": null,
"expiry": null,
"scope": null,
"host": null,
"port": null,
"version": null,
"plugin_id": "1a79f0a4-b07e-45e5-aef6-1bcd4a12cb7a",
"shareable_id": "662e71d8-739b-248b-8519-960693816648"
}