Update perms #
Updates the access permissions for a dashboard inside a tenant index.
Returns an error if the dashboard does not exist.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/dashboard/:index/:_id/perms
Method: PUT
Body:
["soft-tenant-1", "soft-tenant-2"]
Javascript #
kuzzle.query({
controller: 'dashboard-builder/dashboard',
action: 'updatePerms',
index: '<index>',
_id: '<dashboard-id>',
body: {
restrictions: ['soft-tenant-1', 'soft-tenant-2'],
},
});
Arguments #
Arguments | Type | Description |
---|---|---|
index | string | Index name where the dashboard exists. |
_id | string | Unique identifier of the dashboard. |
Body Properties #
The restrictions property is an array of soft tenant IDs to restrict the dashboard's access.
Arguments | Type | Description |
---|---|---|
softTenantId | string | ID of the soft tenant. |
Response #
The response contains an array of updated access permissions for the dashboard.
Example Response #
[
{
"checked": true,
"softTenantId": "soft-tenant-1",
"softTenantName": "Soft Tenant 1"
},
{
"checked": false,
"softTenantId": "soft-tenant-2",
"softTenantName": "Soft Tenant 2"
}
]
Permission Properties #
Arguments | Type | Description |
---|---|---|
checked | boolean | Whether the soft tenant has access to the dashboard. |
softTenantId | string | ID of the soft tenant. |
softTenantName | string | Name of the soft tenant. |