Official Plugins (Kuzzle v2.x)
Multi Tenancy v1.x
2

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 kuid
  • profile: Profile name to add
  • tenantId: 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"]
        }
      ]
    }
  }
}