Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{anchor:top}
{toc: class=contents}
h2. Overview
{styleclass: Class=topLink}[top|#top]{styleclass}


h2. User Replication and Managment
{styleclass: Class=topLink}[top|#top]{styleclass}
User replication involves synchronising each user in the OEM application with a named user in Yellowfin.

This allows Yellowfin to identify the user who is logged in, and to apply any restrictions that may be required. Synchronisation is usually performed using web service calls from the OEM application to Yellowfin. This can also be managed manually if users in the OEM application are generally static.

This section will outline how to create, manipulate, and delete users via web services. It is assumed that the web service is called to mirror user changes immediately after a user modification is made in the OEM application.

h3. Functions

h4. {expand:title=ADDUSER}
The following code will call the Yellowfin web service to create a user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");
person.setPassword("test");
person.setFirstName("Simple");
person.setLastName("Simon");
person.setInitial("S");
person.setSalutationCode("MR");
person.setRoleCode("YFADMIN");
person.setEmailAddress("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("ADDUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}
{code}
This code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the user creation process failed.

This function will create a user in Yellowfin. The details in the AdministrationPerson object will be used in the user creation process.
||Request Element||Data Type||Description||Setting Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "ADDUSER"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding all of the new user's details for the user creation process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Setting
Code||
|UserId|String|User ID of the new user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|
|Password|String|Password of the new user|setPassword()|
|FirstName|String|First name of of the new user|setFirstName()|
|LastName|String|Last name of of the new user|setLastName()|
|Initial|String|Middle name of the new user|setInitial()|
|SalutationCode|String|Title of the new user. Possible values include:
* DR
* MISS
* MR
* MRS
* MS|setSalutationCode()|
|RoleCode|String|Yellowfin role. The specified role here can be the Org Reference Code (YFADMIN) or the name of the role (Yellowfin Administrator)|setRoleCode()|
|EmailAddress|String|Email address of the new user|setEmailAddress()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|
{expand}

h4. {expand:title=DELUSER / DELETEUSER}
The following code will call the Yellowfin web service to create a user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}
{code}
This code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the user creation process failed.

This function will delete a user from Yellowfin. The details in the AdministrationPerson object will be used in the user deletion process.
||Request Element||Data Type||Description||Setting
Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "DELUSER" or "DELETEUSER"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding all of the user's details for the user creation process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Setting
Code||
|UserId|String|User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval
Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|

{expand}


h3. Retrieving & Validating User Information
Once a user has been created, the user's details can be retrieved using a web service call. The User ID field in the AdministrationPerson object is used to identify the user. As a result, a populated AdministrationPerson object will be returned. For security reasons, passwords will not be returned and will be {{NULL}}. User information can also be validated against the application in this section.

h4. {expand:title=GETUSER}
The following code will call the Yellowfin web service to retrieve a user's details:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}

{code}
This code will return an AdministrationPerson object with the user's details and {{SUCCESS}} in the {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.

This function will retrieve the details of a particular user in Yellowfin. The details in the AdministrationPerson object will be used in the retrieval process.
||Request Element||Data Type||Description||Setting Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "GETUSER"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Setting Code||
|UserId|String|User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval
Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|
|Person|AdministrationPerson|The AdministrationPerson object holding all of the returned user's details|getPerson()|

{expand}

h4. {expand:title=GETUSERBYIP}
The following code will call the Yellowfin web service to retrieve a user's details via their internal IpId:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setIpId(5);

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETUSERBYIP");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}
{code}
This code will return an AdministrationPerson object with the user's details and {{SUCCESS}} in the {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.

This function will retrieve the details of a particular user in Yellowfin by looking up their IP ID. The details in the AdministrationPerson object will be used in the retrieval process.
||Request Element||Data Type||Description||Setting
Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "GETUSERBYIP"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Setting
Code||
IpId|Integer|IP ID of the Yellowfin User|setIprId()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval
Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|
|Person|AdministrationPerson|The AdministrationPerson object holding all of the returned user's details|getPerson()|
{expand}

h4. {expand:title=GETUSERFROMSEARCH}
This function will retrieve users from Yellowfin based on a specific search string. This string is compared against the user's first name, last name, and email address.
||Request Element||Data Type||Description||Setting
Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices i.e admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "GETUSERSFROMSEARCH"| |String|Web services function|setFunction()|
|Parameters|Array (String)|Search string to match against Yellowfin users' first names, last names, and email address|setParameters()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval
Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|
|People|Array (AdministrationPerson)|An array of AdministrationPerson objects. These objects hold the returned users' details that match the search string|getPeople()|

{expand}

h4. {expand:title=VALIDATEUSER}
The following code will call the Yellowfin web service to validate a user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("admin@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setFunction("VALIDATEUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an AdministrationPerson object of the particular user if successful; otherwise it will return an error message explaining why the user validation process failed.

This function will validate a specified Yellowfin user, checking if the user currently exists within the application. The details in the AdministrationPerson object will be used in the user validation process.
||Request Element||Data Type||Description||Setting
Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "VALIDATEUSER"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Setting
Code||
|UserId|String|User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval
Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|
|Person|AdministrationPerson|The AdministrationPerson object holding all of the returned user's details|getPerson()|

{expand}

h4. {expand:title=VALIDATEPASSWORD}
The following code will call the Yellowfin web service to validate a user's password:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("testuser@yellowfin.com.au");
person.setPassword("test");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("VALIDATEPASSWORD");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will check if the password is expired and will return {{FAILURE}} in the {{rs.getStatusCode()}} if it is not, otherwise it will return {{SUCCESS}}.

This function will validate a Yellowfin user's password. The details in the AdministrationPerson object will be used in the password validation process.
||Request Element||Data Type||Description||Setting
Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "VALIDATEUSER"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Setting Code||
|UserId|String|User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|
|Password|String|Password of the Yellowfin user|setPassword()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval
Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|

{expand}


h3. Manipulating User Information
A user's details can be modified at a later time using a web service call. The User ID field in the AdministrationPerson object is used to identify the user, so this cannot be changed. The rest of the fields within an AdministrationPerson object are populated with the new changes. For security reasons, the user's password cannot be changed with this web service call, but with a separate CHANGEPASSWORD function (below).

h4. {expand:title=UPDATEUSER}
The following code will call the Yellowfin web service to edit a user's details:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("testuser");
person.setFirstName("John");
person.setLastName("Doe");
person.setInitial("F");
person.setSalutationCode("MR");
person.setRoleCode("YFADMIN");
person.setEmailAddress("testuser@yellowfin.com.au")

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("UPDATEUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an AdministrationPerson object with the user's details and {{SUCCESS}} in the {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.

This function will update a specified Yellowfin user's details. The details in the AdministrationPerson object will be used in the update process.
||Request Element||Data Type||Description||Setting Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "UPDATEUSER"| |Web services function|setFunction()|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|setPerson()|

These are the parameters that you can set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Retrieval
Code||
|UserId|String|User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|
|Password|String|Password of the Yellowfin user|setPassword()|
|FirstName|String|First name of of the Yellowfin user|setFirstName()|
|LastName|String|Last name of of the Yellowfin user|setLastName()|
|Initial|String|Middle name of the Yellowfin user|setInitial()|
|SalutationCode|String|Title of the Yellowfin user. Possible values include:
* DR
* MISS
* MR
* MRS
* MS|setSalutationCode()|
|RoleCode|String|Yellowfin role. The specified role here can be the Org Reference Code (YFADMIN) or the name of the role (Yellowfin Administrator)|setRoleCode()|
|EmailAddress|String|Email address of the Yellowfin user|setEmailAddress()|
|LanguageCode|String|Two letter code for the preferred language|setLanguageCode()|
|IpId|Integer|Internal Yellowfin IP ID|setIpId()|
|TimeZoneCode|String|The TimeZoneCode of the Yellowfin user.  See appendix for valid values.|setTimeZoneCode()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|
|Person|AdministrationPerson|The AdministrationPerson object holding all of the updated user's details|getPerson()|

{expand}

h4. {expand:title=CHANGEPASSWORD}
The following code will call the Yellowfin web service and change the password for the specified Yellowfin user:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");
person.setPassword("testtest");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("CHANGEPASSWORD");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.

This function will change a specified Yellowfin user's password.
||Request Element||Data Type||Description||Setting
Code||
|LoginId|String|Login ID of the account used to connect to Yellowfin webservices eg. admin@yellowfin.com.au|setLoginId()|
|Password|String|Password of the account used to connect to Yellowfin webservices|setPassword()|
|OrgId|Integer|Primary Organization ID within Yellowfin. Always set this to 1.|setOrgId()|
|Function = "CHANGEPASSWORD"| |Web services function|setFunction()|
||
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|setPerson()|

These are the parameters that you need to set in the AdministrationPerson object:
||AdministrationPerson Element||Data Type||Description||Retrieval
Code||
|UserId|String|User ID of the Yellowfin user. This can be the user ID or the email address, depending on the Logon ID method|setUserId()|
|Password|String|New password of the Yellowfin user|setPassword()|

The response returned will contain these parameters:
||Response Element||Data Type||Description||Retrieval Code||
|StatusCode|String|Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|getStatusCode()|

{expand}


h2. Retrieving Objects Belonging to a User
{styleclass: Class=topLink}[top|#top]{styleclass}
Objects belonging to a user in a Primary or Client Organisation can be retrieved with various web service calls. The objects returned in the response will be dependent on the type of call made in the request.

h4. {expand:title=GETUSERREPORTS / GETALLUSERREPORTS}
The following code will call the Yellowfin web service and return all reports with a *Web Services Name* that are accessible for the particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETUSERREPORTS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.
{expand}
This h4. {expand:title=GETALLUSERREPORTS}
The following code function will callreturn theall Yellowfinreports webwith servicea and*webservice return name*all* reports that are accessible for the specified particularYellowfin user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETALLUSERREPORTS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.
{expand}

h4. {expand:title=GETREPORTSWITHCOMMENTS}
The following code will call the Yellowfin web service and return all *commented* reports that are accessible for the particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETREPORTSWITHCOMMENTS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed..
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETUSERREPORTS"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|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 AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|Reports|AdministrationReport|An array of AdministrationReport objects. These objects hold report metadata.|

{expand}

h4. {expand:title=GETFAVOURITES / GETFAVORITESGETALLUSERREPORTS}
The following code will call the Yellowfin web service and return *all *report favourites*reports that are accessible for the particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETFAVOURITESGETALLUSERREPORTS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.
{expand}

h4. {expand:title=GETINBOX}
The following code will call the Yellowfin web service and return all reports that are in the particular user's *inbox*:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETINBOX");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.
{expand}

h4. {expand:title=GETUSERTABS}
The following code will call the Yellowfin web service and return all dashboard tabs *without reports* that are accessible for that particular user:
{code}
AdministrationServiceRequest ||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETUSERREPORTS"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|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 AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|Reports|AdministrationReport|An array of AdministrationReport objects. These objects hold report metadata.|

{expand}

h4. {expand:title=GETREPORTSWITHCOMMENTS}
The following code will call the Yellowfin web service and return all *commented* reports that are accessible for the particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETUSERTABSGETREPORTSWITHCOMMENTS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReportGroupAdministrationReport objects in {{rs.getReportGroupsgetReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.
{expand}
This h4. {expand:title=GETUSERTABSWITHREPORTS}
The following code will call the Yellowfin web service and return all dashboard tabs with reports that are accessible for that particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
// uncomment line below and set function will return all commented reports in Yellowfin that are accessible by the specified Yellowfin user.
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETREPORTSWITHCOMMENTS"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETUSERTABS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReportGroup objects in {{rs.getReportGroups()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=LOADTABREPORTS}'s User ID for the retrieval process|

These are the parameters that you need to set in the AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|Reports|AdministrationReport|An array of AdministrationReport objects. These objects hold report metadata.|

{expand}

h4. {expand:title=GETFAVOURITES / GETFAVORITES}
The following code will call the Yellowfin web service and return all *report favourites* that are accessible for the particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETFAVOURITES");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.

This function will return all the favourite reports of a specified Yellowfin user.
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETFAVOURITES" or "GETFAVORITES"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|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 AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|Reports|AdministrationReport|An array of AdministrationReport objects. These objects hold report metadata.|
{expand}

h4. {expand:title=GETINBOX}
The following code will call the Yellowfin web service and return all reports that are in the particular user's *inbox*:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETINBOX");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReport objects in {{rs.getReports()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error message explaining why the process failed.

This function will return the reports that are in the inbox of a specified Yellowfin user.
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETINBOX"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|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 AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|Reports|AdministrationReport|An array of AdministrationReport objects. These objects hold report metadata.|

{expand}

h4. {expand:title=GETUSERTABS}
The following code will call the Yellowfin web service and return all dashboard tabs *without reports* that are accessible for that particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETUSERTABS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReportGroup objects in {{rs.getReportGroups()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.

This function will return a list of dashboard tabs that are accessible by the specified Yellowfin user.
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETUSERTABS"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|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 AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|ReportsGroups|AdministrationReportGroup|An array of AdministrationReportGroup objects. These objects hold dashboard metadata.|
{expand}

h4. {expand:title=GETUSERTABSWITHREPORTS}
The following code will call the Yellowfin web service and return all dashboard tabs with reports that are accessible for that particular user:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

Person.setUserId("testuser@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 user belongs to a client organisation
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETUSERTABS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
This code will return an Array of AdministrationReportGroup objects in {{rs.getReportGroups()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.

This function will return a list of dashboard tabs that are accessible by the specified Yellowfin user, with the reports' metadata loaded as well. The metadata for every report in the dashboard tab is contained within the AdministrationReportGroup object.
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "GETUSERTABSWITHREPORTS"|String|Web services function|
|OrgRef|String|Client Reference ID if this function is to be applied for a particular client organization. This parameter is optional.|
|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 AdministrationPerson object:
||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:
* SUCCESS
* FAILURE|
|ReportsGroups|AdministrationReportGroup|An array of AdministrationReportGroup objects. These objects hold dashboard metadata. For this particular function, the reports' metadata is also loaded into this object's GroupReports() parameter.|
{expand}

h4. {expand:title=LOADTABREPORTS}
This function will return a list of reports contained within a specified dashboard tab, that is accessible by a specified user in Yellowfin.
||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 Organization ID within Yellowfin. Always set this to 1.|
|Function = "LOADTABREPORTS"|String|Web services function|
|Person|AdministrationPerson|The AdministrationPerson object holding the Yellowfin user's User ID for the retrieval process|
|ReportGroup|AdministrationReportGroup|The AdministrationReportGroup object holding the Dashboard Tab ID for the retrieval process|

These are the parameters that you need to set in the AdministrationPerson and AdministrationReportGroup object:
||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|

||AdministrationReportGroup Element||Data Type||Description||
|ReportGroupId|String|Dashboard Tab ID|

The response returned will contain these parameters:
||Response Element||Data Type||Description||
|StatusCode|String	Status of the web service call. Possible values include:
* SUCCESS
* FAILURE|
|ReportGroups|AdministrationReportGroup|An array of AdministrationReportGroup objects. These objects hold dashboard metadata. For this particular function, the reports' metadata is also loaded into this object's GroupReports() parameter.|
{expand}


h2. Group & Role Administration
{styleclass: Class=topLink}[top|#top]{styleclass}
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.

{color:#CC0000}*Note:*{color} if [Client Org|Client Organisations] functionality is turned on in the [Configuration] page, a Client Org can also be specified where applicable for certain types of calls.

h4. {expand:title=LISTROLES}
The following code will call the Yellowfin web service and return all available roles within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;

rsr.setOrgId(new Integer(1));
rsr.setFunction("LISTROLES");

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return an Array of AdministrationRole objects in {{rs.getRoles()}} and {{SUCCESS}} in {{rs.getStatusCode()}}.
{expand}

h4. {expand:title=LISTGROUPS}
The following code will call the Yellowfin web service and return all available groups within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

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 groups in a client organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("LISTGROUPS");

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return an Array of AdministrationGroup objects in {{rs.getGroups()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=GETGROUP}
The following code will call the Yellowfin web service and return the specified group with its members in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("GETGROUP");
rsr.setGroup(group);

rs = AdministrationService.remoteAdministrationCall(rsr);
group = rs.getGroup();

AdministrationGroupMember[] groupMembers = group.getGroupMembers();
{code}
The code will return an AdministrationGroup object in {{rs.getGroup()}}, an Array of AdministrationGroupMembers in {{rs.getGroup().getGroupMembers()}}, and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=CREATEGROUP}
The following code will call the Yellowfin web service and create the specified group in Yellowfin:
{code}
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("CREATEGROUP");
rsr.setGroup(group);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed. 

{color:#CC0000}*Note:*{color} 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()}}.
{expand}

h4. {expand:title=INCLUDEUSERINGROUP}
The following code will call the Yellowfin web service and include a specified user into a specified group in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("INCLUDEUSERINGROUP");
rsr.setGroup(group);
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=EXCLUDEUSERINGROUP}
The following code will call the Yellowfin web service and exclude a specified user from a specified group in Yellowfin.

{color:#CC0000}*Note:*{color} 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}
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("EXCLUDEUSERINGROUP");
rsr.setGroup(group);
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=DELETEUSERFROMGROUP}
The following code will call the Yellowfin web service and delete a specified user from a specified group in Yellowfin:
{code}
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("DELUSERFROMGROUP");
rsr.setGroup(group);
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=MODIFYGROUP}
The following code will call the Yellowfin web service and modify the specified group in Yellowfin:
{code}
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("MODIFYGROUP");
rsr.setGroup(group);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed. 

{color:#CC0000}*Note:*{color} 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()}}.
{expand}

h4. {expand:title=DELETEGROUP}
The following code will call the Yellowfin web service and delete the specified group in Yellowfin:
{code}
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 organization
// rsr.setOrgRef("CLIENTREFERENCEIDHERE");
rsr.setFunction("DELETEGROUP");
rsr.setGroup(group);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=LOADBIRTREPORT}
{expand}


h2. Client Organisation Functionality
{styleclass: Class=topLink}[top|#top]{styleclass}
Yellowfin contains functionality called [Client Organisations], which allows multiple virtual instances of Yellowfin to reside in the same server instance.

Client Organisation functionality can be managed with the available web service calls listed below.

h4. {expand:title=LISTCLIENTS}
The following code will call the Yellowfin web service and list all client organizations within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("LISTCLIENTS");

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return an Array of AdministrationClientOrg objects and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=GETCLIENT}
The following code will call the Yellowfin web service and get the specified client organization within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();

aco.setClientReferenceId("CLIENTREFERENCEIDHERE");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETCLIENT");
rsr.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return an AdministrationClientOrg object in {{rs.getClient()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=CREATECLIENT}
The following code will call the Yellowfin web service and create the specified client organization within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();

aco.setClientName("CLIENTNAME");
aco.setClientReferenceId("CLIENTREFERENCEIDHERE");
aco.setTimeZoneCode("AUSTRALIA/SYDNEY");
aco.setDefaultOrg(false);

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("CREATECLIENT");
rsr.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=DELETECLIENT}
The following code will call the Yellowfin web service and delete the specified client organization within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();

aco.setClientReferenceId("CLIENTREFERENCEIDHERE");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELETECLIENT");
rsr.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=UPDATECLIENT}
The following code will call the Yellowfin web service and update the specified client organization within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();

aco.setClientName("CLIENTNAME");
aco.setClientReferenceId("CLIENTREFERENCEIDHERE");
aco.setTimeZoneCode("AUSTRALIA/SYDNEY");
aco.setDefaultOrg(false);

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("UPDATECLIENT");
rsr.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=LISTUSERSATCLIENT}
The following code will call the Yellowfin web service and list all users belonging to the specified client organization within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();
AdministrationPerson[] people = null;

aco.setClientReferenceId("CLIENTREFERENCEIDHERE");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("LISTUSERSATCLIENT");
rsr.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
people = rs.getPeople();
{code}
The code will return an Array of AdministrationPerson objects in {{rs.getPeople()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=GETUSERACCESS}
The following code will call the Yellowfin web service and list all client organizations accessible by a specified user within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg[] clients = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETUSERACCESS");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);
clients = rs.getClients();
{code}
The code will return an Array of AdministrationClientOrg objects in {{rs.getClients()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=ADDUSERACCESS}
The following code will call the Yellowfin web service and add access to a specified client organization for a specified user within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");
aco.setClientReferenceId("CLIENTREFERENCEIDHERE"); 

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("ADDUSERACCESS");
rsr.setPerson(person);
rs.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=REMOVEUSERACCESS}
The following code will call the Yellowfin web service and remove access to a specified client organization for a specified user within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationClientOrg aco = new AdministrationClientOrg();
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");
aco.setClientReferenceId("CLIENTREFERENCEIDHERE"); 

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("REMOVEUSERACCESS");
rsr.setPerson(person);
rs.setClient(aco);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=ISREPORTFAVOURITE}
{expand}

h4. {expand:title=ADDTOFAVOURITES / ADDTOFAVORITES}
The following code will call the Yellowfin web service and add a specified report to a specified user's favourites list:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("ADDTOFAVOURITES");
rsr.setPerson(person);
rs.setReportId(12345);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=REMOVEFAVOURITES / REMOVEFAVORITES}
The following code will call the Yellowfin web service and remove a specified report to a specified user's favourites list:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("REMOVEFAVOURITE");
rsr.setPerson(person);
rs.setReportId(12345);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=SAVEPERSONFAVOURITE}
{expand}

h4. {expand:title=REMOVEPERSONFAVOURITE}
{expand}

h4. {expand:title=LISTPERSONFAVOURITES}
{expand}

h4. {expand:title=GETAVATARS}
{expand}

h4. {expand:title=SETAVATARIMAGE}
{expand}

h4. {expand:title=RELOADCODES}
{expand}

h4. {expand:title=GEOMETRYFLUSH}
The following code will call the Yellowfin web service and clear the geometry cache in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin View ID
String[] parameters ={
"48910"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("GEOMETRYFLUSH");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=REMOVEVIEW}
The following code will call the Yellowfin web service and remove a view's cache in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin View ID
String[] parameters ={
"49283"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("REMOVEVIEW");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=FLUSHREPORT}
The following code will call the Yellowfin web service and remove a report's cached definitions in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin Report ID
String[] parameters ={
"11111"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("FLUSHREPORT");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=FLUSHTAB}
The following code will call the Yellowfin web service and remove a dashboard's cached definitions in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin Dashboard Tab ID
String[] parameters ={
"12345"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("FLUSHTAB");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=DELETEREPORT}
The following code will call the Yellowfin web service and delete a report in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin Report UUID
String[] parameters ={
"7368e6d4-6167-4a16-ba52-ffa2440a5c8c"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELETEREPORT");
// If the report ID is not set, then the code will look for the UUID in parameters
rsr.setReportId(12345);
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=DELETEVIEW}
The following code will call the Yellowfin web service and delete a view in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This example has a Yellowfin View UUID. The parameter value here can be either the UUID 
// or the Yellowfin View ID 
String[] parameters ={
"7368e6d4-6167-4a16-ba52-ffa2440a5c8c"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELETEVIEW");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=DELETESOURCE}
The following code will call the Yellowfin web service and delete a data source in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is the Yellowfin Data Source ID
String[] parameters ={
"23456"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELETESOURCE");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=DELETETAB}
The following code will call the Yellowfin web service and delete a dashboard tab in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is the Yellowfin Dashboard Tab UUID
String[] parameters ={
"7368e6d4-6167-4a16-ba52-ffa2440a5c8c"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELETETAB");
rsr.setDashboardTabId(11223);
// If the Dashboard Tab ID is not set, then the code will look for the UUID in parameters
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=RELOADLICENCE}
The following code will call the Yellowfin web service and reload the licence definitions in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("RELOADLICENCE");

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=CLOSECONNECTIONPOOL}
The following code will call the Yellowfin web service and close the specified data source's connection pool in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin Data Source ID
String[] parameters ={
"11111"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("CLOSECONNECTIONPOOL");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=FLUSHCACHEDFILTERCACHE}
The following code will call the Yellowfin web service and flush the specified filter's filter cache in Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// This is a Yellowfin Filter ID
String[] parameters ={
"12345"
};

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("FLUSHCACHEDFILTERCACHE");
rsr.setParameters(parameters);

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=APPROVEREPORT}
The following code will call the Yellowfin web service and approve a report in Yellowfin via the expert approval process:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("APPROVEREPORT");
rsr.setReportId(12345)

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=GETCONTENT}
The following code will call the Yellowfin web service and obtain all exportable content within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
ContentResource[] cr = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETCONTENT");

rs = AdministrationService.remoteAdministrationCall(rsr);
cr = rs.getContentResources();
{code}
The code will return an Array of ContentResource objects in {{rs.getContentResources()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=GETEXPORTDEPENDENCIES}
The following code will call the Yellowfin web service and obtain dependencies for a specific Yellowfin artifact:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
ContentResource[] cr = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETEXPORTDEPENDENCIES");

rs = AdministrationService.remoteAdministrationCall(rsr);
cr = rs.getContentResources();
{code}
The code will return an Array of ContentResource objects in {{rs.getContentResources()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=EXPORTCONTENT}
The following code will call the Yellowfin web service and export the specified artifacts within Yellowfin:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;

// It is advisable to run a GETCONTENT web service call beforehand to retrieve the necessary ContentResource objects
// This list can be copied over to the exportList array below
ContentResource[] exportList;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("EXPORTCONTENT");
rsr.setContentResources(exportList);

rs = AdministrationService.remoteAdministrationCall(rsr);
rbo = rs.getBinaryAttachments();
{code}
The code will return an Array of ReportBinaryObjects objects in {{rs.getBinaryAttachments()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.
{expand}

h4. {expand:title=GETIMPORTCONTENT}
The following code will call the Yellowfin web service and read a Yellowfin import file, returning the objects to be imported:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
Byte[] data = <XML import file>;
ContentResource[] cr = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("GETIMPORTCONTENT");
rsr.setParameters( new String[] { Base64.encodeBytes(data) } );

rs = AdministrationService.remoteAdministrationCall(rsr);
cr = rs.getContentResources();
{code}
The code will return an Array of ContentResource objects in {{rs.getContentResources()}} and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.

Refer to {{ws_admin_import.jsp}} in your Yellowfin web services directory {{Yellowfin\development\examples\web services\}} for a more detailed example of how this function would work.
{expand}

h4. {expand:title=TESTIMPORTCONTENT}
The following code will call the Yellowfin web service and validate the Yellowfin import objects. This function usually follows after the GETIMPORTCONTENT web services call:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
Byte[] data = <XML import file>;
ImportIssue[] ii = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("TESTIMPORTCONTENT");
rsr.setParameters( new String[] { Base64.encodeBytes(data) } );

rs = AdministrationService.remoteAdministrationCall(rsr);
ii = rs.getImportIssues();
{code}
The code will return an Array of ImportIssue objects in {{rs.getImportIssues()}} *if* there are issues with the import file and {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.

Refer to {{ws_admin_import.jsp}} in your Yellowfin web services directory {{Yellowfin\development\examples\web services\}} for a more detailed example of how this function would work.
{expand}

h4. {expand:title=IMPORTCONTENT}
The following code will call the Yellowfin web service and import the specified Yellowfin import objects into the application:
{code}
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceResponse rs = null;
Byte[] data = <XML import file>;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setFunction("IMPORTCONTENT");
rsr.setParameters( new String[] { Base64.encodeBytes(data) } );

rs = AdministrationService.remoteAdministrationCall(rsr);
{code}
The code will return {{SUCCESS}} in {{rs.getStatusCode()}}, otherwise it will return an error explaining why the process failed.

Refer to {{ws_admin_import.jsp}} in your Yellowfin web services directory {{Yellowfin\development\examples\web services\}} for a more detailed example of how this function would work.
{expand}

\\
\\
{horizontalrule}
{styleclass: Class=topLink}[top|#top]{styleclass}