HTTP - Management
Create a role
Created by Contensis product team, last modified by zengenti on 19 Jan 2021
Creates a new role.
POST/api/management/projects/{projectId}/security/roles
Parameter
Name | Parameter type | Type | Description | Example | Required |
---|---|---|---|---|---|
projectId | path | string | The project identifier found in the project overview screen of the management console | movieDb | true |
Example
POST: /api/management/projects/movieDb/security/roles/
{
"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": ["en-GB"],
"actions": ["sys.update", "awaitingApproval.revoke"]
}
],
"assets": [{
"id": "*",
"languages": ["*"],
"actions": ["contensisEntryBasic.*"]
}
],
"webhookSubscriptions": {
"actions": ["create", "view"]
},
"proxies": {
"actions": ["create", "update", "publish"]
}
},
"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 responses.