Entity groups
Collect devices, assets, users, dashboards or customers in named groups, and use the groups to limit custom roles.
A group is a named set of entities of one type: devices, assets, users, dashboards or customers. Use groups to keep related things together ("Hostel tanks", "Library air conditioners", "Night shift operators") and to limit custom roles to them, for example "acknowledge alarms only for the devices in Hostel tanks".
Groups do not change the entities themselves. An entity can be in several groups, and deleting a group only removes the memberships.
Create a group
Tenant administrators open Customers & users > Groups and click Add group.
| Field | What to enter |
|---|---|
| Name | Up to 255 characters. Unique per type and owner (upper and lower case count as the same) |
| Members are | Devices, Assets, Users, Dashboards or Customers |
| Owner | Tenant, or one customer |
| Description | Optional, up to 1024 characters |
Type and owner cannot be changed after the group is created, because the members depend on them. Rename a group or change its description with the edit button.
Names and descriptions are shown in lists and exports, so the server refuses HTML tags, {{ }} templates, javascript: and control characters instead of storing them.
Add and remove members
Select a group in the list to see its members on the right.
- Add members searches the entities that may join the group by name and adds the ones you select. Only the first 50 matches are shown; refine the search to find more.
- Add by profile (device and asset groups) adds every device or asset of one profile that may join.
- Select members and click Remove to take them out of the group. Nothing else changes.
Who may join depends on the owner:
| Group owner | Members can be |
|---|---|
| Tenant | Any entity of the type in the tenant |
| A customer, devices, assets or users | Devices, assets or users assigned to that customer |
| A customer, dashboards | Dashboards assigned to that customer |
| A customer, customers | The customer itself and the customers below it in the customer hierarchy |
When an entity is deleted, it is removed from all its groups. A member that was moved to another customer stays in the group for the tenant administrator, but the customer's users no longer see it in the member list.
Who sees groups
| User | Groups |
|---|---|
| Tenant administrator | Reads and manages every group of the tenant |
| Customer user | Reads the groups owned by their own customer and their members; cannot change them |
| System administrator, public dashboard links | None |
These rules are checked by the server on every request, not only hidden in the UI. A custom role can restrict a tenant administrator or customer user further.
Groups in custom roles
On Customers & users > Roles, a role can have rules limited to groups:
- Pick a resource, the allowed actions and up to 20 groups. A role can have up to 50 such rules.
- The rule allows the actions only for members of the groups. Lists, entity queries and dashboards show only the members; other entities are refused with HTTP 403.
- Devices, assets, dashboards, customers and users are matched by group type. Alarms are matched on the alarm's originator, which must be in a device, asset or customer group.
- Create cannot be limited to groups, because a new entity is not in any group yet.
User groups can carry a role: every member of the user group gets it. A user reached by several roles (their own role and the roles of their user groups) may do what any of the roles allows. Roles still only take rights away: nobody gets more than their account type allows. See Custom roles.
Limits
| Setting | Default |
|---|---|
nexus.groups.max_groups_per_tenant | 1000 groups per tenant |
nexus.groups.max_members_per_group | 50,000 members per group |
nexus.groups.max_members_per_tenant | 200,000 memberships per tenant |
| Ids per add or remove request | 1000 |
nexus.groups.cache_ttl_sec | 30: other servers of a cluster see a change within this time |
Where it is stored
Groups live in two tables of the platform database, nexus_entity_group and nexus_entity_group_member. The server creates them on start when they are missing, so an existing installation needs no upgrade step, and the normal database backup includes them. No platform table is changed.
REST API
| Call | What it does |
|---|---|
GET /api/nexus/groups?type=&owner=&textSearch= | Groups the caller may see, sorted by name |
GET /api/nexus/groups/{groupId} | One group |
POST /api/nexus/groups | Create (no id) or update a group: {"name", "type", "description", "ownerCustomerId"} |
DELETE /api/nexus/groups/{groupId} | Delete a group and its memberships |
GET /api/nexus/groups/{groupId}/members?pageSize=&page= | One page of members with names |
POST /api/nexus/groups/{groupId}/members | Add members: {"ids": ["<uuid>", ...]} |
POST /api/nexus/groups/{groupId}/members/byProfile | Add every device or asset of a profile |
POST /api/nexus/groups/{groupId}/members/remove | Remove members: {"ids": [...]} |
DELETE /api/nexus/groups/{groupId}/members/{entityId} | Remove one member |
GET /api/nexus/groups/entity/{entityType}/{entityId} | Groups that contain an entity |
POST /api/nexus/roles/{roleId}/groups/{groupId} | Give a role to a user group |
DELETE /api/nexus/roles/groups/{groupId} | Remove the role of a user group |
Changes need a tenant administrator; reads also work for customer users within the rules above.