updateProfile #
Updates a security profile definition.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/profiles/<_id>/_update[?refresh=wait_for]
Method: PUT
Body:
{
"policies": [
{
"roleId": "<roleId>"
},
{
"roleId": "<roleId>",
"restrictedTo": [
{
"index": "<index>"
},
{
"index": "<index>",
"collections": [
"<coll1>",
"<coll2>"
]
}
]
}
]
}
Other protocols #
{
"controller": "security",
"action": "updateProfile",
"_id": "<profileId>",
"body": {
"policies": [
{
"roleId": "<roleId>"
},
{
"roleId": "<roleId>",
"restrictedTo": [
{
"index": "<index>"
},
{
"index": "<index>",
"collections": [
"<coll1>",
"<coll2>"
]
}
]
}
]
}
}
Arguments #
_id
: profile identifier
Optional: #
refresh
: if set towait_for
, Kuzzle will not respond until the profile changes are indexed
Body properties #
policies
: profile definition
Response #
Returns the updated profile identifier and version number.
{
"status": 200,
"error": null,
"action": "updateProfile",
"controller": "security",
"requestId": "<unique request identifier>",
"result": {
"_id": "<profileId>",
"_version": 2
}
}
Edit this page on Github(opens new window)