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 3 Next »

This section covers the overall administrative report web services.

 

 

 

This function is used to test whether or not the report web services is working.

 

Request Elements

The following elements will be passed with this request:

Request Element

Data Type

Description

LoginId

String

Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method.

This Yellowfin 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.

ReportRequest

String

Web services function. Set this to "TEST".

OrgRef

String

Client Org Internal Reference Id (optional).

 

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

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

 

 

Response Elements

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

 

 

Response Example

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

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <canDrill>false</canDrill>
            <dashboardEnabled>false</dashboardEnabled>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Connection Tested Successfully</messages>
            <messages>Unknown Or Unsupported Request: TEST</messages>
            <messages>Web Service Request Complete</messages>
            <private>false</private>
            <sessionId>f78fe29edb19bbfe45626c2203249f4b</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

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

  • Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:

    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("TEST");
  • If you need to specify a particular client org:

    rsr.setOrgRef("org1");      // search for the report in this client org
  • Once the request is configured, carry out the call:

    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

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

 

  • The response returned will contain the StatusCode parameter. Refer to the Response Parameter table for details.

 


Complete Example

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

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

 

<%           
/*              ws_test_reportservices.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="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
	

	ReportService rsc = new ReportService();   //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
	ReportServiceRequest rsr = new ReportServiceRequest();
	rsr.setLoginId("admin@yellowfin.com.au");
	rsr.setPassword("test");
	rsr.setOrgId(new Integer(1));
	rsr.setReportRequest("TEST");
	rsr.setOrgRef("1");
	
	
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 


 

This web services retrieves details of a specified report.

 

Request Elements

The following elements will be passed with this request:

Request Element

Data Type

Description

LoginId

String

Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method.

This Yellowfin 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.

ReportRequest

String

Web services function. Set this to "INFO".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerYou can provide a report ID to search for a particular report.


 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
        <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>INFO</reportRequest>
            <reportId>60712</reportId>        
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

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
ReportNameStringName of the specified report.
ReportDescriptionStringDescription of the specified report.
ReportUUIDIntegerUnique ID (or UUID) of the specified report.
HitCountIntegerNumber of times the report was accessed.
FormatCodeStringFormat code of the report.
AverageRunTimeIntegerAverage run time of the report.
CategoryStringCategory where report is present.
SubCategoryStringSub category of the report.
ReportUsageInteger 
ViewNameStringName of the view.
DatasourceStringName of the data source.
AuthorStringUser who created the report.
AuthoringModeStringMode in which the report was created.
ReportTemplateStringTemplate of the report.
DataOutputStringData output. E.g. column.
DashboardEnabledBooleanTrue if the dashboard is enabled.
LastModifiedDateDateDate the report was last modified.

 

 

Response Example

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

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode>
            <averageRunTime>0</averageRunTime>
            <canDrill>false</canDrill>
            <category>Tutorial</category>
            <dashboardEnabled>true</dashboardEnabled>
            <dataOutput>COLUMN</dataOutput>
            <datasource>Ski Team</datasource>
            <errorCode>0</errorCode>
            <formatCode>REPORTANDCHART</formatCode>
            <hitCount>0</hitCount>
            <lastModifiedDate>2017-06-26</lastModifiedDate>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Loaded Report: 60712 Successfully</messages>
            <messages>Collating Report Information</messages>
            <messages>Web Service Request Complete</messages>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Company Name</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString>
            <private>false</private>
            <reportDescription>Top N Agencies compared to all other Agencies by demographic</reportDescription>
            <reportId>60712</reportId>
            <reportName>Agency Benchmark</reportName>
            <reportTemplate>REPORTANDCHART</reportTemplate>
            <reportUUID>c83357db-8aef-4ec7-ab72-fce34de9ee77</reportUUID>
            <reportUsage>0</reportUsage>
            <sessionId>900e9dfabd21bdef75410fa88fe501dd</sessionId>
            <statusCode>SUCCESS</statusCode>
            <subCategory>Marketing &amp; Booking</subCategory>
            <tags>No tags</tags>
            <viewName>New View</viewName>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

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

  • Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:

    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("INFO");
  • If you need to specify the client org where the report exists, add this to your code:

    rsr.setOrgRef("org1");      // search for the report in this client org
  • You can even specify which report's comment to change the status of:

    rsr.setReportId(60712);



  • You may even specify the report client Reference ID or session ID:

    rsr.setReportClientReferenceId("1");
    rsr.setSessionId("18607a5670842650d512976b5d7ccddd");
  • Once the request is configured, carry out the call:

    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

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

 

  • The response returned will contain the StatusCode parameter, along with other report specific parameters. Refer to the Response Parameter table above for details.

 


Complete Example

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

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

 

<%           
/*              ws_info_report.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="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%

ReportService rsc = new ReportService();   //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
	ReportServiceRequest rsr = new ReportServiceRequest();
	rsr.setLoginId("admin@yellowfin.com.au");
	rsr.setPassword("test");
	rsr.setOrgId(new Integer(1));
	rsr.setReportRequest("INFO");

	rsr.setOrgRef("1");
	rsr.setReportId(60712);
	rsr.setReportClientReferenceId("1");
	rsr.setSessionId("18607a5670842650d512976b5d7ccddd");

	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 


 

Report Comment Management

The web services in this section are related to user comments on Yellowfin reports.

This function is used to set the status of a report comment. The status options include: OPEN, EDITED, RESOLVED and DELETED.

 

Request Elements

The following elements will be passed with this request:

Request Element

Data Type

Description

LoginId

String

Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method.

This Yellowfin 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.

ReportRequest

String

Web services function. Set this to "COMMENTSTATUS".

ReportComment

ReportComment

Object containing details of the report comment whose status is to be set. See table below.

OrgRef

String

Client Org Internal Reference Id (optional). Use this to search for the report in the referenced Client Org. If this is not set, then the report will be searched in the default (primary) org.

ReportIdIntegerYou can provide a report ID to search for a particular report.

 

These are the mandatory parameters that you need to set in the ReportComment object for this function:

ReportComment Element

Data Type

Description

Retrieval Code

CommentId

Integer

ID of comment

getCommentId()

StatusCode

String

Provide the new status. The status option include: OPEN, EDITED, RESOLVED and DELETED.

getStatusCode()

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>COMMENTSTATUS</reportRequest>
            <reportId>60712</reportId>
            <reportComment>
            	<commentId>12345</commentId>
            	<statusCode>OPEN</statusCode>
            </reportComment>
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

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

 

 

Response Example

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

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <canDrill>false</canDrill>
            <dashboardEnabled>false</dashboardEnabled>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <private>false</private>
            <sessionId>6dc344c3e5dee88864998f4acc17d676</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

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

  • Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:

    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("COMMENTSTATUS");

 

  • If you need to specify the client org where the report exists, add this to your code:

    rsr.setOrgRef("org1");      // search for the report in this client org



  • This function requires a ReportComment object to specify the new status to be given to the report:

    ReportComment rc=new ReportComment();
  • You can even specify which report's comment to change the status of:

    rc.setReportId(60712);



  • Specify which comment to change the status of, and the new status option:

    rc.setCommentId(12345);
    rc.setStatusCode("OPEN");
  • Pass the 'rc' object to the request:

    rsr.setReportComment(rc);
  • Once the request is configured, carry out the call:

    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

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

 

  • The response returned will contain the StatusCode parameter. Refer to the Response Parameter table above for details.

 


Complete Example

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

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

 

<%           
/*              ws_commentstatus.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="javax.xml.bind.JAXBContext" %>
<%@ page import="javax.xml.bind.Marshaller" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="javax.xml.bind.JAXBElement" %>
<%@ page import="javax.xml.namespace.QName" %>
<%
/*
  Create Group
  Using Java generated stubs rather that using the Yellowfin webservices API..
*/

ReportService rsc = new ReportService();   //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService");
	ReportServiceRequest rsr = new ReportServiceRequest();
	rsr.setLoginId("admin@yellowfin.com.au");
	rsr.setPassword("test");
	rsr.setOrgId(new Integer(1));
	rsr.setReportRequest("COMMENTSTATUS");
	
	ReportComment rc=new ReportComment();
	rc.setReportId(60712);
	rc.setCommentId(12345);
	rc.setStatusCode("OPEN");
	rsr.setReportComment(rc);
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 


 

  • No labels