---
title: "Miscellaneous Web Services"
canonical: "https://wiki.yellowfinbi.com/space/user80/1540517/Miscellaneous%20Web%20Services"
format: markdown
---
This section includes some additional web services that you can use.


### Testing Functions

The following web services can be used for testing or other basic functions:

> Macro (anchor)



<details>
<summary>TEST</summary>

This function is used to perform a test call to check if the Yellowfin server is active. It simply returns a Success message if you are able to talk to the server, otherwise a Failure message is returned.


#### Request Parameters

The following parameters should be passed with this request:

| **Request Element** | **Data Type** | **Description** |
| --- | --- | --- |
| LoginId | String | An administrator account to connect to the Yellowfin web services. This can either be the user ID or the email address, depending on the Logon ID method.<br>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 "TEST". |

  

#### Request Example

Below is a SOAP XML example for this request:

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteAdministrationCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <orgRef>org1</orgRef>
            <function>TEST</function>
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>
```



#### 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:<br>- SUCCESS
- FAILURE |


#### Response Example

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


```xml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>0c411f82a9f04ddc6c3336a6da294761</sessionId>
            <statusCode>SUCCESS</statusCode>
         </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:



#### 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_test.jsp.
2. Put the file in the root folder: *Yellowfin/appserver/webapps/ROOT*.
3. Adjust the host, port, and admin user details according to your environment.
4. Run *http://<host>:<port>/ws_test.jsp* from your Internet browser.


```java
<%        	
/*          	ws_test.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 according to your setting

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");                                // change to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("TEST");
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
              	out.write("<br>Success");
              	}
              	else {
              	out.write("<br>Failure");
              	out.write(" Code: " + rs.getErrorCode());
              	}             	
*/
%>


```


---
</details>

> Macro (anchor)



<details>
<summary>INFO</summary>

This is another web service that can be used to test whether the Yellowfin server is active or not. It simply attempts to talk to the server and returns either a Success or Failure response.


#### Request Parameters

The following parameters should be passed with this request:

| **Request Element** | **Data Type** | **Description** |
| --- | --- | --- |
| LoginId | String | An administrator account to connect to the Yellowfin web services. This can either be the user ID or the email address, depending on the Logon ID method.<br>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 "INFO". |

  

#### Request Example

Below is a SOAP XML example for this request:

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteAdministrationCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <orgRef>org1</orgRef>
            <function>INFO</function>
         </arg0>
      </web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>
```



#### 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:<br>- SUCCESS
- FAILURE |


#### Response Example

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


```xml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>45a10389d35349476efd2c8246d72b69</sessionId>
            <statusCode>SUCCESS</statusCode>
         </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:



#### 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_info.jsp.
2. Put the file in the root folder: *Yellowfin/appserver/webapps/ROOT*.
3. Adjust the host, port, and admin user details according to your environment.
4. Run *http://<host>:<port>/**ws_info**.jsp* from your Internet browser.


```java
<%        	
/*          	ws_info.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 according to your setting

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");                                // change to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("INFO");
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
              	out.write("<br>Success");
              	}
              	else {
              	out.write("<br>Failure");
              	out.write(" Code: " + rs.getErrorCode());
              	}             	
*/
%>


```


---
</details>

### SQL Query Functions

> Macro (anchor)



<details>
<summary>METADATASQLQUERY</summary>

This function is used to manage the Yellowfin database by using SQL query. For instance, you can retrieve information from the database by using the SELECT command, as well as manage the database tables by using DELETE and INSERT. Note that this function requires the password for the database, however this can be disabled by changing the setting, discussed below.


Click below to see how to enable this functionality for your environment, and change its setting.



#### Request Parameters

The following parameters should be passed with this request:

| **Request Element** | **Data Type** | **Description** |
| --- | --- | --- |
| LoginId | String | An administrator account to connect to the Yellowfin web services. This can either be the user ID or the email address, depending on the Logon ID method.<br>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 "METADATASQLQUERY". |
| Query | String | The SQL query that you want to perform on the Yellowfin database. |
| Parameters | String[] | Use this to pass the Yellowfin database password. Only the first element of the array is required (which you can set as the password). However, if this requirement has been disabled (as mentioned in the steps above, then this parameter will not be required. |

  

#### Request Example

Below is a SOAP XML example for this request:

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
  	<web:remoteAdministrationCall>
     	<arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
        	<orgId>1</orgId>
            <function>METADATASQLQUERY</function>
        	<query>SELECT * FROM person</query>
       	</arg0>
  	</web:remoteAdministrationCall>
   </soapenv:Body>
</soapenv:Envelope>
```



#### 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:<br>- SUCCESS
- FAILURE |
| QueryResults | <span style="color: #000000">ReportRow</span> | Array of the result set rows if SELECT was the request query. |


#### Response Example

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


```xml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
  	<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
     	<return>
            <errorCode>0</errorCode>
        	<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
        	<messages>Web Service Request Complete</messages>
            <queryResults>
               <dataValue>5</dataValue>
               <dataValue>Administrator</dataValue>
               <dataValue>System</dataValue>
           	<dataValue/>
           	<dataValue/>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
           	<dataValue>ATMN SSTM</dataValue>
           	<dataValue/>
           	<dataValue>System Administrator</dataValue>
           	<dataValue>System Administrator</dataValue>
               <dataValue>EN</dataValue>
               <dataValue>PRIVATE</dataValue>
               <dataValue>4</dataValue>
               <dataValue>EMAIL</dataValue>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
               <dataValue>AUSTRALIA/SYDNEY</dataValue>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
           	<dataValue xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
               <dataValue>ACTIVE</dataValue>
        	</queryResults>
            <sessionId>804451ca30ad4a3065e4b67a9293440c</sessionId>
            <statusCode>SUCCESS</statusCode>
     	</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:



#### 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_metadatasqlquery.jsp.
2. Put the file in the root folder: *Yellowfin/appserver/webapps/ROOT*.
3. Adjust the host, port, and admin user details according to your environment.
4. Run *http://<host>:<port>/**ws_metadatasqlquery**.jsp* from your Internet browser.


```java
<%        	
/*          	ws_metadatasqlquery.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");                        // change to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("METADATASQLQUERY");
 
rsr.setQuery("SELECT * FROM configuration WHERE ConfigTypeCode = 'SYSTEM'");
 
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
 
if ("SUCCESS".equals(rs.getStatusCode()) ) {
              	out.write("<br>Success");
              	ReportRow[] rows = rs.getQueryResults();
              	if (rows != null)
                                	for (ReportRow rr: rows){
                                                  	String[] str = rr.getDataValue();
                                                  	out.write("<br>");
                                                  	for (String s: str)
                                                                                      	out.write("<br>" + s);
                                                  	
                                	}
              	
}
else {
              	out.write("<br>Failure");
              	out.write(" Code: " + rs.getErrorCode());
}             	
%>



```


---
</details>