Collection

Create Collection

Creates a new collection for the specified data source. Only succeeds if the user has access to the data source.

post/collections

Request

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

Request body

dataSourcestring required

URI of data source to add collection to

namestring required

Name of the new collection

propertiesobject required

The properties field takes an object of key-value pairs

Example request

{
  "dataSource": "https://data.lucid.app/dataSources/435",
  "name": "New Collection",
  "schema": [
    {
      "uri": "https://data.lucid.app/collections/2/schema/4",
      "name": "Co1B",
      "fieldType": "STRING",
      "collection": "https://data.lucid.app/collections/2",
      "isPrimary": false,
      "order": "1",
      "default": "5",
      "label": "User Friendly Field Name"
    }
  ],
  "properties": {
    "fontSize": "12"
  }
}

Response

OK with Collection

uristring required

URI of the collection

dataSourcestring required

Link to get parent data source

namestring required

Name of the collection

lastSyncstring required

Date the collection was last synced with upstream source

versionTimestampstring required

Timestamp of the last time the collection, the collection's schema, the collection's contents, one of its collection properties, or anything in any of its metadata collections was changed. It can be used to tell if a copy of the data is out of date and needs to be refreshed.

createdstring required

Date the collection was created

lastModifiedstring required

Date the collection was last modified

itemsstring required

Link to get items in the collection

schemastring required

Link to get schema for the collection

propertiesstring required

Link to get properties for the collection

metadatastring required

Link to get metadata for the collection

metadataTypestring

If a metadata collection, this specifies what tyep of metadata it contains

parentstring

If a metadata collection, this link will get its parent collection

syncStartedstring

Represents the sync status of the collection. When it is null, there is no sync happening. When it has a DateTime value, that value represents the start time for the sync that is currently happening.

deletedstring

Date the collection was deleted

Example response

{
  "uri": "https://data.lucid.app/collections/3",
  "dataSource": "https://data.lucid.app/dataSources/1",
  "name": "Collection 1",
  "lastSync": "2021-01-01T00:00:00Z",
  "versionTimestamp": "2021-01-01T00:00:00Z",
  "created": "2021-01-01T00:00:00Z",
  "lastModified": "2021-01-01T00:00:00Z",
  "items": "https://data.lucid.app/collections/3/items",
  "schema": "https://data.lucid.app/collections/3/schema",
  "properties": "https://data.lucid.app/collections/3/properties",
  "metadata": "https://data.lucid.app/collections/3/metadata"
}

Changes

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