Page History
These web services will allow you to manage configuration settings in Yellowfin, as well as enter an admin mode.
Basic Configuration Functions
The following set of web services can be used to configure update system and customer configuration settings in Yellowfin.
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||
This function updates the system configuration settings in Yellowfin. This works by changing the setting details directly in the Configuration table in Yellowfin’s database, however only the general system settings are affected, not any custom settings. Yellowfin determines these by checking the ConfigTypeCode column for the value “SYSTEM”. Therefore, this mainly effects the default organization. Once the database table has been updated, you will need to restart Yellowfin for these changes to take effect. Request ParametersThe following parameters should be passed with this request:
Below are the mandatory parameters that you need to set in the AdministrationClientOrg object to create a new user:
Request ExampleBelow is a SOAP XML example for this request:
Response ParametersThe returned response will contain these parameters: | |||||||||||||||||||||||||||||||
Response Element | Data Type | Description | |||||||||||||||||||||||||||||
StatusCode | String | Status of the web service call. Possible values include:
|
Code Block | ||
---|---|---|
| ||
|
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Expand | ||||
---|---|---|---|---|
| ||||
Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform: Code Block | | |||
|
Code Block | ||
---|---|---|
| ||
rsr.setParameters(new String[]{"SIMPLE_AUTHENTICATION","TRUE"}); |
Code Block | ||
---|---|---|
| ||
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
Initialize the Administration web service. Click here to learn how to do this.
Add the following code to retrieve the response. The response will contain the StatusCode. (See details in the Response Parameters table above.)
language | java |
---|
<web:remoteAdministrationCall> <arg0> <loginId>admin@yellowfin.com.au</loginId> <password>test</password> <orgId>1</orgId> <function>SAVECONFIGURATION</function>out.write("<br>Success");
<parameters>Simple_Authentication</parameters> <parameters>true</parameters>}
else {
</arg0> </web:remoteAdministrationCall>out.write("<br>Failure"); out.write(" Code: " + rs.getErrorCode()); }
</soapenv:Body>
</soapenv:Envelope>
Complete Example
Below is a full example of this web service call. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_saveconfiguration.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_saveconfiguration.jsp from your Internet browser.
Response Parameters
The returned response will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
Response Example
The service will return the below response, according to our SOAP example:
Code Block | ||||
---|---|---|---|---|
| ||||
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
| ||||
Code Block | ||||
| ||||
<% /* ws_SAVECONFIGURATION.jsp <return> <errorCode>0</errorCode> */ %> <%@ 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.*" %> <% /* <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Web Service Request Complete</messages> This example sets Yellowfin authentication<sessionId>15359eb5b3d7d2c63c6f43affe5f3b45</sessionId> method to Simple. That means, once Yellowfin has been restarted, the<statusCode>SUCCESS</statusCode> LOGINUSERNOPASSWORD call can be used to log users into Yellowfin with no password provided. */ 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(); </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope> |
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
|
expand
title | CUSTOMPARAMETER |
---|
Complete Example
Below is a full example of this web service call. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_saveconfiguration.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_saveconfiguration.jsp from your Internet browser.
Code Block | ||||
---|---|---|---|---|
| ||||
<%
/* ws_SAVECONFIGURATION.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.*" %>
<%
/*
This example sets Yellowfin authentication method to Simple.
That means, once Yellowfin has been restarted, the
LOGINUSERNOPASSWORD call can be used to log users into Yellowfin with no password provided.
*/
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"); // set to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("SAVECONFIGURATION");
rsr.setParameters(new String[]{"SIMPLE_AUTHENTICATION","TRUE"});
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("<br>Success");
}
else {
out.write("<br>Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function updates the custom configuration settings in Yellowfin. The custom parameters are those that can be applied to a client organization. This works by changing the details directly in the Configuration table in Yellowfin’s database. Yellowfin determines which settings to change by checking the ConfigTypeCode column for the value “CUSTOM”. Once the database table has been updated, you will need to restart Yellowfin for these changes to take affect. Request ParametersThe following parameters should be passed with this request:
Below are the mandatory parameters that you need to set in the AdministrationClientOrg object to create a new user:
Request ExampleBelow is a SOAP XML example for this request:
Response ParametersThe returned response will contain these parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this web service call. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service retrieves the current system configuration details of Yellowfin. This is done by specifying a ConfigCode element; the system then fetches the values saved in that element’s corresponding ConfigData column of the Configuration table in Yellowfin’s database. Note that only system (and not custom) parameters are loaded, as Yellowfin checks for values that contain “SYSTEM” in the ConfigTypeCode column. For instance, using this you can verify if simple authentication is enabled, that allows users to log in without a password. Request ParametersThe following parameters should be passed with this request:
Below are the mandatory parameters that you need to set in the AdministrationClientOrg object to create a new user:
Response ParametersThe returned response will contain these parameters:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this web service call. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service retrieves the custom configuration details of Yellowfin. This is done by specifying a ConfigCode element; the system then fetches the values saved in that element’s corresponding ConfigData column of the Configuration table in Yellowfin’s database. Only custom parameters are loaded, as Yellowfin checks for values that contain “CUSTOM” in the ConfigTypeCode column. For instance, using this you can verify if simple authentication is enabled, that allows users to log in without a password. Request ParametersThe following parameters should be passed with this request:
Below are the mandatory parameters that you need to set in the AdministrationClientOrg object to create a new user:
Response ParametersThe returned response will contain these parameters:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this web service call. To use it for yourself, carry out the following the steps:
|
Admin Mode Functions
The below web services allow users to enter or leave the “Admin” mode. The admin mode can be set up with a specific set of user role permissions, which will be applied to all the users when the mode is enabled.
The web services below provide more detail on what happens when this mode is enabled or disabled.
Anchor enableadminmode enableadminmode
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service enables the Admin mode on a Yellowfin instance. You can use this service to pass a set of user permissions to be applied to all user roles. Doing so will change every user’s permissions to the one defined in this function, including currently active users, and those who log in after calling this function. This means that if a user has only the basic “report consumer” role with read-only access, you can use this function to change their active session permissions and grant them full report access, including deleting reports. Similarly, you can use this web service to make Yellowfin non-editable, by removing the report writing functionality from all active users’ roles. To set up these role functions, you’ll need to specify the function code and access level. Any functions not in the list will use the existing access levels for that role. Specifying no access level is the same as disabling a function. In case of a cluster setup, this function can be set to notify specific nodes in the cluster to enable the admin mode, by using the Parameters request element. Once this mode is entered, all new sessions will apply the permissions set in the mode. To return to the original user permissions for all active sessions, as well as future logins, simply disable this mode by passing the DISABLEADMINMODE. If you already have the admin mode enabled, and want to set new access levels, then you will need to first disable the mode, and then enable it again with the updated access levels, since this mode can only be enabled if it is not already active. Request ParametersThe following parameters should be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ParametersThe returned response will contain these parameters:
Response ElementsThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this web service call. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service disables the admin mode on a Yellowfin instance. Doing so resets the user permissions for active users and future logins, back to the original role permissions. In case of a cluster environment, you will need to use a Parameters request element to pass a “true” or “True” string to notify all the nodes to disable the admin mode. If no value is specified in the element, then by “false/False” will be set by default, and the admin mode will not be disabled. Request ParametersThe following parameters should be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ParametersThe returned response will contain these parameters:
Response ElementsThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this web service call. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service will retrieve all of the role functions, and some of their descriptive information, available in Yellowfin. The result is a 2D array of strings representing rows returned from a database query. The columns are:
Request ParametersThe following parameters should be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ParametersThe returned response will contain these parameters:
The following parameters will be returned in the ReportRow object:
Response ElementsThe service will return the below response, according to our SOAP example:
This function updates the custom configuration settings in Yellowfin. The custom parameters are those that can be applied to a client organization. This works by changing the details directly in the Configuration table in Yellowfin’s database. Yellowfin determines which settings to change by checking the ConfigTypeCode column for the value “CUSTOM”. Once the database table has been updated, you will need to restart Yellowfin for these changes to take affect. Request ParametersThe 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 "SAVECUSTOMPARAMETER". | ||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters | String[] | Array of strings. This parameter is used to pass the configuration settings. The first string should be the content for configCode, and the second is for configData of Configuration table. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Client | AdministrationClientOrg | This optional parameter is used to specify a particular client organization whose configurations are to be updated. However, if one is not specified, then the configuration settings will be applied to the default org. It must be noted, however, that the majority of the configuration settings are global and cannot be set up for a particular client. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Parameter | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
clientReferenceId | String | The unique ID used to identify a client. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Code Block | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Element | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
StatusCode | String | Status of the web service call. Possible values include:
|
Code Block | ||
---|---|---|
| ||
|
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Expand | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
|
Complete Example
Below is a full example of this web service call. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_savecustomparametergetrolefunctions.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_savecustomparametergetrolefunctions.jsp from your Internet browser.
Code Block | ||||
---|---|---|---|---|
| ||||
<% /* ws_savecustomparameter.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.*" %> <% /* This example set Yellowfin authentication method to Simple. That means, once Yellowfin has been restarted, LOGINUSERNOPASSWORD call can be used to log users into Yellowfin with no password provided. */ AdministrationServiceService s_adm %> <% /* Get Role Functions ws_getrolefunctions.jsp Returns all of the role functions available from the OrgFunction table with descriptions from the OrgReferenceCodeDesc table. Also includes whether the function uses CRUD level access. */ AdministrationServiceResponse rs = null; AdministrationServiceRequest asr = new AdministrationServiceRequest(); AdministrationServiceService ts = new AdministrationServiceServiceLocator("localhost", 8080, "/services/AdministrationService", false); // adjust host and port number AdministrationServiceSoapBindingStub adminServicerssbs = (AdministrationServiceSoapBindingStub) s_admts .getAdministrationService(); asr.setLoginId("admin@yellowfin.com.au"); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); // change to the password of the account above rsr.setOrgId(1); rsr.setFunction("SAVECUSTOMPARAMETER"); rsr.setParameters(new String[]{"SIMPLE_AUTHENTICATION","TRUE"}); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("<br>Success"); } else { out.write("<br>Failure"); asr.setPassword("test"); asr.setOrgId(new Integer(1)); asr.setFunction("GETROLEFUNCTIONS"); asr.setParameters(new String[] { "root" }); // Database password rs = rssbs.remoteAdministrationCall(asr); if ("SUCCESS".equals(rs.getStatusCode())) { for (String message : rs.getMessages()) { out.write(message + "<BR>"); } // Create a simple table with the results out.write("<table>"); out.write("<th>Function Code</th>"); out.write("<th>Function Name</th>"); out.write("<th>Function Description</th>"); out.write("<th>Uses CRUD</th>"); for (ReportRow row : rs.getQueryResults()) { out.write("<tr>"); for (String data : row.getDataValue()) { out.write("<th>" + data + "</th>"); } out.write("</tr>"); } out.write("</table>"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %> |