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

Error rendering macro 'rw-search'

null

Versions Compared

Key

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

...

Expand
titleSETAVATARIMAGE

This web service is used to upload an avatar image for a specified user. The image should be an array of bytes in UTF-8 which you could convert to a String value.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

Password

String

Password of the above account.

OrgId

Integer

Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

Function

String

Web service function. Set this to "SETAVATARIMAGE".

PersonAdministrationPersonThis object contains details of the user whose avatar is to be changed. See table below.
ParametersString[]An array containing a single element representing the avatar image to be uploaded. The image should be an array of bytes in UTF-8 format, which could be converted to a String.

Anchor
setavatarap
setavatarap

These are the main parameters that you must set in the AdministrationPerson object for this web service call:

AdministrationPerson Element

Data Type

Description

IpId

Integer

Provide the internal Yellowfin IP ID of the user. This value is stored in the Person parameter's IpId field in Yellowfin's database.

 

 

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
themeConfluence
 

 

 

Response Parameters

The returned response will contain the following parameter:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
themeConfluence
 

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • Start with a basic request for this function, which includes logging in as the admin user and specifying the web service call to perform:

    Code Block
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("SETAVATARIMAGE");
  • You can specify the user by providing their IP ID:

    Code Block
    languagejava
    AdministrationPerson ap = new AdministrationPerson();
    ap.setIpId(5);
    
    rsr.setPerson(ap); 



  • Select the image file, by using the java.nio.file library:

    Code Block
    languagejava
    Path path = Paths.get("D:/TMP/fish.jpg"); // existing image file
    byte[] data = Files.readAllBytes(path);
    byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
    String img = new String(encodeBase64, "UTF-8");
    
    rsr.setParameters(new String[] {img});



  • Once the request is configured, perform the call:

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    

    Initialize the Administration web service. Click here to learn how to do this. 

 

  • The response will contain a StatusCode element.

     

 

 

Complete Example

Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ setavatarimage.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user according to your environment.
  4. Run http://<host>:<port>/ws_ setavatarimage.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%        	
/*          	ws_SETAVATARIMAGEsetavatarimage.jsp                              	*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%@ page import="java.nio.file.Files" %>
<%@ page import="java.nio.file.Paths" %>
<%@ page import="java.nio.file.Path" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);    	// adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au");      	// provide your Yellowfin webservices admin account
rsr.setPassword("test");                                                    	// change to be the password of the account above
rsr.setOrgId(1);
rsr.setFunction("SETAVATARIMAGE");
 
AdministrationPerson ap = new AdministrationPerson();
ap.setIpId(5);
 
rsr.setPerson(ap);
 
Path path = Paths.get("D:/TMP/fish.jpg"); // existing image file
byte[] data = Files.readAllBytes(path);
byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data);
String img = new String(encodeBase64, "UTF-8");
 
rsr.setParameters(new String[] {img});
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
              	out.write("<br>Success");
} else {
              	out.write("Failure");
              	out.write(" Code: " + rs.getErrorCode());
}
%>

 


 

...

Expand
titleREMOVEFAVOURITE

Also, ADDTOFAVORITESREMOVEFAVORITE. This web service call marks removes a particular report as from the specified user's favourite list. Both the user and the report would need to be specified here, the latter by providing the report ID. Use the GETIDFORUUID web service call to retrieve the report ID, or fetch it from the database (this value is stored in the Report Header table).

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

Password

String

Password of the above account.

OrgId

Integer

Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

Function

String

Web service function. Set this to "ADDTOFAVOURITESREMOVEFAVOURITE" or "ADDTOFAVORITESREMOVEFAVORITE".

PersonAdministrationPersonThis object contains details of the user. See table below.
ReportIdIntegerThe ID of the report that is to be added as a favourite of removed from the user's favourite list.

Anchor
addtofavapremovefavapaddtofavap
removefavap

These are the main parameters that you must set in the AdministrationPerson object for this web service call:

AdministrationPerson Element

Data Type

Description

UserId

String

ID of the user to add remove the report as from their favourite list. This value could be the user ID or user's email address, depending on the Logon ID method.

 

 

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
themeConfluence
 

 

 

Response Parameters

The returned response will contain the following parameter:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS - if If the report is added as removed from the user's favourite list.
  • FAILURE - if If the report is not added as removed from the user's favourite list.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
themeConfluence
 

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • Start with a basic request for this function, which includes logging in as the admin user and specifying the web service call to perform:

    Code Block
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("ADDTOFAVOURITESREMOVEFAVOURITE");
  • You can identify the user for whom to check the report's favourite status:

    Code Block
    languagejava
    AdministrationPerson ap = new AdministrationPerson();
    ap.setUserId("test.user@yellowfin.com.au");
    rsr.setPerson(ap);
  • Specify which report to check the favourite status for:

    Code Block
    languagejava
    rsr.setReportId(61131);



  • Once the request is configured, perform the call:

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    

    Initialize the Administration web service. Click here to learn how to do this. 

 

  • The response will contain the StatusCode. See the Response Parameter table above for details on this.

     

 

 

Complete Example

Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ addtofavouritesremovefavourite.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user according to your environment.
  4. Run http://<host>:<port>/ws_ addtofavouritesremovefavourite.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
/*          	ws_addtofavouritesremovefavourite.jsp                              	*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);     	   // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au");      		// provide your Yellowfin web webservicesservices admin account
rsr.setPassword("test");                                                    	// changeset to be the password of the account above
rsr.setOrgId(1);
rsr.setFunction("ADDTOFAVORITESREMOVEFAVOURITE");
 
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("test.user@yellowfin.com.au");
 
rsr.setPerson(ap);
 
rsr.setReportId(56361);
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
              	out.write("<br>Success");
                                	
} else {
              	out.write("Failure");
              	out.write(" Code: " + rs.getErrorCode());
}
%>


 


 

Expand
titleLISTPERSONFAVOURITES

This web service call returns a specific user's favourite items, including reports, storyboards, views, dashboards, distributed content, discussions or comments flagged by them.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method.

This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org.

Password

String

Password of the above account.

OrgId

Integer

Default (i.e. primary) organization ID within Yellowfin. Always set this to 1.

Function

String

Web service function. Set this to "LISTPERSONFAVOURITES".

FavouritePersonFavouriteThis object is used to specify the favourite items are to be fetched. The user must be specified here, however other parameters are optional. See table below for more details.
   

Anchor
listfavperson
listfavperson

These are the main parameters that you must set in the PersonFavourite object for this web service call:

PersonFavourite Element

Data Type

Description

PersonId

Integer

ID of the user to remove the report from their favourite list. This value could be the user ID or user's email address, depending on the Logon ID method.

ContentTypeString

This optional parameter can be set to filter the result by a specific content type. Values could include:

  • REPORT
  • REPORTGROUP
  • DISCUSSIONGROUP
  • REPORTVIEW
  • STORYBOARD
  • IMAGE
ContentIdIntegerThis optional parameter can be used to restrict the result to a specific content by providing its internal ID.

 

 

Request Example

Below is a SOAP XML example for this request:

Code Block
languagexml
themeConfluence
 

 

 

Response Parameters

The returned response will contain the following parameter:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS - If the report is removed from the user's favourite list.
  • FAILURE - If the report is not removed from the user's favourite list.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
themeConfluence
 

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • Start with a basic request for this function, which includes logging in as the admin user and specifying the web service call to perform:

    Code Block
    languagejava
    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("REMOVEFAVOURITE");
  • You can identify the user for whom to check the report's favourite status:

    Code Block
    languagejava
    AdministrationPerson ap = new AdministrationPerson();
    ap.setUserId("test.user@yellowfin.com.au");
    rsr.setPerson(ap);
  • Specify which report to check the favourite status for:

    Code Block
    languagejava
    rsr.setReportId(61131);



  • Once the request is configured, perform the call:

    Code Block
    languagejava
    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    

    Initialize the Administration web service. Click here to learn how to do this. 

 

  • The response will contain the StatusCode. See the Response Parameter table above for details on this.

     

 

 

Complete Example

Below is a full example of this web service call. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_ removefavourite.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user according to your environment.
  4. Run http://<host>:<port>/ws_ removefavourite.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
/*          	ws_removefavourite.jsp                          	*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);        // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au");      		// provide your Yellowfin web services admin account
rsr.setPassword("test");                            // set to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("REMOVEFAVOURITE");
 
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("test.user@yellowfin.com.au");
 
rsr.setPerson(ap);
 
rsr.setReportId(56361);
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
              	out.write("<br>Success");
                                	
} else {
              	out.write("Failure");
              	out.write(" Code: " + rs.getErrorCode());
}
%>