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

update #

Updates the properties of an existing soft tenant.

This action allows you to modify the name and the metadata associated with a specific soft tenant within a parent tenant.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/multi-tenancy/tenant/:tenantId/soft-tenants/:_id
Method: PUT

Other protocols #

{
  "controller": "multi-tenancy/soft-tenant",
  "action": "update",
  "tenantId": "teacher-liia",
  "_id": "class-a",
  "name": "Class A - Advanced",
  "metadata": {
    "geolocation": {
            "lon":12,
            "lat":12
        }
  }
}

Arguments #

  • tenantId: (URL Argument) The unique identifier of the parent tenant.
  • _id: (URL Argument) The unique identifier of the soft tenant to retrieve.
  • name: (Optional) The new name for the soft tenant.
  • metadata: (Optional) A JSON object containing the updated metadata.

Response #

Returns the requested soft tenant object:

  • id: The unique identifier of the soft tenant.
  • name: The name of the soft tenant.
  • metadata: The metadata object associated with the soft tenant.
{
  "status": 200,
  "error": null,
  "action": "get",
  "controller": "multi-tenancy/soft-tenant",
  "requestId": "<unique request identifier>",
  "result": {
    "id": "class-a",
    "name": "Class A",
    "metadata": {
         "geolocation": {
            "lon":43,
            "lat":7
        }
    }
  }
}