Sorry, no results found for "".

Show examples in:
Javascript HTTP

Content Management API > Model/Block

Model/Block

The way you define the kind of content you can edit inside your administrative area passes through the concept of Models, which are much like database tables. For backward-compatibility reasons, the API refers to models as "item types".

Object payload

id string

RFC 4122 UUID of item type expressed in URL-safe base64 format

Example: "DxMaW10UQiCmZcuuA-IkkA"
type string

Must be exactly "item_type".

name string

Name of the model

Example: "Blog post"
api_key string

API key of the model

Example: "post"
singleton boolean

Whether the model is single-instance or not

sortable boolean

Whether editors can sort records via drag & drop or not

modular_block boolean

Whether this model is a modular content block or not

tree boolean

Whether editors can organize records in a tree or not

ordering_direction enum, null

If an ordering field is set, this fields specify the sorting direction

asc

Ascending order

desc

Descending order

ordering_meta enum, null

Specifies the model's sorting method. Cannot be set in concurrency with ordering_field

Example: "created_at"
created_at

Order by date of creation

updated_at

Order by date of last update

first_published_at

Order by date of first publication

published_at

Order by date of last publication

draft_mode_active boolean

Whether draft/published mode is active or not

all_locales_required boolean

Whether we require all the project locales to be present for each localized field or not

collection_appearance enum

The way the model collection should be presented to the editors

Example: "compact"
compact

Compact view

table

Tabular view

hint string, null

A hint shown to editors to help them understand the purpose of this model/block

Example: "Blog posts will be shown in our website under the Blog section"
inverse_relationships_enabled boolean

Whether inverse relationships fields are expressed in GraphQL or not

draft_saving_active boolean

Whether draft records can be saved without satisfying the validations or not

meta.has_singleton_item boolean

If this model is single-instance, this tells the single-instance record has already been created or not

singleton_item

The item instance related to this item type

fields

The list of item type fields

fieldsets

The list of item type fieldsets

title_field

The field to use as display title

image_preview_field

The field to use as preview image

excerpt_field

The field to use as fallback description for SEO purposes

ordering_field

The field upon which the collection is sorted

workflow

The workflow to enforce on records

collection_appeareance enum Deprecated

The way the model collection should be presented to the editors

This field contains a typo and will be removed in future versions: use collection_appearance instead

Example: "compact"
compact

Compact view

table

Tabular view

has_singleton_item boolean Deprecated

If this model is single-instance, this tells the single-instance record has already been created or not

This field will be removed in future versions: instead, use the equivalent has_singleton_item field in the meta collection

Available endpoints