Cms fields schema
See Management API schema for every domain, the endpoint and authentication.
Types
ContentFieldType
"""The kind of a field in a content schema."""
enum ContentFieldType {
"""Single-line text."""
SINGLE_LINE_TEXT
"""Multi-line text."""
MULTI_LINE_TEXT
"""Markdown text."""
MARKDOWN
"""A URL-safe slug."""
SLUG
"""A number, integer or decimal."""
NUMBER
"""A true or false value."""
BOOLEAN
"""A date, or a date and time."""
DATE
"""Any JSON value."""
JSON
"""A reference to an asset."""
ASSET
"""A reference to an HTML asset, an uploaded `.html` file."""
HTML_ASSET
"""A hex colour, `#rrggbb`."""
COLOR
"""An embedded block instance."""
CONTENT_BLOCK
"""A group of nested fields."""
GROUP
"""
A reference to another content entry, optionally limited to one target model.
"""
REFERENCE
}TextFormat
"""
The format of a single-line text value, which sets how the value is checked.
"""
enum TextFormat {
"""Any text."""
PLAIN
"""A URL with the `http` or `https` scheme."""
URL
"""An email address."""
EMAIL
"""
A slug. The value is lowercased, and runs of other characters become `-`.
"""
SLUG
}ContentSchema
"""The set of fields that a model or a block defines."""
type ContentSchema {
"""The fields of the schema, in order."""
fields: [ContentFieldDefinition!]!
}ContentFieldDefinition
"""
One field in a content schema. Each implementation adds the settings of its kind.
"""
interface ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
}SingleLineTextFieldDefinition
"""A single-line text field."""
type SingleLineTextFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""The format the value must have."""
format: TextFormat!
"""
A regular expression the whole value must match, checked after the format. Null for none.
"""
pattern: String
"""The fewest characters allowed. Null for no minimum."""
minLength: Int
"""The most characters allowed. Null for no maximum."""
maxLength: Int
}MultiLineTextFieldDefinition
"""A multi-line text field."""
type MultiLineTextFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""The fewest characters allowed. Null for no minimum."""
minLength: Int
"""The most characters allowed. Null for no maximum."""
maxLength: Int
}MarkdownFieldDefinition
"""A Markdown field."""
type MarkdownFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
}SlugFieldDefinition
"""A slug field."""
type SlugFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""
The key of the field the slug derives from, such as `title`. Null when it derives from none.
"""
derivedFromKey: String
}NumberFieldDefinition
"""A number field."""
type NumberFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""The lowest value allowed. Null for no minimum."""
min: Float
"""The highest value allowed. Null for no maximum."""
max: Float
"""Whether the value must be an integer."""
integerOnly: Boolean!
}BooleanFieldDefinition
"""A boolean field."""
type BooleanFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
}DateFieldDefinition
"""A date field."""
type DateFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""Whether the value holds a time as well as a date."""
includeTime: Boolean!
}JsonFieldDefinition
"""A JSON field, for values with no fixed shape."""
type JsonFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
}AssetFieldDefinition
"""
An asset field, with optional limits on the MIME type, size and image dimensions of the asset.
"""
type AssetFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""
The MIME types the asset may have, such as `["image/png", "image/jpeg"]`. Null for any.
"""
acceptedMimeTypes: [String!]
"""The largest file size allowed, in bytes. Null for no limit."""
maxBytes: Int
"""
The smallest image width allowed, in pixels. Applies to images only. Null for no limit.
"""
minWidth: Int
"""
The largest image width allowed, in pixels. Applies to images only. Null for no limit.
"""
maxWidth: Int
"""
The smallest image height allowed, in pixels. Applies to images only. Null for no limit.
"""
minHeight: Int
"""
The largest image height allowed, in pixels. Applies to images only. Null for no limit.
"""
maxHeight: Int
}HtmlAssetFieldDefinition
"""
An HTML asset field, which accepts only an uploaded `.html` file (`text/html`).
"""
type HtmlAssetFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""The largest file size allowed, in bytes. Null for no limit."""
maxBytes: Int
}ColorFieldDefinition
"""A colour field. Values are lowercase hex with a leading `#`."""
type ColorFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
}ContentBlockFieldDefinition
"""A block field, which embeds block instances."""
type ContentBlockFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""
The category of block the field accepts. Null when it accepts any category.
"""
contentBlockCategory: ContentBlockCategory
}GroupFieldDefinition
"""A group field, which nests a set of fields."""
type GroupFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""The nested fields. Groups nest at most three levels deep."""
nestedFields: [ContentFieldDefinition!]!
}ReferenceFieldDefinition
"""A reference field, which points at other content entries."""
type ReferenceFieldDefinition implements ContentFieldDefinition {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field. Null when it has none."""
description: String
"""The kind of the field."""
type: ContentFieldType!
"""Whether the field holds a list of values."""
repeatable: Boolean!
"""Whether a filled content entry must hold a value for the field."""
required: Boolean!
"""
The key of the target model. Null when entries of any model in the workspace are accepted.
"""
contentModelKey: String
}ContentEntryData
"""
The values of a content entry, typed by its schema. Group values and embedded blocks hold the same
shape.
"""
type ContentEntryData {
"""The values, one per field, in the order of the schema's fields."""
values: [ContentFieldValue!]!
}ContentFieldValue
"""
One value in a content entry. The singular member holds the value when the field is not
repeatable, and the plural member when it is.
"""
interface ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
}SingleLineTextFieldValue
"""A single-line text value."""
type SingleLineTextFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
text: String
"""The values. Null when the field is not repeatable."""
texts: [String!]
}MultiLineTextFieldValue
"""A multi-line text value."""
type MultiLineTextFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
text: String
"""The values. Null when the field is not repeatable."""
texts: [String!]
}MarkdownFieldValue
"""A Markdown value."""
type MarkdownFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
markdown: String
"""The values. Null when the field is not repeatable."""
markdowns: [String!]
}SlugFieldValue
"""A slug value."""
type SlugFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
slug: String
"""The values. Null when the field is not repeatable."""
slugs: [String!]
}NumberFieldValue
"""A number value."""
type NumberFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
number: Float
"""The values. Null when the field is not repeatable."""
numbers: [Float!]
}BooleanFieldValue
"""A boolean value."""
type BooleanFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
boolean: Boolean
"""The values. Null when the field is not repeatable."""
booleans: [Boolean!]
}DateFieldValue
"""A date value."""
type DateFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
date: IsoDate
"""The values. Null when the field is not repeatable."""
dates: [IsoDate!]
}JsonFieldValue
"""A JSON value, stored as given."""
type JsonFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The value. Null when the field is repeatable or has no value."""
json: JSON
"""The values. Null when the field is not repeatable."""
jsons: [JSON!]
}AssetRef
"""
A reference to an asset, resolved to the version it pins, or to the asset's oldest version when it
pins none.
"""
type AssetRef {
"""
The referenced asset. Its own file fields describe its current version; `version` describes the
pinned one.
"""
asset: Asset!
"""
The version the reference resolves to. Null when that version cannot be found.
"""
version: AssetVersion
}AssetFieldValue
"""An asset value."""
type AssetFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""
The asset reference. Null when the field is repeatable or has no value.
"""
assetRef: AssetRef
"""The asset references. Null when the field is not repeatable."""
assetRefs: [AssetRef!]
}HtmlAssetFieldValue
"""An HTML asset value."""
type HtmlAssetFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""
The asset reference. Null when the field is repeatable or has no value.
"""
assetRef: AssetRef
"""The asset references. Null when the field is not repeatable."""
assetRefs: [AssetRef!]
}ColorFieldValue
"""A colour value."""
type ColorFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""
The colour, lowercase hex with a leading `#`, such as `#ff0000`. Null when the field is repeatable
or has no value.
"""
color: String
"""The colours. Null when the field is not repeatable."""
colors: [String!]
}ContentBlockFieldValue
"""An embedded block value."""
type ContentBlockFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""The embedded block. Null when the field is repeatable or has no value."""
block: EmbeddedContentBlock
"""The embedded blocks. Null when the field is not repeatable."""
blocks: [EmbeddedContentBlock!]
}GroupFieldValue
"""A group value."""
type GroupFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""
The values of the group. Null when the field is repeatable or has no value.
"""
group: ContentEntryData
"""The values of each group. Null when the field is not repeatable."""
groups: [ContentEntryData!]
}EmbeddedContentBlock
"""
A block instance inside a content entry: the block, which carries the schema, and its values.
"""
type EmbeddedContentBlock {
"""The embedded block."""
contentBlock: ContentBlock!
"""The values of the instance, typed by the block's schema."""
data: ContentEntryData!
}ReferenceFieldValue
"""A reference value."""
type ReferenceFieldValue implements ContentFieldValue {
"""The key of the field in the schema."""
key: String!
"""The kind of the field."""
type: ContentFieldType!
"""
The referenced content entry. Null when the field is repeatable, has no value, or names a missing
entry.
"""
contentEntry: ContentEntry
"""The referenced content entries. Null when the field is not repeatable."""
contentEntries: [ContentEntry!]
}ContentSchemaInput
"""The fields of a content schema."""
input ContentSchemaInput {
"""The fields of the schema, in order."""
fields: [ContentFieldDefinitionInput!]!
}ContentFieldDefinitionInput
"""
One field in a content schema. Set exactly one kind input, such as `singleLineText` or `number`;
any other count fails with `INVALID_INPUT`.
"""
input ContentFieldDefinitionInput {
"""The key of the field, which names its value in the entry data."""
key: String!
"""The label of the field."""
name: String!
"""The description of the field."""
description: String
"""Whether the field holds a list of values."""
repeatable: Boolean = false
"""Whether a filled content entry must hold a value for the field."""
required: Boolean = false
"""The settings of a single-line text field."""
singleLineText: SingleLineTextFieldInput
"""The settings of a multi-line text field."""
multiLineText: MultiLineTextFieldInput
"""Makes the field a Markdown field."""
markdown: MarkdownFieldInput
"""The settings of a slug field."""
slug: SlugFieldInput
"""The settings of a number field."""
number: NumberFieldInput
"""Makes the field a boolean field."""
boolean: BooleanFieldInput
"""The settings of a date field."""
date: DateFieldInput
"""Makes the field a JSON field."""
json: JsonFieldInput
"""The settings of an asset field."""
asset: AssetFieldInput
"""The settings of an HTML asset field."""
htmlAsset: HtmlAssetFieldInput
"""Makes the field a colour field."""
color: ColorFieldInput
"""The settings of a block field."""
contentBlock: ContentBlockFieldInput
"""The settings of a group field."""
group: GroupFieldInput
"""The settings of a reference field."""
reference: ReferenceFieldInput
}SingleLineTextFieldInput
"""The settings of a `SINGLE_LINE_TEXT` field."""
input SingleLineTextFieldInput {
"""The format the value must have."""
format: TextFormat = PLAIN
"""
A regular expression the whole value must match, checked after the format.
"""
pattern: String
"""The fewest characters allowed."""
minLength: Int
"""The most characters allowed."""
maxLength: Int
}MultiLineTextFieldInput
"""The settings of a `MULTI_LINE_TEXT` field."""
input MultiLineTextFieldInput {
"""The fewest characters allowed."""
minLength: Int
"""The most characters allowed."""
maxLength: Int
}MarkdownFieldInput
"""Marks a `MARKDOWN` field, which has no settings."""
input MarkdownFieldInput {
"""Unused."""
_: Boolean
}SlugFieldInput
"""The settings of a `SLUG` field."""
input SlugFieldInput {
"""The key of the field the slug derives from."""
derivedFromKey: String
}NumberFieldInput
"""The settings of a `NUMBER` field."""
input NumberFieldInput {
"""The lowest value allowed."""
min: Float
"""The highest value allowed."""
max: Float
"""Whether the value must be an integer."""
integerOnly: Boolean = false
}BooleanFieldInput
"""Marks a `BOOLEAN` field, which has no settings."""
input BooleanFieldInput {
"""Unused."""
_: Boolean
}DateFieldInput
"""The settings of a `DATE` field."""
input DateFieldInput {
"""Whether the value holds a time as well as a date."""
includeTime: Boolean = false
}JsonFieldInput
"""Marks a `JSON` field, which has no settings."""
input JsonFieldInput {
"""Unused."""
_: Boolean
}AssetFieldInput
"""The limits of an `ASSET` field. Every limit is optional."""
input AssetFieldInput {
"""
The MIME types the asset may have. Omit it, or pass an empty list, to accept any.
"""
acceptedMimeTypes: [String!]
"""The largest file size allowed, in bytes."""
maxBytes: Int
"""The smallest image width allowed, in pixels."""
minWidth: Int
"""The largest image width allowed, in pixels."""
maxWidth: Int
"""The smallest image height allowed, in pixels."""
minHeight: Int
"""The largest image height allowed, in pixels."""
maxHeight: Int
}HtmlAssetFieldInput
"""
The limits of an `HTML_ASSET` field. The MIME type is always `text/html`.
"""
input HtmlAssetFieldInput {
"""The largest file size allowed, in bytes."""
maxBytes: Int
}ColorFieldInput
"""Marks a `COLOR` field, which has no settings."""
input ColorFieldInput {
"""Unused."""
_: Boolean
}AssetRefInput
"""A reference to an asset in a content entry value."""
input AssetRefInput {
"""The ID of the asset."""
assetId: ID!
"""
The ID of the version to pin. Omit it to pin the asset's current version.
"""
versionId: ID
}ContentBlockFieldInput
"""The settings of a `CONTENT_BLOCK` field."""
input ContentBlockFieldInput {
"""
The category of block the field accepts. Omit it to accept any category.
"""
contentBlockCategory: ContentBlockCategory
}GroupFieldInput
"""The settings of a `GROUP` field."""
input GroupFieldInput {
"""The nested fields. Groups nest at most three levels deep."""
nestedFields: [ContentFieldDefinitionInput!]!
}ReferenceFieldInput
"""The settings of a `REFERENCE` field."""
input ReferenceFieldInput {
"""The key of the target model. Omit it to accept entries of any model."""
contentModelKey: String
}ContentEntryDataInput
"""The values of a content entry, a group, or an embedded block."""
input ContentEntryDataInput {
"""The values, one per field."""
values: [ContentFieldValueInput!]!
}ContentFieldValueInput
"""
One value in a content entry. Set the member that matches the field's type: singular when the
field is not repeatable, plural when it is. Markdown, slug and colour fields take `text`.
"""
input ContentFieldValueInput {
"""The key of the field in the schema."""
key: String!
"""A text value."""
text: String
"""Text values."""
texts: [String!]
"""A number value."""
number: Float
"""Number values."""
numbers: [Float!]
"""A boolean value."""
boolean: Boolean
"""Boolean values."""
booleans: [Boolean!]
"""A date value."""
date: IsoDate
"""Date values."""
dates: [IsoDate!]
"""A JSON value."""
json: JSON
"""JSON values."""
jsons: [JSON!]
"""An asset reference."""
assetRef: AssetRefInput
"""Asset references."""
assetRefs: [AssetRefInput!]
"""An embedded block."""
block: EmbeddedContentBlockInput
"""Embedded blocks."""
blocks: [EmbeddedContentBlockInput!]
"""The values of a group."""
group: ContentEntryDataInput
"""The values of each group."""
groups: [ContentEntryDataInput!]
"""The ID of a referenced content entry."""
contentEntryId: ID
"""The IDs of referenced content entries."""
contentEntryIds: [ID!]
}EmbeddedContentBlockInput
"""A block instance in a content entry value."""
input EmbeddedContentBlockInput {
"""The ID of the block to embed."""
contentBlockId: ID!
"""The values of the instance, typed by the block's schema."""
data: ContentEntryDataInput!
}