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 #

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

Other protocols #

Copied to clipboard!
{
  "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.

Copied to clipboard!
{
  "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"]
        }
      ]
    }
  }
}