skipcheck

TM1 client · Docs · Security

GroupService

import io.skipcheck.tm1.client.service.security.GroupService;

Security groups: /Groups and their users. A user's membership is set from the user's side, with UserService.setGroups.

List a group's members:

return tm1.groups().users("Planners", ODataQuery.none().select(User.NAME)).map(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
return tm1.groups()
    .create("Planners")
    .then(tm1.users().groups("alice", ODataQuery.none().select(Group.NAME)).map(Group::name).collectList())
    .flatMap(groups -> tm1.users()
        .setGroups("alice", Stream.concat(groups.stream(), Stream.of("Planners")).toList()));

Members

GroupService constructorA service sending its requests through session.
listGET Groups, streamed.
getGET Groups('name').
createCreates an empty group.
deleteDeletes the group; its users stay, without it.
usersGET Groups('name')/Users, streamed.

GroupService

constructor
GroupService(Tm1Session session)

A service sending its requests through session.

Parameters

session
the session

list

Flux<Group> list(ODataQuery query)

GET Groups, streamed.

Parameters

query
what to select, expand, filter and order

Returns

the groups

TM1 REST EntitySet Groups

get

Mono<Group> get(String name, ODataQuery query)

GET Groups('name').

Parameters

name
the group's name
query
what to select and expand

Returns

the group, or a Tm1NotFoundException if there's none

TM1 REST EntitySet Groups

create

Mono<Group> create(String name)

POST Groups: creates an empty group.

Parameters

name
the group's name

Returns

the group as created

TM1 REST EntitySet Groups

delete

Mono<Void> delete(String name)

DELETE Groups('name'): deletes the group; its users stay, without it.

Parameters

name
the group's name

Returns

completes when the group is deleted

TM1 REST EntitySet Groups

users

Flux<User> users(String name, ODataQuery query)

GET Groups('name')/Users, streamed.

Parameters

name
the group's name
query
what to select

Returns

the group's users

TM1 REST Navigation Group/Users

Also in the Javadoc.