Data Source

Create Data Source from CSV

If able to successfully parse the attached file as a CSV file, a new data source with be created (with the same name as the attached file) that includes a single collection. The single collection in the newly created data source will contain the data from the CSV file. Each row will be an item, and each column will be labelled A, B, C, …, AA, AB, AC, .. in the order in which they were in the original file. There will be a single metadata collection created which represents the mapping between the id of each created item and the original row number of the row it was created from.

post/adapter/csv

Request

  • Base URL
    https://data.lucid.app
  • URL
    https://data.lucid.app/adapter/csv
  • Auth
    OAuth 2
    Authorization code: https://lucid.app/oauth2/authorize
    Token URL: https://api.lucid.co/oauth2/token scopes: data-service.admin

Request body multipart/form-data

filestring binary required

CSV file to upload

Example request

{
  "file": "file=@location/file.csv"
}

Response

OK with Data Source

uristring required

URI of the data source

namestring required

Name of the data source

adapterTypestring required

Type of adapter used to create the data source. Valid values are CSV, DATA_API, and UNKNOWN

collectionsstring required

Link to get collections for the data source

createdstring required

Date the data source was created

lastModifiedstring required

Date the data source was last modified

pendingboolean required

If a data source is marked pending it won't be availble for users to select within Lucid

dataSetstring required

Link to get the data set for the data source

linkParametersobject

Link parameters for the data source

deletedstring

Date the data source was deleted

Example response

{
  "uri": "https://data.lucid.app/dataSources/2967",
  "name": "file",
  "adapterType": "CSV",
  "collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
  "created": "2021-01-01T00:00:00Z",
  "lastModified": "2021-01-01T00:00:00Z",
  "pending": false,
  "dataSet": "https://data.lucid.app/dataSets/2168",
  "linkParameters": {
    "param1": "value1",
    "param2": "value2"
  },
  "deleted": "2021-01-01T00:00:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.