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.
Request
- Base URLhttps://data.lucid.app
- URLhttps://data.lucid.app/adapter/csv
- AuthOAuth 2Authorization code: https://lucid.app/oauth2/authorizeToken URL: https://api.lucid.co/oauth2/token scopes: data-service.admin
Query parameters
URI of Data source to update
URI of Collection to update
Request body multipart/form-data
Example request
{
"file": "file=@location/file.csv"
}Response
OK with Data Source
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.