Skip to main content
Browse Documentation
HTTP - Management

Update a role

Created by Contensis product team, last modified by zengenti on 28 Sep 2021

Updates an existing role.

PUT/api/management/projects/{projectId}/security/roles/{roleId}

Parameters

NameParameter typeTypeFormatDescriptionExampleRequired
projectIdpathstringThe project identifier found in the project overview screen of the management consolemovieDbtrue
roleIdpathstringuuidThe role identifier.true

Example

Update an existing role

PUT: /api/management/projects/movieDb/security/roles/e26c7d3a-e05b-4b69-a55a-5db3dca4dce9
{
    "projectId": "website",
    "name": "Movie Editors",
    "description": "Can carry out Create, Save, Submit / revoke, Approve / decline, Unpublish scheduling, Publish scheduling and Unpublish in English - Great Britain (en-GB)",
    "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": [
                "push",
                "release",
                "view"
            ]
        },
        "renderers": {
            "actions": [
                "create",
                "update",
                "view"
            ]
        }
    },
    "assignments": {
        "users": [
            "a.user"
        ],
        "groups": [
            "Movie editors"
        ],
        "apiKeys": [
            "Movie Import"
        ]
    }
}

Remarks

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

Responses

HTTP status codeReasonModel
200SuccessRole
401UnauthorizedError
403ForbiddenError
404Project not foundError
404Role not foundError
422Validation errorError
500Internal server errorError
Necessary Cookies
These cookies are necessary for this website to function correctly. They are set when you perform certain actions on the site, such as creating an account, logging in, changing your privacy preferences or submitting a form. You can block these cookies in your browser, but this will stop parts of the site from working properly.
Functional Cookies
These cookies allow the website to provide extra functionality and more personalised experiences. They may be set by us or by third party providers whose services we have added to our pages. If you choose not to allow these cookies, these services may not work correctly.
Analytical Cookies
These cookies record anonymous data on how visitors use our website to help us monitor how well our website works. This data includes how many people have looked at specific pages, how long visitors stay on the site, and what devices they use. We use this data to identify changes that we could make to improve your experience and make our website more efficient.
Marketing Cookies
We set some cookies so you are shown more relevant marketing content. These include cookies from third-party advertising networks to show you different adverts on their services if you have previously visited our site. If you choose not to allow these cookies, you may experience less relevant advertising on other sites.