Schemas

Defining the Schema Object Structure

{
    "key": "blog",
    "name": "Blog",
    "type": "standard",
    "group": "Main",
    "subtype": null,
    "uri": null,
    "fields": [
        {
            "id": "title",
            "name": "Title",
            "type": "text",
            "status": "active",
            "ui": "textarea",
            "help": "",
            "options": {
                "visible": true,
                "permanent": true
            },
            "validation": {
                "required": true
            }
        },
        {
            "id": "slug",
            "name": "Title Slug",
            "type": "slug",
            "status": "active",
            "ui": "slug",
            "help": null,
            "options": {
                "source": "title"
            },
            "validation": {
                "unique": true
            }
        },
        {
            "id": "..."
        }
    ],
    "revisionsEnabled": false
}

Schema Variables

Field Type Description
key (unique) string (min:3, max:120, alphadash) An alphadash string. This is set on creation and cannot be changed later
name string (min:3, max:120) The name of the Schema
type string ("standard", "subschema", "combo") The type of the Schema (More info here). This is set on creation and cannot be changed later
group string (default:"") The group the Schema belongs to
subtype string (default:null, "singleton", "hierarchical", "resource", "table") The subtype of the Schema (More info here). This is set on creation and cannot be changed later
uri string (default:null) The preview URI for the Schema
fields array of Field Objects An array containing all the Schema Fields (More info here)
revisionsEnabled bool (default:false) Whether the Schema will have revisions enabled