Official Plugins (Kuzzle v2.x)
multi-tenancy v1.x
2

removeProfile #

Removes a tenant's profile from an user.

User can only remove profiles to other users of the same tenant as they belong.

If the removed profile was the last profile for a tenant then the user is detached from this tenant.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/_/multi-tenancy/tenant/:tenantId/user/:_id/profile/:profile
Method: DELETE

Other protocols #

Copied to clipboard!
{
  "controller": "multi-tenancy/tenant",
  "action": "delete",

  "_id": "<optionnal kuid>",
  "profile": "<profile name>",
  "tenantId": "<tenant ID>",
}

Arguments #

  • _id: User kuid
  • profile: Profile name to remove
  • tenantId: Tenant ID

Response #

Returns the user who have been updated.

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "action": "removeProfile",
  "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"]
        }
      ]
    }
  }
}