updateRole #
Updates a security role definition.
Note: partial updates are not supported for roles, this API route will replace the entire role content with the provided one.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/roles/<_id>/_update[?refresh=wait_for]
Method: PUT
Body:
{
"controllers": {
"*": {
"actions": {
"*": true
}
}
}
}
Other protocols #
{
"controller": "security",
"action": "updateRole",
"_id": "<roleId>",
"body": {
"controllers": {
"*": {
"actions": {
"*": true
}
}
}
}
}
Arguments #
_id
: role identifier
Optional: #
refresh
: if set towait_for
, Kuzzle will not respond until the role changes are indexed
Body properties #
controllers
: role definition
Response #
Returns the updated role identifier and version number.
{
"status": 200,
"error": null,
"action": "updateRole",
"controller": "security",
"requestId": "<unique request identifier>",
"result": {
"_id": "<roleId>",
"_version": 2
}
}
Edit this page on Github(opens new window)