User Management Java APIs
Purpose and overview
This page documents the Kyvos Reporting Java APIs for SecurityManager-based administration across organization, user, and role management. It is intended for Java developers, integration engineers, and administrators who need to automate tasks such as organization CRUD operations, user and role management, privilege assignment, and user mapping.
Before using these APIs, ensure Kyvos Reporting is installed and accessible, the required Java client libraries are added to the classpath, the Report Client is initialized, and requests are executed using an authenticated UserInfo with the required permissions. Validate organization IDs, user IDs, role IDs, entity IDs, and privilege values before submitting requests.
The following sections provide imports, method signatures, usage steps, sample code references, and examples for common administration tasks such as organization management, user lookup and deletion, privilege assignment, role management, user mapping, and system privilege updates. API methods typically throw ISecurityException for security, connectivity, execution, or parsing failures. Lookup methods may return null if the requested object is not found.
For security and operational safety, follow least-privilege access, avoid hardcoding credentials, protect sensitive data in logs, and review privilege changes before applying them in production.
Key concepts
OrgInfo: Organization details, including ID, description, delete capability, and authentication settings.
UserInfo: User details used for authentication, lookup, privilege assignment, and role operations.
RoleInfo: Role metadata used for role creation, retrieval, assignment, and deletion.
AppInfo: Security principal receiving privileges, such as a user, role, or organization.
EntityInfo: Secured object such as a category, report, dashboard, cube object, or database connection.
EntityAccessRight and EntityGroupAccessRight: Access levels, grants, grouped rights, and operation behavior.
Access levels and opCode: Define how privileges are granted, denied, replaced, or updated.
Organization authentication modes: Configure Kyvos Reporting, external application, host application, or callback-based authentication.
Quick start
Add the required imports and Kyvos Reporting Java client libraries to the classpath.
Initialize the Report Client and create an authenticated requestor UserInfo.
Create a SecurityManager instance using
SecurityManager.getInstance().Build the required objects such as OrgInfo, UserInfo, RoleInfo, AppInfo, or EntityInfo.
Call the required API method, handle ISecurityException, and validate returned results before use.
Imports
Use the following imports for User Management APIs:
// User Management imports
import com.intellica.client.security.SecurityManager;
import com.intellica.client.exception.ISecurityException;
import com.intellica.client.security.Authentication;
// Organization-specific imports
import com.intellica.client.security.OrgInfo;
// User/Role-specific imports
import com.intellica.client.security.RoleInfo;
import com.intellica.client.common.Enums.SecurityTypes.ReportPrivileges;
import com.intellica.client.common.Enums;
import java.util.Vector;
import java.util.HashMap;
Organization Management APIs
Get Organization by ID
Retrieves details of an organization using its organization ID.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/Organization Management/GetOrgById.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Create a
SecurityManagerinstance.SecurityManager sMgr = SecurityManager.getInstance();Retrieve organization details using
getOrganizationById.
Method
public OrgInfo getOrganizationById(String orgId, UserInfo userInfo) throws ISecurityExceptionParameters
orgId: ID of the organization.
userInfo: Current user details.
Returns
OrgInfo object for the given
orgId. Returnsnullif not found.
Example
String organisationId = "Test";
OrgInfo orgObj = sMgr.getOrganizationById(organisationId, requestorUserInfo);
System.out.println("OrganizationName: " + orgObj.getOrgId());
System.out.println("Description: " + orgObj.getOrgDescription());
System.out.println("OrganizationMapType: " + orgObj.getMapType());
System.out.println("Authorization mode: " + orgObj.getAuthorizeMode());
System.out.println("AuthenticationObject: " + orgObj.getAuthenticationObj());Get Users List for Organization
Retrieves a list of users belonging to an organization.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/Organization Management/GetUserListForOrg.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Create a
SecurityManagerinstance.Call
getUserListForOrganization.
Method
public ArrayList getUserListForOrganization(String orgId, UserInfo userInfo) throws ISecurityExceptionParameters
orgId: ID of the organization.
Returns
ArrayList of
UserInfoobjects.
Example
ArrayList arrList = new ArrayList();
String orgId = "Intellica";
arrList = sMgr.getUserListForOrganization(orgId, requestorUserInfo);Get Organization List
Retrieves all organizations in the Kyvos Reporting repository.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/Organization Management/GetOrgList.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Create a
SecurityManagerinstance.Call
getOrgList.
Method
public ArrayList getOrgList(UserInfo userInfo) throws ISecurityExceptionReturns
ArrayList of
OrgInfoobjects.
Example
ArrayList arrList = new ArrayList();
arrList = sMgr.getOrgList(requestorUserInfo);Add Organization
Creates a new organization and sets its authentication mode.
Sample code:
<KyvosReporting_Install_Path>/SampleCodes/Java APIs/Organization Management/AddOrg.javaAddCallbackOrg.java(for callback authentication).
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Create
OrgInfoinstance.String organisationId = "Test"; OrgInfo addOrg = new OrgInfo(organisationId);Set authentication mode.
Method
public void setAuthenticateMode(int authenticateMode)Authentication Mode Values
1 – Intellicus (Kyvos Reporting) (
REPORTINGSYS)2 – External Application (
EXTERNALAPP)3 – Host Application (
HOSTAPP)4 – Callback (
CALLBACK)
Example
Authentication authInfo = new Authentication();
authInfo.setAuthenticateMode(Enums.SecurityTypes.Authentication.HOSTAPP);
addOrg.setAuthenticationObj(authInfo);
SecurityManager sMgr = SecurityManager.getInstance();
sMgr.addOrganization(addOrg, requestorUserInfo);Modify Organization
Updates organization details.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/Organization Management/ModifyOrg.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Retrieve organization by ID.
Update attributes.
Call
modifyOrganization.
Method
public void modifyOrganization(OrgInfo orgInfo, UserInfo userInfo) throws ISecurityExceptionExample
String organisationId = "Test";
OrgInfo modOrg = sMgr.getOrganizationById(organisationId, requestorUserInfo);
modOrg.setCanDelete(true);
modOrg.setOrgDescription("THIS IS A TEST ORGANIZATION");
SecurityManager sMgr = SecurityManager.getInstance();
sMgr.modifyOrganization(modOrg, requestorUserInfo);Delete Organization
Deletes an existing organization.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/Organization Management/DeleteOrg.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Retrieve organization by ID.
Call
deleteOrganization.
Method
public void deleteOrganization(OrgInfo orgInfo, UserInfo userInfo) throws ISecurityExceptionExample
String organizationId = "Test";
OrgInfo delOrg = sMgr.getOrganizationById(organizationId, requestorUserInfo);
SecurityManager sMgr = SecurityManager.getInstance();
sMgr.deleteOrganization(delOrg, requestorUserInfo);Assign Category Privileges to Organization
Grants category access privileges to an organization.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignCategoryPrivilegesToOrg.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Create a
SecurityManagerinstance.Create
AppInfowith the target organization.Create
EntityInfofor the category.Create
EntityAccessRightand set the access level.Optionally, set entity group access rights (Reports, Dashboards).
Call
grantEntityPrivileges.
Method
public void grantEntityPrivileges(EntityInfo entity, EntityAccessRight entityAccessRight, UserInfo userInfo) throws ISecurityExceptionParameters
entity: Entity object with ID and type (supported types in
EntityTypeNames).entityAccessRight: Object with
AppInfo, access level, and grants.userInfo: Current user details.
Example
AppInfo appInfo = new AppInfo(userId, "TestOrg", "");
EntityInfo entityInfo = new EntityInfo(catId, "CATEGORY");
EntityAccessRight ear = new EntityAccessRight();
ear.setAppInfo(appInfo);
ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.PARTIALACCESS);
ear.setAccessRightGrants("0,1,2");
// Report-level access
EntityGroupAccessRight reportEAR = new EntityGroupAccessRight();
reportEAR.setType("REPORT");
reportEAR.setAccessLevel(1);
reportEAR.setGrants("10,12,14");
ear.addEntityGroupAccessRight(reportEAR);
// Dashboard-level access
EntityGroupAccessRight dashboardEAR = new EntityGroupAccessRight();
dashboardEAR.setType("DASHBOARD2");
dashboardEAR.setAccessLevel(1);
ear.addEntityGroupAccessRight(dashboardEAR);
ear.setOpCode("REPLACE");
sMgr.grantEntityPrivileges(entityInfo, ear, requestorUserInfo);Assign Connection Privileges to Organization
Grants database connection privileges to an organization.
Sample code:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignConnectionPrivilegesToOrg.java
Steps
Initialize Report Client.
Initialize Requestor
UserInfo.Create a
SecurityManagerinstance.Create
AppInfowith the target organization.Create
EntityInfofor the connection.Create
EntityAccessRightand set the access level.Call
grantEntityPrivileges.
Method
public void grantEntityPrivileges(EntityInfo entity, EntityAccessRight entityAccessRight, UserInfo userInfo) throws ISecurityExceptionExample
AppInfo appInfo = new AppInfo(userId, "TestOrg", "");
EntityInfo entityInfo = new EntityInfo("DemoReportDB", "DBCONNECTION");
EntityAccessRight ear = new EntityAccessRight();
ear.setAppInfo(appInfo);
ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.FULLACCESS);
ear.setOpCode("REPLACE");
sMgr.grantEntityPrivileges(entityInfo, ear, requestorUserInfo);User Management Java APIs
Get User by ID
Use this API to get information for a specific user.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/GetUserById.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject to retrieve controller information for administration operations.SecurityManager sMgr = SecurityManager.getInstance();Get the user by user ID.
Method
public UserInfo getUserById(java.lang.String userId,
java.lang.String orgId,
UserInfo userInfo)
throws ISecurityExceptionReturns a UserInfo object for the specified userId and orgId. May return null.
Parameters
userId – ID of the requested user.
orgId – Organization ID of the requested user.
userInfo – Current user details.
Returns
UserInfo – Object containing the given user’s details.
Example
String userId = "Mary";
String orgId = "MyOrg";
UserInfo userInfo = sMgr.getUserById(userId, orgId, requestorUserInfo);Add User (Create User)
Use this API to create a new user in the Kyvos Reporting Repository.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AddUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.SecurityManager sMgr = SecurityManager.getInstance();Create a new
UserInfoinstance and set its attributes.String username = "Mary"; String password = "123456"; String orgId = "Org1"; UserInfo addUserInfo = new UserInfo(username, password, orgId);To make the user an organization admin:
addUserInfo.setAdmin(true);To make the user a super admin:
addUserInfo.setSuperAdmin(true);
Add the user to the Kyvos Reporting Repository.
Method
public void addUser(UserInfo newUserInfo, UserInfo userInfo) throws ISecurityExceptionAdds a new user to the Report Engine.
Parameters
newUserInfo – New user details.
userInfo – Current user details.
Example
sMgr.addUser(addUserInfo, requestorUserInfo);Assign Category Privileges to User
Use this API to assign category access privileges to a specific user, role, or organization.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignCategoryPrivilegesToOrg.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.SecurityManager sMgr = SecurityManager.getInstance();Create an
AppInfoinstance with user ID, organization, and app type (USER,ROLE, or""for Org).String userId = "Mary"; String orgId = "TestOrg"; String appType = "USER"; AppInfo appInfo = new AppInfo(userId, orgId, appType);Create an
EntityInfoobject for the target entity.EntityInfo entityInfo = new EntityInfo(catId, "CATEGORY");Create an
EntityAccessRightobject and set access rights.EntityAccessRight ear = new EntityAccessRight(); ear.setAppInfo(appInfo); ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.PARTIALACCESS); ear.setAccessRightGrants("0,1,2");(Optional) Assign access rights to reports under the category.
EntityGroupAccessRight reportEAR = new EntityGroupAccessRight(); reportEAR.setType("REPORT"); reportEAR.setAccessLevel(1); // 0 = deny, 1 = full, 2 = partial reportEAR.setGrants("10,12,14"); ear.addEntityGroupAccessRight(reportEAR);Set operation code.
ear.setOpCode("REPLACE");
Method
public void grantEntityPrivileges(EntityInfo entity,
EntityAccessRight entityAccessRight,
UserInfo userInfo)
throws ISecurityExceptionAssigns access rights to a user, role, organization, or everyone for an entity.
Parameters
entity – Target entity (
CATEGORY,REPORT,QO,PO,CUBEOBJECT,DASHBOARD2,DASHBOARD_WIDGET,DBCONNECTION).entityAccessRight – Access rights object containing
AppInfoand privileges.userInfo – Current user details.
Throws
ISecurityException – If the request fails due to:
Connection failure.
Read/write error.
Execution error on the engine.
Invalid or unparsed server response.
Example
sMgr.grantEntityPrivileges(entityInfo, ear, requestorUserInfo);Assign Report Privileges to User
Use this API to assign access privileges for a specific report to a user.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignReportPrivilegesToUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.Create an
AppInfoinstance.String appId = "Mary"; String orgId = "TestOrg"; String appType = "USER"; AppInfo appInfo = new AppInfo(appId, orgId, appType);Create an
EntityInfoinstance for the report.String reportId = "D07131A2-87AA-154E-6E17-6079C9AFD176"; EntityInfo entityInfo = new EntityInfo(reportId, "REPORT");Create and configure
EntityAccessRight.EntityAccessRight ear = new EntityAccessRight(); ear.setAppInfo(appInfo); ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.PARTIALACCESS); ear.setAccessRightGrants("0,2,4,6,7,8,12"); ear.setOpCode("REPLACE");
Method
(Same as Assign Category Privileges)
public void grantEntityPrivileges(EntityInfo entity,
EntityAccessRight entityAccessRight,
UserInfo userInfo)
throws ISecurityExceptionExample
sMgr.grantEntityPrivileges(entityInfo, ear, requestorUserInfo);Assign Entity Privileges to User
Use this API to assign privileges for an entity (such as Query Objects) to a user.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignEntityPrivilegesToUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.Create an
AppInfoinstance.String userId = "Mary"; String orgId = "TestOrg"; String appType = "USER"; AppInfo appInfo = new AppInfo(userId, orgId, appType);Create an
EntityInfoinstance.String entityId = "SalesQuery"; EntityInfo entityInfo = new EntityInfo(entityId, "QO");Create and configure
EntityAccessRight.EntityAccessRight ear = new EntityAccessRight(); ear.setAppInfo(appInfo); ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.PARTIALACCESS); ear.setAccessRightGrants("0,2");
Method
(Same as above)
public void grantEntityPrivileges(EntityInfo entity,
EntityAccessRight entityAccessRight,
UserInfo userInfo)
throws ISecurityExceptionExample
sMgr.grantEntityPrivileges(entityInfo, ear, requestorUserInfo);Assign System Privileges to User
Use this API to assign system-level privileges to a user. Both the target user (UserInfo) and the requesting user must be specified.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignSystemPrivilegesToUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.SecurityManager sMgr = SecurityManager.getInstance();Retrieve the target user by ID.
String userId = "FinanceUser"; String organization = "MyOrg"; UserInfo userInfo = sMgr.getUserById(userId, organization, requestorUserInfo);Assign system privileges.
Method
public void setSystemPrivileges(java.lang.String systemPrivileges)Sets system privileges in a comma-separated format.
Supported Privileges
CATEGORY_SETUP
DATA_ADMIN
IM_SUPPORT
SYSTEMPRIVILEGESMAP
SCHEDULER
REPORT_DESIGNER
DEPLOYREPORTBUNDLE
CATEGORY_SETUP_GLOBAL
SCHEDULER_GLOBAL
DATA_ADMIN_GLOBAL
ADHOCREPORTDESIGNER
WIDGET_DESIGNER
GENERATE_LINK
GENERATE_LINK_GLOBAL
Example
userInfo.setSystemPrivileges(
new com.intellica.client.utils.Utility().getRightsFromMaskedValue(
com.intellica.client.common.Enums.SecurityTypes.SystemPrivileges.CATEGORY_SETUP |
com.intellica.client.common.Enums.SecurityTypes.SystemPrivileges.SCHEDULER |
com.intellica.client.common.Enums.SecurityTypes.SystemPrivileges.SCHEDULER_GLOBAL |
com.intellica.client.common.Enums.SecurityTypes.SystemPrivileges.WIDGET_DESIGNER |
com.intellica.client.common.Enums.SecurityTypes.SystemPrivileges.REPORT_DESIGNER |
com.intellica.client.common.Enums.SecurityTypes.SystemPrivileges.ADHOCREPORTDESIGNER |
Enums.SecurityTypes.SystemPrivileges.GENERATE_LINK
)
);
sMgr.modifyUser(userInfo, requestorUserInfo);Assign Role to User
Use this API to assign an existing role to an application user. Existing roles remain intact.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignRoleToUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.Retrieve the target user.
String userId = "User1"; String orgId = "MyOrg"; UserInfo userInfo = sMgr.getUserById(userId, orgId, requestorUserInfo);Retrieve the role to be assigned.
String roleId = "Manager"; RoleInfo roleInfo = sMgr.getRoleById(roleId, orgId, requestorUserInfo);Grant the role.
Method
public void grantRoleToUser(UserInfo targetUInfo,
RoleInfo rInfo,
UserInfo userInfo)
throws ISecurityExceptionGrants a role to the specified user without removing existing roles.
Parameters
targetUInfo –
UserInfoobject for the user.rInfo –
RoleInfoobject representing the role.userInfo – Requesting user details.
Example
sMgr.grantRoleToUser(userInfo, roleInfo, requestorUserInfo);Assign Multiple Roles to User
Use this API to assign more than one role to an application user.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/AssignRolesToUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.Retrieve the target user.
String userId = "TestUser"; String orgId = "MyOrg"; UserInfo userInfo = sMgr.getUserById(userId, orgId, requestorUserInfo);Retrieve roles to be assigned.
String roleId1 = "Manager"; String roleId2 = "Administrator"; RoleInfo roleInfo1 = sMgr.getRoleById(roleId1, orgId, requestorUserInfo); RoleInfo roleInfo2 = sMgr.getRoleById(roleId2, orgId, requestorUserInfo);Add roles to an ArrayList.
ArrayList<RoleInfo> roleInfoArr = new ArrayList<>(); roleInfoArr.add(roleInfo1); roleInfoArr.add(roleInfo2);Assign roles to the user.
Method
public void assignRolesToUser(UserInfo targetUInfo,
java.util.ArrayList<RoleInfo> roleInfos,
UserInfo userInfo)
throws ISecurityExceptionAttaches multiple roles to the target user.
Parameters
targetUInfo – User to attach roles to.
roleInfos – List of roles.
userInfo – Current user details.
Example
sMgr.assignRolesToUser(userInfo, roleInfoArr, requestorUserInfo);Revoke Role from User
Use this API to revoke or remove a specified role from a user.
Sample code location:<KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/RevokeRoleFromUser.java
Steps
Initialize Report Client.
Initialize requestor
UserInfo.Create a
SecurityManagerobject.Retrieve the target user.
String userId = "User1"; String orgId = "MyOrg"; UserInfo userInfo = sMgr.getUserById(userId, orgId, requestorUserInfo);Retrieve the role to be revoked.
String roleId = "Manager"; RoleInfo roleInfo = sMgr.getRoleById(roleId, orgId, requestorUserInfo);Revoke the role.
Method
public void revokeRoleFromUser(UserInfo targetUInfo,
RoleInfo rInfo,
UserInfo userInfo)
throws ISecurityExceptionRemoves a role assigned previously to a user.
Parameters
targetUInfo –
UserInfoobject representing the user.rInfo –
RoleInfoobject representing the role.userInfo – Current user details.
Example
sMgr.revokeRoleFromUser(userInfo, roleInfo, requestorUserInfo);User Mapping
The User Mapping API maps a host application user to an Kyvos Reporting user in the Kyvos Reporting Repository.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/UserMapping.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.SecurityManager sMgr = SecurityManager.getInstance();Get the target user.
String userId = "Smith"; String password = ""; String orgId = "MyOrg"; UserInfo userInfo = new UserInfo(userId, password, orgId);Map the new user.
String newUserId = "John"; sMgr.mapAppIdToUser(newUserId, userInfo, requestorUserInfo);
Method: mapAppIdToUser
public void mapAppIdToUser(java.lang.String appId, UserInfo targetUInfo, UserInfo userInfo)
throws ISecurityExceptionAdds a mapping between an application ID and a user.
Parameter | Description |
|---|---|
| The application ID. |
| The target |
| Details of the current user. |
Delete User
The Delete User API removes an existing user from the Kyvos Reporting Repository.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/User Management/DeleteUser.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.SecurityManager sMgr = SecurityManager.getInstance();Get the user to delete.
String userId = "FinanaceUser"; String orgId = "FinanceOrg"; UserInfo targetUserInfo = sMgr.getUserById(userId, orgId, requestorUserInfo);Delete the user.
sMgr.deleteUser(targetUserInfo, requestorUserInfo);
Method: deleteUser
public void deleteUser(UserInfo targetUInfo, UserInfo userInfo)
throws ISecurityExceptionDeletes the specified user from the Report Engine.
Parameter | Description |
|---|---|
|
|
| The current user details. |
Role Management
Get Role List
The Get Role List API retrieves all roles from the Kyvos Reporting Repository.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/Role Management/GetRoleList.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.SecurityManager sMgr = SecurityManager.getInstance();Retrieve the role list.
ArrayList roleList = sMgr.getRoleList(requestorUserInfo);
Method: getRoleList
public java.util.ArrayList getRoleList(UserInfo userInfo)
throws ISecurityExceptionReturns a list of all roles in the Kyvos Reporting repository.
Returns |
|---|
|
Create Role
The Create Role API adds a new role to an existing organization.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/Role Management/AddRole.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.Create a new role.
String roleName = "MANAGER"; String orgId = "Org1"; RoleInfo newRole = new RoleInfo(roleName, orgId);Add the role.
sMgr.addRole(newRole, requestorUserInfo);
Method: addRole
public void addRole(RoleInfo roleInfo, UserInfo userInfo)
throws ISecurityExceptionAdds a new role to the Report Engine.
Parameter | Description |
|---|---|
| The new |
| Current user details. |
Assign Category Privileges to Role
The Assign Category Privileges API grants category access rights to a role.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/Role Management/AssignCategoryPrivilegesToRole.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.Create
EntityInfoandAppInfo.String roleId = "Manager"; String orgId = "hostOrg"; String categoryId = "B2996F87-FE41-8D19-6C67-B3C22803DD99"; EntityInfo entityInfo = new EntityInfo(categoryId, "CATEGORY"); AppInfo appInfo = new AppInfo(roleId, orgId, "ROLE");Configure access rights.
EntityAccessRight ear = new EntityAccessRight(); ear.setAppInfo(appInfo); ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.FULLACCESS);Assign privileges.
sMgr.grantEntityPrivileges(entityInfo, ear, adminUserInfo);
Method: grantEntityPrivileges
public void grantEntityPrivileges(EntityInfo entity,
EntityAccessRight entityAccessRight, UserInfo userInfo)Assigns access rights to a user, role, organization, or Everyone.
Parameter | Description |
|---|---|
| An entity object with ID and type. |
| Contains |
| Current user details. |
Assign Report Privileges to Role
The Assign Report Privileges API grants report access rights to a role.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/Role Management/AssignReportPrivilegesToRole.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.Create
EntityInfoandAppInfo.String roleId = "Manager"; String organisationId = "Intellica"; String reportId = "638CB7A6-F504-0ECD-008F-10B25253DCA8"; EntityInfo entityInfo = new EntityInfo(reportId, "REPORT"); AppInfo appInfo = new AppInfo(roleId, organisationId, "ROLE");Configure access rights.
EntityAccessRight ear = new EntityAccessRight(); ear.setAppInfo(appInfo); ear.setAccessLevel(Enums.SecurityTypes.AccessLevel.FULLACCESS);Assign privileges.
sMgr.grantEntityPrivileges(entityInfo, ear, adminUserInfo);
Delete Role
The Delete Role API removes a role from an organization in the Kyvos Reporting Repository.
Reference: <KyvosReporting_Install_Path>/SampleCodes/Java APIs/Role Management/DeleteRole.java
Steps
Initialize the Report Client.
Initialize the requestor
UserInfo.Create a
SecurityManagerinstance.Create the role to delete.
String roleId = "Manager"; String orgId = "Test"; RoleInfo roleInfo = new RoleInfo(roleId, orgId);Delete the role.
sMgr.deleteRole(roleInfo, requestorUserInfo);
Method: deleteRole
public void deleteRole(RoleInfo roleInfo, UserInfo userInfo)
throws ISecurityExceptionDeletes a role from the Report Engine.
Parameter | Description |
|---|---|
| The |
| Current user details. |