Skip to main content

Create a component

Log in to add to favourites
POST/api/management/projects/{projectId}/components/

Parameter

NameParameter typeTypeDescription
projectId(required)pathstringThe project identifier found in the project overview screen of the management console.

Responses

HTTP status codeReasonModel
201CreatedComponent
401UnauthorizedError
404Component not foundError
409Resource already existsError
422Validation errorError
500Internal server errorError

Examples

JSON
POST: /api/management/projects/movieDb/components/

{
    "isChild": false,
    "hasChildren": false,
    "canAddChildComponents": true,
    "canBeAddedAsChildComponent": true,
    "version": {
        "createdBy": "c.chamberlain",
        "created": "2021-09-29T09:08:35.5627633Z",
        "modifiedBy": "c.chamberlain",
        "modified": "2021-09-29T09:15:01.8108527Z",
        "publishedBy": "c.chamberlain",
        "published": "2021-09-29T09:15:03.4046546Z",
        "versionNo": "0.1"
    },
    "uuid": "10617c57-85f5-4149-9131-08ed4cd91234",
    "id": "movieRole",
    "projectId": "movieDb",
    "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": {},
            "default": null,
            "validations": {
                "allowedContentTypes": {
                    "contentTypes": [
                        "person"
                    ],
                    "message": null
                }
            },
            "editor": null
        },
        {
            "id": "role",
            "name": {
                "en-GB": "Role"
            },
            "dataType": "string",
            "dataFormat": null,
            "description": {},
            "default": null,
            "validations": {},
            "editor": null
        }
    ],
    "dataFormat": "component"
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request