...
Groups and Roles can be created and modified with a web service call. The objects returned in the response is dependent on the type of call made in the request.
Note: if Client Org functionality is turned on in the Configuration page, a Client Org can also be specified where applicable for certain types of calls.
...
Expand |
---|
|
The following code will call the Yellowfin web service and create the specified group in Yellowfin: Code Block |
---|
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Group Name");
group.setGroupDescription("Group Description");
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
// uncomment line below and set Client Reference ID if you wish to create the group in a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("CREATEGROUP");
rsr.setGroup(group);
rs = AdministrationService.remoteAdministrationCall(rsr);
|
The code will return SUCCESS in rs.getStatusCode() , otherwise it will return an error explaining why the process failed. Note: you can also put existing Yellowfin users into this newly created group at the same time by populating an AdministrationGroupMember array of AdministrationPerson objects. Each AdministrationPerson object only needs the LoginId variable set, and the AdministrationGroupMember array is saved at group.setGroupMembers() . This function will create a Yellowfin group. Note that you are able to save existing Yellowfin users into the new group in this function as well. Request Element | Data Type | Description |
---|
LoginId | String | Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au | Password | String | Password of the account used to connect to Yellowfin webservices | OrgId | Integer | Primary organisation ID within Yellowfin. Always set this to 1. | Function = “CREATEGROUP” | String | Web services function | OrgRef | String | Client Reference ID if this function is to be applied for a particular client organisation. The parameter is optional. | Group | AdministrationGroup | The AdministrationGroup object holding the Yellowfin user group’s name for the retrieval process |
These are the parameters that you need to set in the AdministrationGroup object: AdministrationGroup Element | Data Type | Description |
---|
GroupName | String | Name of the specified Yellowfin group | GroupDescription | String | Business description of the specified Yellowfin group | GroupMembers | Array (AdministrationPerson) | An array of AdministrationPerson objects. This is an optional parameter where you can set to save existing Yellowfin users into this group. Each AdministrationPerson object in this scenario only needs to have its UserId parameter set. |
The response returned will contain these parameters: Response Element | Data Type | Description |
---|
StatusCode | String | Status of the web service call. Possible values include: |
|
...
Expand |
---|
|
The following code will call the Yellowfin web service and exclude a specified user from a specified group in Yellowfin. Note: this user is not deleted from the group but merely excluded from the group definition. An example of why this would be useful is when: - John Doe is a member of Group A
- Group A is a member of Group B
- John Doe shouldn’t be a member of Group B, therefore he should be excluded from Group B
Code Block |
---|
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationGroup group = new AdministrationGroup();
AdministrationPerson person = new AdministrationPerson();
group.setGroupName("Group Name");
person.setUserId("test@yellowfin.com.au");
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
// uncomment line below and set Client Reference ID if you wish to get the group in a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("EXCLUDEUSERINGROUP");
rsr.setGroup(group);
rsr.setPerson(person);
rs = AdministrationService.remoteAdministrationCall(rsr);
|
The code will return SUCCESS in rs.getStatusCode() , otherwise it will return an error explaining why the process failed. This function will exclude a specified Yellowfin user from a specified group. Note that this user is not deleted from the group but merely excluded from the group definition. An example of why this would be useful is when: - John Doe is a member of Group A
- Group A is a member of Group B
- John Doe shouldn’t be a member of Group B, therefore he is to be excluded from Group B
Request Element | Data Type | Description |
---|
LoginId | String | Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au | Password | String | Password of the account used to connect to Yellowfin webservices | OrgId | Integer | Primary organisation ID within Yellowfin. Always set this to 1. | Function = “EXCLUDEUSERINGROUP” | String | Web services function | OrgRef | String | Client Reference ID if this function is to be applied for a particular client organisation. The parameter is optional. | Group | AdministrationGroup | The AdministrationGroup object holding the Yellowfin user group’s name for the retrieval process | Person | AdministrationPerson | The AdministrationPerson object holding the Yellowfin user’s User Id for the retrieval process |
These are the parameters that you need to set in the AdministrationGroup and AdministrationPerson objects: AdministrationGroup Element | Data Type | Description |
---|
GroupName | String | Name of the specified Yellowfin group |
AdministrationPerson Element | Data Type | Description |
---|
UserId | String | User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method |
The response returned will contain these parameters: Response Element | Data Type | Description |
---|
StatusCode | String | Status of the web service call. Possible values include: |
|
...
Expand |
---|
|
The following code will call the Yellowfin web service and modify the specified group in Yellowfin: Code Block |
---|
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Group Name");
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
// uncomment line below and set Client Reference ID if you wish to get the group in a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("MODIFYGROUP");
rsr.setGroup(group);
rs = AdministrationService.remoteAdministrationCall(rsr);
|
The code will return SUCCESS in rs.getStatusCode() , otherwise it will return an error explaining why the process failed. Note: you can also put existing Yellowfin users into this modified group at the same time by populating an AdministrationGroupMember array of AdministrationPerson objects. Each AdministrationPerson object only needs the LoginId variable set, and the AdministrationGroupMember array is saved at group.setGroupMembers() . This function will modify the details for a specified group in Yellowfin. Note that you are able to save existing Yellowfin users into the new group in this function as well. Request Element | Data Type | Description |
---|
LoginId | String | Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au | Password | String | Password of the account used to connect to Yellowfin webservices | OrgId | Integer | Primary organisation ID within Yellowfin. Always set this to 1. | Function = “MODIFYGROUP” | String | Web services function | OrgRef | String | Client Reference ID if this function is to be applied for a particular client organisation. The parameter is optional. | Group | AdministrationGroup | The AdministrationGroup object holding the Yellowfin user group’s name for the retrieval process |
These are the parameters that you need to set in the AdministrationGroup object: AdministrationGroup Element | Data Type | Description |
---|
GroupName | String | Name of the specified Yellowfin group | GroupDescription | String | Business description of the specified Yellowfin group | GroupMembers | Array (AdministrationPerson) | An array of AdministrationPerson objects. This is an optional parameter where you can set to save existing Yellowfin users into this group. Each AdministrationPerson object in this scenario only needs to have its LoginId parameter set. |
The response returned will contain these parameters: Response Element | Data Type | Description |
---|
StatusCode | String | Status of the web service call. Possible values include: |
|
...