replaceUser #
Replaces a user with new configuration.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/users/<_id>/_replace[?refresh=wait_for]
Method: PUT
Body:
{
"profileIds": ["<profileId>"],
// additional user properties (optional)
"fullname": "John Doe"
}
Other protocols #
{
"controller": "security",
"action": "replaceUser",
"_id": "<kuid>",
"body": {
"profileIds": ["<profileId>"],
// additional user properties (optional)
"fullname": "John Doe"
}
}
Arguments #
_id
: user kuid
Optional: #
refresh
: if set towait_for
, Kuzzle will not respond until the user replacement is indexed (default:"wait_for"
)
Body properties #
profileIds
: an array of security profiles attributed to the user
Optional: #
- any other property: additional user information
Response #
Returns the user replacement status:
_id
: new user kuid_source
: new user content and attributed profiles
{
"status": 200,
"error": null,
"action": "replaceUser",
"controller": "security",
"requestId": "<unique request identifier>",
"result": {
"_id": "<kuid>",
"_source": {
"profileIds": ["<profileId>"],
"fullname": "John Doe"
}
}
}
Edit this page on Github(opens new window)