GroupService
using Skipcheck.Tm1.Client.Services; Security groups: /Groups and their users. A user's membership is set from the
user's side, with UserService.SetGroupsAsync.
List a group's members:
return tm1.Groups.UsersAsync("Planners", ODataQuery.None().Select(User.Fields.Name)).Select(user => user.Name!);
Create a group and add a user to it, from the user's side:
// A new group, then alice added to it, from her side: her groups plus this one
await tm1.Groups.CreateAsync("Planners");
var groups = await tm1.Users.GroupsAsync("alice", ODataQuery.None().Select(Group.Fields.Name)).Select(group => group.Name!).ToListAsync();
await tm1.Users.SetGroupsAsync("alice", [.. groups, "Planners"]);
Members
GroupService constructor | A service that sends its requests through session. |
ListAsync | GET Groups, streamed. |
GetAsync | GET Groups('name'), or a Tm1NotFoundException if there's none. |
CreateAsync | Creates an empty group. |
DeleteAsync | Deletes the group; its users stay, without it. |
UsersAsync | GET Groups('name')/Users, streamed. |
GroupService
constructorGroupService(Tm1Session session)A service that sends its requests through session.
ListAsync
IAsyncEnumerable<Group> ListAsync(ODataQuery? query = null, CancellationToken cancellationToken = default)GET Groups, streamed.
TM1 REST EntitySet Groups
GetAsync
Task<Group> GetAsync(string name, ODataQuery? query = null, CancellationToken cancellationToken = default)GET Groups('name'), or a Tm1NotFoundException if there's none.
TM1 REST EntitySet Groups
CreateAsync
Task<Group> CreateAsync(string name, CancellationToken cancellationToken = default)POST Groups: creates an empty group.
TM1 REST EntitySet Groups
DeleteAsync
Task DeleteAsync(string name, CancellationToken cancellationToken = default)DELETE Groups('name'): deletes the group; its users stay, without it.
TM1 REST EntitySet Groups
UsersAsync
IAsyncEnumerable<User> UsersAsync(string name, ODataQuery? query = null, CancellationToken cancellationToken = default)GET Groups('name')/Users, streamed.
TM1 REST Navigation Group/Users