add pentaho report examples to api docs (were also put on demo server)
This commit is contained in:
+46
-18
@@ -7,8 +7,24 @@
|
||||
<title>Mifos X API Documentation</title>
|
||||
|
||||
<script>
|
||||
|
||||
var getLocation = function(href) {
|
||||
|
||||
QueryParameters = (function()
|
||||
{
|
||||
var result = {};
|
||||
if (window.location.search)
|
||||
{
|
||||
// split up the query string and store in an associative array
|
||||
var params = window.location.search.slice(1).split("&");
|
||||
for (var i = 0; i < params.length; i++)
|
||||
{
|
||||
var tmp = params[i].split("=");
|
||||
result[tmp[0]] = unescape(tmp[1]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
|
||||
getLocation = function(href) {
|
||||
var l = document.createElement("a");
|
||||
l.href = href;
|
||||
return l;
|
||||
@@ -32,18 +48,21 @@ function clickAPILink(apiLink)
|
||||
|
||||
function getBaseURL(docURL)
|
||||
{
|
||||
var hostName = ""
|
||||
if (docURL.substring(0,4).toLowerCase() == "http")
|
||||
{
|
||||
var l = getLocation(docURL);
|
||||
hostName = l.hostname;
|
||||
}
|
||||
var hostName = "";
|
||||
if (QueryParameters["hostname"]) hostName = QueryParameters["hostname"];
|
||||
else
|
||||
{
|
||||
//assume running locally
|
||||
hostName = "localhost";
|
||||
if (docURL.substring(0,4).toLowerCase() == "http")
|
||||
{
|
||||
var l = getLocation(docURL);
|
||||
hostName = l.hostname;
|
||||
}
|
||||
else
|
||||
{
|
||||
//assume running locally
|
||||
hostName = "localhost";
|
||||
}
|
||||
}
|
||||
|
||||
return "https://" + hostName + ":8443/mifosng-provider/api/v1/";
|
||||
}
|
||||
|
||||
@@ -2511,9 +2530,6 @@ Request Body:
|
||||
<p>
|
||||
Runs a report and returns the report output.
|
||||
</p>
|
||||
<p>
|
||||
<b>Note: </b> Pentaho details yet to be provided
|
||||
</p>
|
||||
<h5>Arguments</h5>
|
||||
<dl class="argument-list">
|
||||
<dt>R_'parameter names' ...</dt>
|
||||
@@ -2522,19 +2538,31 @@ Request Body:
|
||||
<dd>Note: the prefix R_ stands for Reporting</dd>
|
||||
<dt>parameterType</dt>
|
||||
<dd>optional, <span>The only valid value is 'true'. If any other value is provided the argument will be ignored</span></dd>
|
||||
<dd>Determines whether the request looks in the list of reports or the list of parameters for its data.</dd>
|
||||
<dd>Determines whether the request looks in the list of reports or the list of parameters for its data. Doesn't apply to Pentaho reports.</dd>
|
||||
<dt>exportCSV</dt>
|
||||
<dd>optional, <span>The only valid value is 'true'. If any other value is provided the argument will be ignored</span></dd>
|
||||
<dd>Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports .</dd>
|
||||
<dd>Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports.</dd>
|
||||
<dt>output-type</dt>
|
||||
<dd>optional, <span>Defaults to HTML.</span></dd>
|
||||
<dd>Valid Values are HTML, XLS, CSV and PDF for html, Excel, CSV and PDF formats respectively.</dd>
|
||||
<dd>Only applies to Pentaho reports.</dd>
|
||||
</dl>
|
||||
<p>Example Requests: </p>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/Client%20Listing?R_officeId=1');return false;">reports/Client%20Listing?R_officeId=1</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/Client%20Listing?R_officeId=1&exportCSV=true');return false;">reports/Client%20Listing?R_officeId=1&exportCSV=true</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/selectOfficeId?R_officeId=1&pretty=true¶meterType=true');return false;">reports/selectOfficeId?R_officeId=1& parameterType=true</a>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/selectOfficeId?R_officeId=1¶meterType=true');return false;">reports/selectOfficeId?R_officeId=1& parameterType=true</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/selectOfficeId?R_officeId=1&pretty=true¶meterType=true&exportCSV=true');return false;">reports/selectOfficeId?R_officeId=1& parameterType=true&exportCSV=true</a>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/selectOfficeId?R_officeId=1¶meterType=true&exportCSV=true');return false;">reports/selectOfficeId?R_officeId=1& parameterType=true&exportCSV=true</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/Client Listing (Pentaho)?output-type=HTML&R_officeId=1');return false;">reports/Client Listing (Pentaho)?output-type=HTML&R_officeId=1</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/Client Listing (Pentaho)?output-type=XLS&R_officeId=1');return false;">reports/Client Listing (Pentaho)?output-type=XLS&R_officeId=1</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/Client Listing (Pentaho)?output-type=CSV&R_officeId=1');return false;">reports/Client Listing (Pentaho)?output-type=CSV&R_officeId=1</a>
|
||||
<br><br>
|
||||
<a href="unknown.html" onclick="clickAPILink('reports/Client Listing (Pentaho)?output-type=PDF&R_officeId=1');return false;">reports/Client Listing (Pentaho)?output-type=PDF&R_officeId=1</a>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">GET https://Domain Name/api/v1/reports/{reportName}</code>
|
||||
|
||||
Reference in New Issue
Block a user