Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Users can be added to one or more Groups. Groups in Yellowfin are predominately used for defining access to content or for broadcasting content. Using Groups can be more convenient than dealing with each individual user.

Group Definitions are defined by components, which could be individual users, or other components that represent multiple users, like other groups, LDAP groups or Roles.  

The REST API allows for the management of the group components and for retrieving the resultant group members of the expanded group components. 

When onboarding new users programmatically, it may be necessary to grant a new user access to certain content based on external criteria.  A user may have access to a module in the host application that Yellowfin is connected to. Access to this module grants access to specific domain-related reports. For example, users with access to the Finance module may be added to a “Finance Users” group, and that Group can be given access to all Finance related reports and dashboards. 

Group membership can be implemented during user on-boarding, however if a user’s access can change arbitrarily it may be necessary to update group membership periodically. There are different ways in which this could be implemented. The lazy paradigm involves updating group membership as a user attempts to access Yellowfin, and this could be part of the SSO login process.  Alternatively, group members could be updated directly when the user’s permissions change in the host application.

Listing Groups

A list of groups can be retrieved from the GET /api/user-groups end-point (https://developers.yellowfinbi.com/dev/api-docs/current/#tag/user-groups ) This can also be used to check whether a group already exists, or to find a group by another identifier, like its name. 

 

The following examples illustrate how to retrieve a list groups for a user in various programming languages

Java | C# | Go | JavaScript | PHP | Python

Creating a User Group

Groups can be created using the POST /api/user-groups end-point (https://developers.yellowfinbi.com/dev/api-docs/current/#operation/createUserGroup ). The model for User Group creation is:

{

  "groupName": "New Group",

  "groupDescription": "This a new group",

  "groupStatus": "OPEN",

  "isSecureGroup": "false"

}

After the successful creation of a group, the service will return a User Group model that contains the unique userGroupId of the new group. The userGroupId can then be used for identifying the group in other services. This service creates an empty group, group member components need to be added with the POST /api/user-groups/{groupId}/members end-point.

The following examples illustrate how to create a user group in various programming languages

Java | C# | Go | JavaScript | PHP | Python

Add Members to a Group

Members can be added to a group using the POST /api/user-groups/{groupId}/members end-point (https://developers.yellowfinbi.com/dev/api-docs/current/#operation/bulkAddUserGroupMembers ).

A list of new members can be posted using this end-point. The model that represents a group member is:

{

    "entityType": "PERSON",

    "entityCode": "",

    "entityId": 13235,

    "membershipType": "INCLUDED"

}

EntityType can be one of PERSON,  GROUP,  LDAP or ROLE.
EntityCode needs to be populated with a Role Code or LDAP group DN.

EntityId needs to be populated with either a user’s IpId, or a group’s IpId (where the IpId is the integer identifier for the member).

MembershipType can be one of INCLUDED or EXCLUDED. This determines whether the group member is included or explicitly excluded from the group.

The following examples illustrate how to add a user (identified by username), to a group (identified by its name) in various programming languages.

Java | C# | Go | JavaScript | PHP | Python

Remove Members from a Group

Members can be removed from a user group using DELETE /api/user-groups/{groupId}/members end-point (https://developers.yellowfinbi.com/dev/api-docs/current/#operation/bulkDeleteUserGroupMembers ).

Members are removed by supplying a query parameter that contains a list of memberIds to be removed. This is of the form: 

memberIds=['ROLE|YFADMIN','PERSON|13235']

The following examples illustrate removing a user (identified by username), from a group (identified by its name). 

Java | C# | Go | JavaScript | PHP | Python

List Group Member Components

Members of existing groups can be returned using the GET /api/user-groups/{groupId}/members end-point (https://developers.yellowfinbi.com/dev/api-docs/current/#operation/getUserGroupMemberList ). This service will return the components of a group. For example, this will return a Group or Role as a member, and not the users that those components represent. There is a separate end-point for getting the final flattened member list, where the individual users within a group or role are retrieved.

The following examples return the JSON payload representing a list of group member components in various programming languages.

Java | C# | Go | JavaScript | PHP | Python

List Group Members (Flattened)

Members of existing groups can be returned using the GET /api/user-groups/{groupId}/flat-users end-point (https://developers.yellowfinbi.com/dev/api-docs/current/#operation/getUserGroupFlatUserList ). This service will return the individual user members of a group. This service will return an expanded list of users that may have been included by group member components that represent multiple users, like other groups, roles or LDAP groups. 

The following example returns the JSON payload representing a list of group member components.

These code examples use Apache HTTP Client and GSON for handling REST calls and JSON serialization.

Java | C# | Go | JavaScript | PHP | Python