Data Source

Update Data Source from CSV

If able to successfully parse the attached file as a CSV file, the endpoint will overwrite the contents of the single collection with the new data. The collection reference is left unchanged, but will have new items.

A specific collection in a data source can be replaced by including both the data source and collection query parameters. In this case, the items in that single collection will be overwritten with the values from the CSV. The target collection's id will remain the same, i.e., the original collection is the same, just the items have changed. The specified collection must belong to the specified data source.

put/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

Query parameters

dataSourcestring required

URI of Data source to update

collectionstring

URI of Collection to update

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.