Skip to main content
Browse Documentation
HTTP - Management

Update a role

Created by Contensis product team, last modified by zengenti on 02 Nov 2020

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/71b48d24-7f65-457d-bd51-cba977b74b74
{
    "name": {
        "en-GB": "Movie Editors"
    },
    "description": {
        "en-GB": "Movie editors can edit movies, but not submit or approve them"
    },
    "enabled": true,
    "permissions": {
        "entries": [
            {
                "id": "movie",
                "languages": ["*"],
                "actions": ["draft.*", "awaitingApproval.revoke"]
            }
        ],
        "assets": [{
                "id": "*",
                "languages": ["*"],
                "actions": ["contensisEntryBasic.*"]
            }
        ],
        "webhookSubscription": {
            "actions": [ "create", "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