This section covers the overall administrative report web services.
Basic Functions
This function is used to test whether or not the report web service 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:
|
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:
- Copy the code and save it as ws_test_reportservices.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- 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). |
ReportId | Integer | You 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:
|
ReportName | String | Name of the specified report. |
ReportDescription | String | Description of the specified report. |
ReportUUID | Integer | Unique ID (or UUID) of the specified report. |
HitCount | Integer | Number of times the report was accessed. |
FormatCode | String | Format code of the report. |
AverageRunTime | Integer | Average run time of the report. |
Category | String | Category where report is present. |
SubCategory | String | Sub category of the report. |
ReportUsage | Integer | The number of times the report has been used or accessed. |
ViewName | String | Name of the view. |
Datasource | String | Name of the data source. |
Author | String | User who created the report. |
AuthoringMode | String | Mode in which the report was created. |
ReportTemplate | String | Template of the report. |
DataOutput | String | Data output. E.g. column. |
DashboardEnabled | Boolean | True if the dashboard is enabled. |
LastModifiedDate | Date | Date 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 & 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:
- Copy the code and save it as ws_info_report.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- 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()); } %>
This web service returns schematic information of a specified report, which includes metadata for report columns and filters as well.
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 "SCHEMA". |
OrgRef | String | Client Org internal reference ID (optional). |
ReportId | Integer | You can provide a report ID to search for a particular report. |
ObjectName | String | (Optional) The web service name of the report. This is not needed if the report ID is provided. |
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>SCHEMA</reportRequest> <reportId>60712</reportId> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response returned will contain these main parameters:
Response Element | Data Type | Description | Retrieval Code |
---|---|---|---|
ReportId | Integer | ID of the specified report |
|
StatusCode | String | Status of the web service request |
|
FormatCode | String | Format code of the specified report |
|
ReportType | String | Report type of the specified report |
|
LastRunStatus | String | Status code of last report run |
|
LastRunTime | Decimal | Last report run time in the format of YYYYMMDDHHMMSS |
|
ReportName | String | Name of the specified report |
|
BinaryData | String | Base64 encoded binary chunk of image, HTML, CSV, or PDF |
|
ViewName | String | Name of view that the report depends on |
|
HitCount | Integer | Number of times the specified report has been accessed |
|
DrillCode | String | Drill type if available on the report |
|
Private |
| Determines if the report is a private or a public one |
|
Results | Array of ReportRow objects that contain results in the report result set (see ReportRow) |
| |
ContentType | String | MIME ContentType of the returned object. Possible values include:
|
|
Messages | String[] | Array of Strings that show debug information as the report is run on the server. Used for debugging and tracing errors |
|
Charts | Array of ReportChart objects that contains multiple chart bitmaps when attached to a HTML report response. |
| |
Columns | Array of ReportSchema objects that contain information on each column in the report result set, and whether the report requires user prompt filter data to be passed to it. |
|
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>1</averageRunTime> <canDrill>false</canDrill> <category>Tutorial</category> <columns> <columnName>TopN</columnName> <dataType>TEXT</dataType> <displayName>Top N</displayName> <fieldId>3</fieldId> <hidden>false</hidden> <numberOfDecimals>0</numberOfDecimals> <outputLocation>COLUMN</outputLocation> <prompt>false</prompt> <sortOrder>0</sortOrder> </columns> <columns> <columnName>AGENCYNAME</columnName> <dataType>TEXT</dataType> <displayName>Company Name</displayName> <fieldId>4</fieldId> <hidden>false</hidden> <numberOfDecimals>0</numberOfDecimals> <outputLocation>COLUMN</outputLocation> <prompt>false</prompt> <sortOrder>1</sortOrder> </columns> <columns> <columnName>DEMOGRAPHIC</columnName> <dataType>TEXT</dataType> <displayName>Demographic</displayName> <fieldId>1</fieldId> <hidden>false</hidden> <numberOfDecimals>0</numberOfDecimals> <outputLocation>COLUMN</outputLocation> <prompt>false</prompt> <sortOrder>2</sortOrder> </columns> <columns> <columnName>FormulaBuilderMetric</columnName> <dataType>NUMERIC</dataType> <displayName>Sum Invoiced (Pref Currency)</displayName> <fieldId>2</fieldId> <hidden>false</hidden> <numberOfDecimals>0</numberOfDecimals> <outputLocation>COLUMN</outputLocation> <prompt>false</prompt> <sortOrder>3</sortOrder> </columns> <columns> <allowPrompt>true</allowPrompt> <cachedValues>false</cachedValues> <columnName>AGENCYNAME</columnName> <dataType>TEXT</dataType> <displayName>Company Name</displayName> <filterDisplayType>TEXT</filterDisplayType> <filterId>60723</filterId> <filterOmittable>true</filterOmittable> <filterType>INLIST</filterType> <filterTypeCode>FILTER</filterTypeCode> <filterUUID>d3aaf0e4-4b67-4118-9871-7dc98933e4e3</filterUUID> <numberOfDecimals>0</numberOfDecimals> <prompt>true</prompt> <sortOrder>1</sortOrder> </columns> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Ski Team</datasource> <drillCode>NODRILL</drillCode> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>2</hitCount> <lastModifiedDate>2017-06-26</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 60712 Successfully</messages> <messages>Collating Schema 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>9</reportUsage> <sessionId>da57441eaf7852ad59888e95775735fd</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>Marketing & Booking</subCategory> <tags>No tags</tags> <viewName>Ski Team</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:
- Copy the code and save it as ws_reportschema.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_reportschema.jsp from your Internet browser.
<% /* ws_reportschema.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.setOrgRef("1"); rsr.setReportRequest("SCHEMA"); rsr.setReportId(60712); rsr.setReportClientReferenceId("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()); } %>
Report Result Set Functions
These web services are specific to the result generated by a report.
This web service retrieves the result data of a specified report, as well as the report's metadata. The report's result will be in a raw, preformatted format. This result will be stored in an array of ReportRow objects, which each such object representing a result row. Therefore, for each of the rows, an array of strings containing the data in each column of the result data will be present.
Note: It is up to the web services client to convert this data from the string representation into the data type for each particular column. The data types for each column can be obtained with the SCHEMA function.
For example, here is a Role Population report that contains two columns and specifies the number of users assigned to each user role:
User Role | Population |
---|---|
System Administrator | 1 |
Consumer & Collaborator | 5 |
Report Content Writer | 4 |
This web service will return a ReportRow object for each of the user role, which every object containing two data strings: one containing the name of the role, and the other displaying its user population.
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 "RESULTSET". |
OrgRef | String | Client Org internal reference ID (optional). |
ReportId | Integer | ID of the report whose result data is to be viewed. |
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>RESULTSET</reportRequest> <reportId>58511</reportId> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response will contain the following main parameters: (For a more detailed list of response parameters, refer to the ReportServiceResponse object.)
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
Results | ReportRow[] | An array of object containing the result of the report's data set. |
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>Audit Reports</category> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Yellowfin Configuration Database</datasource> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>4</hitCount> <lastModifiedDate>2016-04-13</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 58511 Successfully</messages> <messages>Returning RAW Resultset</messages> <messages>Request Contains No ReportFilter Records.</messages> <messages>Report Run Successfully</messages> <messages>Web Service Request Complete</messages> <private>false</private> <reportDescription/> <reportId>58511</reportId> <reportName>Role Population</reportName> <reportTemplate>REPORTANDCHART</reportTemplate> <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID> <reportUsage>7</reportUsage> <results> <dataValue>System Administrator</dataValue> <dataValue>1</dataValue> </results> <results> <dataValue>Consumer & Collaborator</dataValue> <dataValue>5</dataValue> </results> <sessionId>c958af74f677c4b1f575bd728d3b25d0</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>User Access</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("RESULTSET");
Specify the report to get its result set:
rsr.setReportId(60712);
You may even specify the report client Reference ID:
rsr.setReportClientReferenceId("1");
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 and Results parameters, 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:
- Copy the code and save it as ws_resultset.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user, and report details according to your environment.
- Run http://<host>:<port>/ws_resultset.jsp from your Internet browser.
<% /* ws_resultset.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("RESULTSET"); rsr.setReportId(60712); rsr.setReportClientReferenceId("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 service is similar to the RESULTSET function call, however it returns the raw result set using the formatters from the 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 "FORMATTEDRESULTSET". |
OrgRef | String | Client Org internal reference ID (optional). |
ReportId | Integer | ID of the report whose result data is to be viewed. |
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>FORMATTEDRESULTSET</reportRequest> <reportId>58511</reportId> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response will contain the following main parameters: (For a more detailed list of response parameters, refer to the ReportServiceResponse object.)
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
Results | ReportRow[] | An array of object containing the result of the report's data set. |
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>Audit Reports</category> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Yellowfin Configuration Database</datasource> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>5</hitCount> <lastModifiedDate>2016-04-13</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 58511 Successfully</messages> <messages>Returning RAW Resultset</messages> <messages>Request Contains No ReportFilter Records.</messages> <messages>Report Run Successfully</messages> <messages>Web Service Request Complete</messages> <private>false</private> <reportDescription/> <reportId>58511</reportId> <reportName>Role Population</reportName> <reportTemplate>REPORTANDCHART</reportTemplate> <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID> <reportUsage>9</reportUsage> <results> <dataValue>System Administrator</dataValue> <dataValue>1</dataValue> </results> <results> <dataValue>Consumer & Collaborator</dataValue> <dataValue>5</dataValue> </results> <sessionId>1e4f0c8ee07d24a5500f952a459b1652</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>User Access</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("FORMATTEDRESULTSET");
Specify the report to get its formatted result set:
rsr.setReportId(60712);
You may even specify the report client Reference ID:
rsr.setReportClientReferenceId("1");
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 and Results parameters, 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:
- Copy the code and save it as ws_resultset.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user, and report details according to your environment.
- Run http://<host>:<port>/ws_resultset.jsp from your Internet browser.
<% /* ws_resultset.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("FORMATTEDRESULTSET"); rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setReportClientReferenceId("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()); } %>
Miscellaneous
This function sends a report to a recipient's email address.
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 "SENDTOEMAIL". |
OrgRef | String | Optional parameter to specify an internal reference ID of a Client Org. |
ReportId | Integer | An internal ID to of the report that is to be emailed. |
ReportsOption | String[] | A list of email addresses to send the report to. |
AlterationCommand | ||
SessionId | Integer | (Optional) To specify a previous session by its ID. |
LanguageCode | (Optional) To specify a language. |
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>SENDTOEMAIL</reportRequest> <reportId>70012</reportId> <alterationCommand>drill-down|70012</alterationCommand> <reportOptions> <string>binish.sheikh@yellowfin.com.au</string> </reportOptions> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response will contain these main 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:
<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>CHART</formatCode> <hitCount>3</hitCount> <lastModifiedDate>2018-03-07</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 70012 Successfully</messages> <messages>Web Service Request Complete</messages> <preRunFilterString><![CDATA[<div class="rptFilterLogicText"> <span class="rptFilterLogicIdentifier">Invoiced Date</span> Between <span class="rptFilterLogicIdentifier">Current Date - 6 Years And Current Date</span> </div> . . . ]]></preRunFilterString> <private>false</private> <reportDescription>This report provides a high level summary of campaigns</reportDescription> <reportId>70012</reportId> <reportName>Campaign Summary</reportName> <reportTemplate>CHART</reportTemplate> <reportUUID>3e842fae-02f7-4ad3-a632-ca267e0078da</reportUUID> <reportUsage>100</reportUsage> <sessionId>fa0cc79a9ea229bd5df85b4a7f50c878</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>Marketing & 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("SENDTOEMAIL");
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
Specify the report that is to be emailed, and its alteration command:
rsr.setReportId(60712); rsr.setAlterationCommand("drill-down|60712");
Then provide the email address(es) to send the report to:
rsr.setReportOptions(new String[]{ "dummy@dummy.com"});
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 following parameters: StatusCode, Dashboard, Subtabs. (See the Response Parameters table above for more details.)
Complete Example
Below is a full example of this function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_sendtoemail.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_sendtoemail.jsp from your Internet browser.
/* ws_sendtoemail.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("SENDTOEMAIL"); rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setAlterationCommand("drill-down|60712"); rsr.setReportOptions(new String[]{ "dummy@dummy.com"}); rsr.setReportClientReferenceId("1"); rsr.setDashboardTabId(70080); 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()); } %>
Processes an interaction from a report a web service report. This function is used to interact with a report, such as by changing a report page, performing drill-through, drill-down, drill-anywhere, or changing the series selection.
The AlterationCommand parameter is a text-code that is embedded in a report that can be passed back to the web service to alter the 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 "COMMAND". |
OrgRef | String | Client Org internal reference ID (optional). |
ReportId | Integer | ID of the report to be processed. |
AlterationComment | String | Command to be applied to the report. This specifies how the report should be altered. This parameter is a text-code that is embedded in a report; on retrieving the report details, you can pass this value to the web service to alter the report. |
CommandHistory | String | (Optional) List of piped commands, (Applies the command sequentially if the report has been wiped from the session.) |
SessionID | String | (Optional) ID of the previous session. |
LanguageCode | String | (Optional) To specify the language. |
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:
|
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("COMMAND");
If you need to specify the client org where the report exists, add this to your code:
rsr.setReportClientReferenceId("1");
Add the command to be applied to the report:
rsr.setAlterationCommand("DRILLDOWN|60712|53655|RXVyb3Bl");
Pass the session ID from the previous request, if required:
rsr.setSessionId("ce509806176f6a0563767bfb0b2bb36f");
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:
- Copy the code and save it as ws_command_report.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- Run http://<host>:<port>/ws_command_report.jsp from your Internet browser.
<%@page import="com.thoughtworks.xstream.io.xml.StaxDriver"%> <%@ 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("COMMAND"); rsr.setReportId(60712); rsr.setAlterationCommand("DRILLDOWN|60712|53655|RXVyb3Bl"); rsr.setReportClientReferenceId("1"); rsr.setSessionId("ce509806176f6a0563767bfb0b2bb36f"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { %> <xmp> <% 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); %></xmp><% //out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>