Data Item

Create Data Items

If the user has access to the collection, new data items are created using the supplied values. Primary key constraints are not enforced. Any field name that is not part of the schema definition is ignored by default. The schema should be created prior to any data items being created.

post/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 create data items for

Request body

object[] required

Field value pairs to create data items from. Each mapping is for a single data item

Example request

[
  {
    "Co1B": "value1",
    "Co2B": "value2"
  }
]

Response

OK with Array[Data Item] containing the newly created 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.