---
title: "Get All Field Definitions"
method: GET
path: "/collections/{collectionId}/schema"
tags: ["Schema"]
---

# Get All Field Definitions

`GET /collections/{collectionId}/schema`

## Request

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

This endpoint returns all field definitions for a given collection if the user has access.

## Path parameters

- `collectionId` integer, required

## Response `200`

OK with Array[Field Definition]

- object[]
  - `uri` string, required: Link to self
  - `name` string, required: Name of the field
  - `fieldType` string, required: Stores the type of the field. The type does not affect how the data is interpreted in the Data Service; it is for use on the client side. Valid values include `BOOLEAN`, `STRING`, `NUMBER`, and `ANY`.
  - `collection` string, required: Link to the associated collection
  - `isPrimary` boolean, required: Denotes whether the specified field is part of the primary key. The default value is false
  - `order` string: Denotes a default ordering for the fields. This is currently used by the Lucid client to determine the order in which the fields are displayed, unless the context suggests a better ordering.
  - `default` string: Default value for this field
  - `label` string: Override name for field which is used when displaying to users

---

[API](https://skmtc.dev/lucid/apis/lucid-data-api.md) - [All operations](https://skmtc.dev/lucid/apis/lucid-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lucid/apis/lucid-data-api/revisions/c14ed29dbeab?raw)
