Skip to main content
POST/api/management/projects/{projectId}/security/roles

Parameter

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

Responses

HTTP status codeReasonModel
201CreatedRole
401UnauthorizedError
403ForbiddenError
404Project not foundError
409Resource already existsError
422Validation errorError
500Internal server errorError

Examples

JSON
{
    "projectId": "website",
    "name": "Movie Editors",
    "description": "Movie editors can carry out all actions with the exception of deleting entries",
    "enabled": true,
    "permissions": {
        "contentTypes": [],
        "entries": [
            {
                "languages": [
                    "en-GB"
                ],
                "id": "movie",
                "actions": [
                    "contensisEntryApproval.sysCreate",
                    "contensisEntryApproval.draft.submit",
                    "contensisEntryApproval.draft.sysUpdate",
                    "contensisEntryApproval.draft.sysClearPublishSchedule",
                    "contensisEntryApproval.draft.sysSetPublishSchedule",
                    "contensisEntryApproval.draft.sysClearUnpublishSchedule",
                    "contensisEntryApproval.draft.sysSetUnpublishSchedule",
                    "contensisEntryApproval.awaitingApproval.revoke",
                    "contensisEntryApproval.awaitingApproval.decline",
                    "contensisEntryApproval.awaitingApproval.approve",
                    "contensisEntryApproval.awaitingApproval.scheduledApprove",
                    "contensisEntryApproval.awaitingApproval.sysClearPublishSchedule",
                    "contensisEntryApproval.awaitingApproval.sysSetPublishSchedule",
                    "contensisEntryApproval.awaitingApproval.sysClearUnpublishSchedule",
                    "contensisEntryApproval.awaitingApproval.sysSetUnpublishSchedule",
                    "contensisEntryApproval.declined.submit",
                    "contensisEntryApproval.declined.sysUpdate",
                    "contensisEntryApproval.declined.sysClearPublishSchedule",
                    "contensisEntryApproval.declined.sysSetPublishSchedule",
                    "contensisEntryApproval.declined.sysClearUnpublishSchedule",
                    "contensisEntryApproval.declined.sysSetUnpublishSchedule",
                    "contensisEntryApproval.scheduled.cancel",
                    "contensisEntryApproval.scheduled.publishNow",
                    "contensisEntryApproval.scheduled.sysPublishScheduleInvoke",
                    "contensisEntryApproval.scheduled.sysSetPublishSchedule",
                    "contensisEntryApproval.scheduled.sysClearUnpublishSchedule",
                    "contensisEntryApproval.scheduled.sysSetUnpublishSchedule",
                    "contensisEntryApproval.versionComplete.sysUpdate",
                    "contensisEntryApproval.versionComplete.sysClearPublishSchedule",
                    "contensisEntryApproval.versionComplete.sysSetPublishSchedule",
                    "contensisEntryApproval.versionComplete.sysClearUnpublishSchedule",
                    "contensisEntryApproval.versionComplete.sysSetUnpublishSchedule",
                    "contensisEntryApproval.sysUnpublish"
                ]
            }
        ],
        "assets": [
            {
                "languages": [
                    "*"
                ],
                "id": "pdf",
                "actions": [
                    "*"
                ]
            }
        ],
        "webhookSubscriptions": {
            "actions": [
                "create",
                "view"
            ]
        },
        "proxies": {
            "actions": [
                "create",
                "update",
                "publish"
            ]
        },
        "eventStreams": {
            "actions": [
                "connect",
                "useCustomTemplates"
            ]
        },
        "blocks": {
            "actions": []
        },
        "renderers": {
            "actions": []
        }
    },
    "assignments": {
        "users": [
            "a.user"
        ],
        "groups": [
            "Movie editors"
        ],
        "apiKeys": [
            "Movie Import"
        ]
    }
}

Remarks

In order to create a role you must be a member of the "System Administrators" user group. If you do not have permission to create a role you will get a 403 Forbidden response.

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