Skip to content

List collections

GET
/cms/data
curl --request GET \
--url https://api.example.com/cms/data \
--header 'API-Key: <API-Key>'

Every structured data collection and its fields.

Collections

Media typeapplication/json
object
data
Array<object>
StructuredCollection

A structured data collection: a user-defined shape whose records connectors write and frontends read.

object
id

Collection ID

integer
key

The key used in the API path (/cms/data/{key}). Never changes.

string
name

Name

string
description

Description

string
nullable
icon

Bootstrap Icons class

string
nullable
titleField

The text field whose value is a record’s title

string
nullable
fields

The fields a record’s data can hold

Array<object>
StructuredField

A field of a structured data collection. Its key and type never change once saved.

object
key

The field’s name in a record’s data: a lowercase letter, then lowercase letters, numbers and underscores

string
name

Name shown in the CMS

string
type

Field type

string
Allowed values: text long_text number boolean date datetime enum geo media reference json
description

Help for connector developers

string
nullable
required

A value is required in every record

boolean
multiple

The value is a list of items of the type (text, number, date, datetime, enum, media, reference)

boolean
unique

No two records of the collection can hold the same value

boolean
filterable

Can be used in filter[…] and sort when listing records. Lists, references and media always are.

boolean
maxLength

Text: the maximum length

integer
nullable
min

Number: the minimum

number format: float
nullable
max

Number: the maximum

number format: float
nullable
integer

Number: whole numbers only

boolean
nullable
values

Enum: the allowed values

Array<string>
nullable
target

Reference: what it points to, “record:”, “article”, “author” or “category”

string
nullable
default

The value a record gets when none is sent

mixed
nullable
updatedAt

When the collection last changed

string format: date-time
nullable
jsonSchema

GET /cms/data/{collection} only: the JSON Schema of a record’s data, to validate what a connector sends

object

Example

{
"data": [
{
"id": 3,
"key": "matches",
"name": "Matches",
"icon": "bi-calendar-event",
"titleField": "label",
"fields": [
{
"key": "kickoff",
"name": "Kick-off",
"type": "text",
"values": [
"Grass",
"Hybrid"
],
"target": "record:teams"
}
]
}
]
}