Create Dataprovider

POST
https://api.luzmo.com/0.1.0/dataprovider
API call form
Examples

Using the dataprovider service, you can create datasets for a user that are available on a provider. Providers can be web services (googleanalytics or googledrive), databases or plugins. For example, you could connect your PostgreSQL database by creating an account and then use the dataprovider 'create' action to add tables of that database to your users datasets via the API.

Account and Dataprovider are related. Below is an explanation what each one does and how to use them together:

Account : represents a connection to a database, plugin or web service. When you create an account for a user (e.g. for postgresql/redshift/...), that user will be able to create and query datasets via that provider.

Dataprovider : With a dataprovider, you can go a step further and already add specific datasets from a certain provider (this provider could also be your own plugin) to the users datasets. For plugins or dataproviders that require authentication, you need to provide a valid account.

To show how a dataprovider interacts with accounts and datasets we provided a full example in the code samples. The final result of the code is the addition of two PostgreSQL datasets to the users account. The user that will become owner of the datasets is the owner of the API token with which you execute the API call.

Parameters
Expand all Reset
properties *OBJECTrequired
provider *STRINGrequired
account_id *UUIDrequired
action ENUM
tables ARRAY[OBJECT]
datasets ARRAY[STRING]
Can be executed by:
Logged-in User
Can be associated to:
Did this page help you?
Yes No
Language
Shell
Node
Java
.NET
Python
PHP
Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
[
  {
    "count": 2,
    "data": [
      {
        "rows": 0,
        "featured": false,
        "modified_at": "2024-04-08T13:39:27.167Z",
        "cache": 0,
        "meta_sync_interval": 1,
        "meta_sync_inherit": true,
        "meta_sync_enabled": true,
        "id": "a5378899-63db-422d-9cf5-7a8d8033278f",
        "type": "dataset",
        "account_id": "124b0b05-0c6a-4019-b96d-6c3a922acfaa",
        "source_dataset": "124b0b05-0c6a-4019-b96d-6c3a922acfaa",
        "subtype": "postgres",
        "storage": "client",
        "name": {
          "en": "burritos"
        },
        "source_sheet": "public.burritos",
        "updated_at": "2024-04-08T13:39:27.175Z",
        "created_at": "2024-04-08T13:39:27.167Z",
        "last_metadata_sync_attempt_at": "2024-04-08T13:39:27.167Z",
        "modifier_id": "3dd681ff-46e4-4206-92ea-12262c9d3048",
        "owner_id": "3dd681ff-46e4-4206-92ea-12262c9d3048"
      },
      {
        "rows": 0,
        "featured": false,
        "modified_at": "2024-04-08T13:39:27.167Z",
        "cache": 0,
        "meta_sync_interval": 1,
        "meta_sync_inherit": true,
        "meta_sync_enabled": true,
        "id": "a5378899-63db-422d-9cf5-7a8d8033278f",
        "type": "dataset",
        "account_id": "124b0b05-0c6a-4019-b96d-6c3a922acfaa",
        "source_dataset": "124b0b05-0c6a-4019-b96d-6c3a922acfaa",
        "subtype": "postgres",
        "storage": "client",
        "name": {
          "en": "burrito_shops"
        },
        "source_sheet": "public.burrito_shops",
        "updated_at": "2024-04-08T13:39:27.175Z",
        "created_at": "2024-04-08T13:39:27.167Z",
        "last_metadata_sync_attempt_at": "2024-04-08T13:39:27.167Z",
        "modifier_id": "3dd681ff-46e4-4206-92ea-12262c9d3048",
        "owner_id": "3dd681ff-46e4-4206-92ea-12262c9d3048"
      }
    ]
  }
]