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

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Yellowfin contains functionality called Client Organization, which allows multiple virtual instances of Yellowfin to reside in the same server instance. This way private content can be created within one organization, and accessed only by the users of that organization; it will be hidden from other organization users logging into the same server.

The following web service calls can be used to manage this functionality.

Note: Ensure that your instance of Yellowfin has the Client Org func switched on.

 

Use this web service call to retrieve a list of all client organizations within Yellowfin.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

A Yellowfin admin account for 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 "LISTCLIENTS".

 

Request Example

Below is a SOAP XML example for this request:

 

 

Response Parameters

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

Clients

AdministrationClientOrg[]

This object array will contain a list of client organizations.

 

Response Example

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

 

 

Instructions

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

  • Start with a basic request for this function:

    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("LISTCLIENTS");

 

  • Once the request is configured, perform the call:

    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    

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

 

  • 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

    Clients

    AdministrationClientOrg[]

    List of clients.

  • Get client details, as shown in the following snippet:

    AdministrationClientOrg[] clients = rs.getClients();
    
    for (AdministrationClientOrg client: clients){
    	String name = client.getClientName());
    	Integer id = client.getClientId());
    	String orgRefId = client.getClientReferenceId());
    	String timezone = client.getTimeZoneCode());
    	boolean isDefault = client.isDefaultOrg());
    	}
    
    

 

 

 

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_listclients.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_listclients.jsp from your Internet browser.

 

<%            
/*              ws_listclients.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 above account

rsr.setOrgId(1);

rsr.setFunction("LISTCLIENTS");

AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);


if ("SUCCESS".equals(rs.getStatusCode()) ) {
	out.write("Success.<br>Clients:");
	AdministrationClientOrg[] clients = rs.getClients();


	for (AdministrationClientOrg client: clients){
		out.write("<br>");
		out.write("<br>Client Name: " + client.getClientName());
		out.write("<br>Client Id: " + client.getClientId());
		out.write("<br>Org Reference Id: " + client.getClientReferenceId());
		out.write("<br>TimeZoneCode: " + client.getTimeZoneCode());
		out.write("<br>DefaultOrg: " + client.isDefaultOrg());
}
} else {
	out.write("Failure");
	out.write(" Code: " + rs.getErrorCode());
}


%>
 

 


 

Use this web service call to retrieve details of a specific client organization, based on the client reference ID.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

A Yellowfin admin account for 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 "GETCLIENT".

ClientAdministrationClientOrgObject containing details of the client whose details are to be retrieved. See table below.

 

Specify these main parameters for the AdministrationClientOrg object:

AdministrationClientOrg Element

Data Type

Description

ClientReferenceID

String

A unique ID used to identify a client organization.

 

Request Example

Below is a SOAP XML example for this request:

 

 

Response Parameters

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

Clients

AdministrationClientOrg

Details of the requested client org.

 

Response Example

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

 

 

Instructions

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

  • Start with a basic request for this function:

    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("GETCLIENT");

 

  • Once the request is configured, perform the call:

    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    

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

 

  • 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

    Clients

    AdministrationClientOrg

    Details of the requested client org.

  • Get client details, as shown in the following snippet:

    AdministrationClientOrg[] clients = rs.getClients();
    
    for (AdministrationClientOrg client: clients){
    	String name = client.getClientName());
    	Integer id = client.getClientId());
    	String orgRefId = client.getClientReferenceId());
    	String timezone = client.getTimeZoneCode());
    	boolean isDefault = client.isDefaultOrg());
    	}
    
    

 

 

 

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_getclient.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, admin user, and client org. ID values according to your environment.
  4. Run http://<host>:<port>/ws_getclient.jsp from your Internet browser.

 

<%            
/*              ws_getclient.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 above account
rsr.setOrgId(1);

rsr.setFunction("GETCLIENT");

AdministrationClientOrg ac = new AdministrationClientOrg();
ac.setClientReferenceId("org1");
rsr.setClient(ac);

AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
	out.write("Success.<br>Clients:");
	AdministrationClientOrg client = rs.getClient();

		out.write("<br>");
		out.write("<br>Client Name: " + client.getClientName());
		out.write("<br>Client Id: " + client.getClientId());
		out.write("<br>Org Reference Id: " + client.getClientReferenceId());
		out.write("<br>TimeZoneCode: " + client.getTimeZoneCode());
		out.write("<br>DefaultOrg: " + client.isDefaultOrg());
} else {
	out.write("Failure");
	out.write(" Code: " + rs.getErrorCode());
}
%>
 

 


 

Use this web service call to create a new client organization in Yellowfin. The AdministrationClientOrg object will be required to provide the details of the new client.

 

Request Parameters

The following parameters should be passed with this request:

Request Element

Data Type

Description

LoginId

String

A Yellowfin admin account for 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 "CREATECLIENT".

ClientAdministrationClientOrgObject containing details of the new client to be created. See table below.

 

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

AdministrationClientOrg Element

Data Type

Description

ClientReferenceID

String

A unique ID used to identify the new client. This is a mandatory parameter.

ClientName

String

Name of the new client organization.

TimeZoneCode

String

The client organization’s local time zone code.

DefaultOrg

Boolean

Set this value to true if this organization is the primary organization.

 

Request Example

Below is a SOAP XML example for this request:

 

 

Response Parameters

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

Clients

AdministrationClientOrg

Details of the requested client org.

 

Response Example

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

 

 

Instructions

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

  • Start with a basic request for this function:

    AdministrationServiceRequest rsr = new AdministrationServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(1);
    
    rsr.setFunction("GETCLIENT");

 

  • Once the request is configured, perform the call:

    AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
    

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

 

  • 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

    Clients

    AdministrationClientOrg

    Details of the requested client org.

  • Get client details, as shown in the following snippet:

    AdministrationClientOrg[] clients = rs.getClients();
    
    for (AdministrationClientOrg client: clients){
    	String name = client.getClientName());
    	Integer id = client.getClientId());
    	String orgRefId = client.getClientReferenceId());
    	String timezone = client.getTimeZoneCode());
    	boolean isDefault = client.isDefaultOrg());
    	}
    
    

 

 

 

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_getclient.jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, admin user, and client org. ID values according to your environment.
  4. Run http://<host>:<port>/ws_getclient.jsp from your Internet browser.

 

<%            
/*              ws_getclient.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 above account
rsr.setOrgId(1);

rsr.setFunction("GETCLIENT");

AdministrationClientOrg ac = new AdministrationClientOrg();
ac.setClientReferenceId("org1");
rsr.setClient(ac);

AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
	out.write("Success.<br>Clients:");
	AdministrationClientOrg client = rs.getClient();

		out.write("<br>");
		out.write("<br>Client Name: " + client.getClientName());
		out.write("<br>Client Id: " + client.getClientId());
		out.write("<br>Org Reference Id: " + client.getClientReferenceId());
		out.write("<br>TimeZoneCode: " + client.getTimeZoneCode());
		out.write("<br>DefaultOrg: " + client.isDefaultOrg());
} else {
	out.write("Failure");
	out.write(" Code: " + rs.getErrorCode());
}
%>
 

 


 

 

 

 

 

  • No labels