Data Item

Update Data Items

This endpoint allows updating multiple data items at once. The easiest way to accomplish is to modify the values in the response from Get All Data Items and send a PATCH request. Changing the values will update existing data item values. The collection field is ignored as the data item cannot be moved to a different collection. It the new value is null, it means the value is deleted. If the provided field name does not exist in the collection schema, that value is ignored.

patch/collections/{collectionId}/items

Request

  • Base URL
    https://data.lucid.app
  • URL
    https://data.lucid.app/collections/{collectionId}/items
  • Auth
    OAuth 2
    Authorization code: https://lucid.app/oauth2/authorize
    Token URL: https://api.lucid.co/oauth2/token scopes: data-service.admin

Path parameters

collectionIdinteger required

ID of collection to update data items for

Request body

uristring required

URI of data item to be updated

fieldsobject required

Field value pairs to update data items from. Mapping is for a single data item

Example request

{
  "uri": "https://data.lucid.app/collections/2/items/4",
  "fields": {
    "Co1B": "new column 1b value",
    "Co2B": "new column 2b value"
  }
}

Response

OK with Array[Data Item] containing the updated data items

uristring required

Link to self

collectionstring required

Link to the collection the item belongs to

fieldsobject required

Mapping of field names found in schema to this specific item's values

Example response

[
  {
    "uri": "https://data.lucid.app/collections/2/items/4",
    "collection": "https://data.lucid.app/collections/2",
    "fields": {
      "Co1B": "value1",
      "Co2B": "value2"
    }
  }
]

Changes

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