Skip to main content
Browse Documentation
HTTP - Management

Component

Created by Contensis product team, last modified by s.yearsley on 25 Sep 2020

A component determines a reusable schema added to content types which entries are then created from. Components contain a list of fields just like content types, and allow for a standardised schema for modelling content. Find out more about components.

Properties

NameData typeData formatDescriptionExample
idstringuuidA unique component identifier
projectIdstringThe project identifier found in the project overview screen of the management consolemovieDb
namestringlocalized valueThe friendly name given to a component
descriptionstringlocalized valueThe description text given to a component
fieldsobject[...]fieldA collection of fields that form the schema for an entry
dataFormatstringThis will always be component
versionobjectversionVersion information about the content type

Example

{
    "id": "movieRole",
    "projectId": "website",
    "name": {
        "en-GB": "Movie Role"
    },
    "description": {
        "en-GB": "A Persons role within a movie"
    },
    "fields": [
        {
            "id": "person",
            "name": {
                "en-GB": "Person"
            },
            "dataType": "object",
            "dataFormat": "entry",
            "description": {
                "en-GB": "The actor or crew member"
            },
            "default": {},
            "validations": {
                "allowedContentTypes": {
                    "contentTypes": [
                        "person"
                    ]
                }
            },
            "editor": {
                "id": "entry",
                "instructions": {
                    "en-GB": ""
                },
                "properties": {
                    "placeholderText": {
                        "en-GB": ""
                    }
                }
            }
        },
        {
            "id": "role",
            "name": {
                "en-GB": "Role"
            },
            "dataType": "String",
            "dataFormat": null,
            "description": {},
            "default": {},
            "validations": null,
            "editor": null
        }
    ],
    "dataFormat": "component",
    "version": {
        "createdBy": "s.derrickson",
        "created": "2016-10-12T09:29:18.5144641+01:00",
        "modifiedBy": "b.cumberbatch",
        "modified": "2016-10-13T10:15:12.1973648+01:00",
        "publishedBy": "b.cumberbatch",
        "published": "2016-10-13T10:15:12.1973648+01:00",
        "versionNo": "2.0"
    }
}