addProfile #
Adds a tenant's profile to a user.
User can only act on tenant they belongs.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/multi-tenancy/tenant/:tenantId/user/:_id/profile/:profile
Method: PUT
Other protocols #
{
"controller": "multi-tenancy/user",
"action": "addProfile",
"_id": "<kuid>",
"profile": "<profile name>",
"tenantId": "<tenant ID>",
}
Arguments #
_id
: User kuidprofile
: Profile name to addtenantId
: Tenant ID
Response #
Returns the user who have been updated.
{
"status": 200,
"error": null,
"action": "addProfile",
"controller": "multi-tenancy/user",
"requestId": "<unique request identifier>",
"result": {
"_id": "<kuid>",
"content": {
"profileIds": ["teacher-liia-moderator"],
"tenants": [
{
"group": "teacher",
"name": "liia",
"index": "tenant-teacher-liia",
"profiles": ["moderator"]
}
]
}
}
}
Edit this page on Github(opens new window)