update api docs and small additional data code changes
This commit is contained in:
+291
-295
@@ -526,7 +526,7 @@ JSON examples:
|
|||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>List Clients</h4>
|
<h4>List Clients</h4>
|
||||||
<p>Example Request: </p>
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true&fields=displayName,officeName,joinedDate">https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true&fields=displayName,officeName,joinedDate</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true&fields=displayName,officeName,joinedDate">https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true&fields=displayName,officeName,joinedDate</a>
|
||||||
@@ -602,7 +602,7 @@ JSON examples:
|
|||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Retrieve a Client</h4>
|
<h4>Retrieve a Client</h4>
|
||||||
<p>Example Request: </p>
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true&template=true">https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true&template=true</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true&template=true">https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true&template=true</a>
|
||||||
@@ -691,7 +691,7 @@ Request Body:
|
|||||||
in a specific use case of the Individual Lending User Interface.<br>
|
in a specific use case of the Individual Lending User Interface.<br>
|
||||||
However, it is quite reasonable to add resources like this to simplify User Interface development.
|
However, it is quite reasonable to add resources like this to simplify User Interface development.
|
||||||
</p>
|
</p>
|
||||||
<p>Example Request: </p>
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true&fields=openLoans,%20closedLoans,activeLoanCount">https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true&fields=openLoans,%20closedLoans,activeLoanCount</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true&fields=openLoans,%20closedLoans,activeLoanCount">https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=true&fields=openLoans,%20closedLoans,activeLoanCount</a>
|
||||||
@@ -745,7 +745,7 @@ Request Body:
|
|||||||
<p>
|
<p>
|
||||||
<b>Note:</b> Notes are returned in descending createOn order.
|
<b>Note:</b> Notes are returned in descending createOn order.
|
||||||
</p>
|
</p>
|
||||||
<p>Example Request: </p>
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true&fields=note,createdOn,createdByUsername">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true&fields=note,createdOn,createdByUsername</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true&fields=note,createdOn,createdByUsername">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=true&fields=note,createdOn,createdByUsername</a>
|
||||||
@@ -808,7 +808,7 @@ Request Body:
|
|||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Retrieve a Client Note</h4>
|
<h4>Retrieve a Client Note</h4>
|
||||||
<p>Example Request: </p>
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true&fields=note,createdOn,createdByUsername">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true&fields=note,createdOn,createdByUsername</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true&fields=note,createdOn,createdByUsername">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=true&fields=note,createdOn,createdByUsername</a>
|
||||||
@@ -901,15 +901,15 @@ Request Body:
|
|||||||
<h5>Arguments</h5>
|
<h5>Arguments</h5>
|
||||||
<dl class="argument-list">
|
<dl class="argument-list">
|
||||||
<dt>clientId</dt>
|
<dt>clientId</dt>
|
||||||
<dd>Integer</dd>
|
<dd>Integer <span>mandatory</span></dd>
|
||||||
<dd>The 'id' of the Client</dd>
|
|
||||||
<dt>productId</dt>
|
<dt>productId</dt>
|
||||||
<dd>Integer</dd>
|
<dd>Integer <span>optional</span></dd>
|
||||||
<dd>The 'id' of the Loan Product</dd>
|
<dd>If entered, productId, productName and selectedProduct fields are returned. </dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Example Request:
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1">https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1&pretty=true">https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1&pretty=true</a>
|
||||||
</p>
|
<br><br>
|
||||||
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&pretty=true">https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&pretty=true</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://thedomainname/api/v1/loans/template</code>
|
<code class="method-declaration">GET https://thedomainname/api/v1/loans/template</code>
|
||||||
@@ -2558,13 +2558,16 @@ Request Body:{
|
|||||||
In Mifos X, any number of "Sets" of "Additional Fields" can be configured for a Mifos X database table ("Type").
|
In Mifos X, any number of "Sets" of "Additional Fields" can be configured for a Mifos X database table ("Type").
|
||||||
</p>
|
</p>
|
||||||
<p> For example, portfolio_client is the database table that holds client data. Typically, MFI's want more client related fields than is provided by Mifos X out-of-the-box.
|
<p> For example, portfolio_client is the database table that holds client data. Typically, MFI's want more client related fields than is provided by Mifos X out-of-the-box.
|
||||||
The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client. They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional circumstances.
|
The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client.
|
||||||
|
They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional
|
||||||
|
circumstances.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The additional fields resource allows you to retrieve and update any Additional Fields data that has been configured in Mifos X.
|
The additional fields resource allows you to retrieve and update any Additional Fields data that has been configured in Mifos X.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this additional fields resource to provide a pretty flexible additional fields User Interface (UI). Put a link to an example here.
|
The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this
|
||||||
|
additional fields resource to provide a pretty flexible additional fields User Interface (UI).
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2584,26 +2587,26 @@ Request Body:{
|
|||||||
<dd><span>optional</span></dd>
|
<dd><span>optional</span></dd>
|
||||||
<dd>The Additional Fields Type (Mifos X database table) to restrict the output to</dd>
|
<dd>The Additional Fields Type (Mifos X database table) to restrict the output to</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Example Request:
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client">https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client&pretty=true">https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client&pretty=true</a>
|
||||||
</p>
|
<br><br>
|
||||||
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields?pretty=true">https://localhost:8443/mifosng-provider/api/v1/additionalfields?pretty=true</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://thedomainname/api/v1/additionalfields</code>
|
<code class="method-declaration">GET https://thedomainname/api/v1/additionalfields</code>
|
||||||
<code class="method-response">{
|
<code class="method-response">[ {
|
||||||
"additionalFieldsSets": [
|
"id" : 1,
|
||||||
{
|
"name" : "Additional Information",
|
||||||
"id": 1,
|
"type" : "portfolio_client"
|
||||||
"name": "Additional Information",
|
}, {
|
||||||
"type": "portfolio_client"
|
"id" : 8,
|
||||||
},
|
"name" : "Additional Information",
|
||||||
{
|
"type" : "portfolio_loan"
|
||||||
"id": 9,
|
}, {
|
||||||
"name": "Highly Improbable Info",
|
"id" : 9,
|
||||||
"type": "portfolio_client"
|
"name" : "Highly Improbable Info",
|
||||||
}
|
"type" : "portfolio_client"
|
||||||
]
|
} ]
|
||||||
}
|
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2617,125 +2620,71 @@ Request Body:{
|
|||||||
Returns the Set of Additional Fields data for the ID provided. The ID is the id field of the Type table e.g. portfolio_client might have an id value of 4. The output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. The Column Heading information may include allowed values (columnValues array).
|
Returns the Set of Additional Fields data for the ID provided. The ID is the id field of the Type table e.g. portfolio_client might have an id value of 4. The output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. The Column Heading information may include allowed values (columnValues array).
|
||||||
</p>
|
</p>
|
||||||
<p>Example Request:
|
<p>Example Request:
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2">https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2?pretty=true">https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2?pretty=true</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}</code>
|
<code class="method-declaration">GET https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}</code>
|
||||||
<code class="method-response">{
|
<code class="method-response">{
|
||||||
"columnHeaders": [
|
"columnHeaders" : [ {
|
||||||
{
|
"columnName" : "Ethnic Group",
|
||||||
"columnName": "Ethnic Group",
|
"columnType" : "String",
|
||||||
"columnType": "String",
|
"columnLength" : 50,
|
||||||
"columnLength": 50,
|
"columnDisplayType" : "List",
|
||||||
"columnDisplayType": "List",
|
"columnValues" : [ "Bedouin", "Berber", "Italian", "Miknasa", "Mrazig", "Other", "Unknown" ]
|
||||||
"columnValues": [
|
}, {
|
||||||
"Bedouin",
|
"columnName" : "Ethnic Group Other",
|
||||||
"Berber",
|
"columnType" : "String",
|
||||||
"Italian",
|
"columnLength" : 50,
|
||||||
"Miknasa",
|
"columnDisplayType" : null,
|
||||||
"Mrazig",
|
"columnValues" : [ ]
|
||||||
"Other",
|
}, {
|
||||||
"Unknown"
|
"columnName" : "Household Location",
|
||||||
]
|
"columnType" : "String",
|
||||||
},
|
"columnLength" : 50,
|
||||||
{
|
"columnDisplayType" : "List",
|
||||||
"columnName": "Ethnic Group Other",
|
"columnValues" : [ "East Sikkim", "North Sikkim", "South Sikkim", "West Sikkim", "Other" ]
|
||||||
"columnType": "String",
|
}, {
|
||||||
"columnLength": 50,
|
"columnName" : "Household Location Other",
|
||||||
"columnDisplayType": null,
|
"columnType" : "String",
|
||||||
"columnValues": []
|
"columnLength" : 50,
|
||||||
},
|
"columnDisplayType" : null,
|
||||||
{
|
"columnValues" : [ ]
|
||||||
"columnName": "Household Location",
|
}, {
|
||||||
"columnType": "String",
|
"columnName" : "Religion",
|
||||||
"columnLength": 50,
|
"columnType" : "String",
|
||||||
"columnDisplayType": "List",
|
"columnLength" : 50,
|
||||||
"columnValues": [
|
"columnDisplayType" : "List",
|
||||||
"East Sikkim",
|
"columnValues" : [ "Protestant", "Catholic", "Muslim", "Animist", "Atheist", "Other", "Unknown" ]
|
||||||
"North Sikkim",
|
}, {
|
||||||
"South Sikkim",
|
"columnName" : "Religion Other",
|
||||||
"West Sikkim",
|
"columnType" : "String",
|
||||||
"Other"
|
"columnLength" : 50,
|
||||||
]
|
"columnDisplayType" : null,
|
||||||
},
|
"columnValues" : [ ]
|
||||||
{
|
}, {
|
||||||
"columnName": "Household Location Other",
|
"columnName" : "Knowledge of Person",
|
||||||
"columnType": "String",
|
"columnType" : "String",
|
||||||
"columnLength": 50,
|
"columnLength" : 50,
|
||||||
"columnDisplayType": null,
|
"columnDisplayType" : "List",
|
||||||
"columnValues": []
|
"columnValues" : [ "Staff member", "Spouse of staff member", "Son/daughter of staff member", "Friend of staff member", "Not known by any staff member", "Other" ]
|
||||||
},
|
}, {
|
||||||
{
|
"columnName" : "Gender",
|
||||||
"columnName": "Religion",
|
"columnType" : "String",
|
||||||
"columnType": "String",
|
"columnLength" : 10,
|
||||||
"columnLength": 50,
|
"columnDisplayType" : "List",
|
||||||
"columnDisplayType": "List",
|
"columnValues" : [ "Female", "Male" ]
|
||||||
"columnValues": [
|
}, {
|
||||||
"Protestant",
|
"columnName" : "Whois",
|
||||||
"Catholic",
|
"columnType" : "Text",
|
||||||
"Muslim",
|
"columnLength" : null,
|
||||||
"Animist",
|
"columnDisplayType" : null,
|
||||||
"Atheist",
|
"columnValues" : [ ]
|
||||||
"Other",
|
} ],
|
||||||
"Unknown"
|
"data" : [ {
|
||||||
]
|
"row" : [ "Bedouin", null, "East Sikkim", null, "Animist", "Agnostic", "Friend of staff member", "Female", "A person of honesty & clear thought" ]
|
||||||
},
|
} ]
|
||||||
{
|
}
|
||||||
"columnName": "Religion Other",
|
|
||||||
"columnType": "String",
|
|
||||||
"columnLength": 50,
|
|
||||||
"columnDisplayType": null,
|
|
||||||
"columnValues": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"columnName": "Knowledge of Person",
|
|
||||||
"columnType": "String",
|
|
||||||
"columnLength": 50,
|
|
||||||
"columnDisplayType": "List",
|
|
||||||
"columnValues": [
|
|
||||||
"Staff member",
|
|
||||||
"Spouse of staff member",
|
|
||||||
"Son/daughter of staff member",
|
|
||||||
"Friend of staff member",
|
|
||||||
"Not known by any staff member",
|
|
||||||
"Other"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"columnName": "Gender",
|
|
||||||
"columnType": "String",
|
|
||||||
"columnLength": 10,
|
|
||||||
"columnDisplayType": "List",
|
|
||||||
"columnValues": [
|
|
||||||
"Female",
|
|
||||||
"Male"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"columnName": "Whois",
|
|
||||||
"columnType": "Text",
|
|
||||||
"columnLength": 0,
|
|
||||||
"columnDisplayType": null,
|
|
||||||
"columnValues": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"row": [
|
|
||||||
"Berber",
|
|
||||||
null,
|
|
||||||
"East Sikkim",
|
|
||||||
null,
|
|
||||||
"Animist",
|
|
||||||
"jjjjjjj",
|
|
||||||
"Son/daughter of staff member",
|
|
||||||
"Female",
|
|
||||||
"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2749,50 +2698,44 @@ Request Body:{
|
|||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">POST https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}</code>
|
<code class="method-declaration">POST https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}</code>
|
||||||
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
|
<code class="method-request">POST https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
|
||||||
|
Content-Type: application/json
|
||||||
|
Request Body:
|
||||||
Content-Type: application/json
|
{
|
||||||
Request Body:
|
"Ethnic_Group":"Berber",
|
||||||
{
|
"Ethnic_Group_Other":"",
|
||||||
"Ethnic_Group":"Berber",
|
"Household_Location":"East Sikkim",
|
||||||
"Ethnic_Group_Other":"",
|
"Household_Location_Other":"",
|
||||||
"Household_Location":"East Sikkim",
|
"Religion":"Animist",
|
||||||
"Household_Location_Other":"",
|
"Religion_Other":"jjjjjjj",
|
||||||
"Religion":"Animist",
|
"Knowledge_of_Person":"Son/daughter of staff member",
|
||||||
"Religion_Other":"jjjjjjj",
|
"Gender":"Female",
|
||||||
"Knowledge_of_Person":"Son/daughter of staff member",
|
"Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
|
||||||
"Gender":"Female",
|
}
|
||||||
"Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
|
</code>
|
||||||
}
|
|
||||||
</code>
|
|
||||||
<code class="method-response">{
|
<code class="method-response">{
|
||||||
"entityId": 2
|
"entityId": 2
|
||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="reports" name="reports" class="old-syle-anchor"> </a>
|
<a id="reports" name="reports" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h3>Reports</h3>
|
<h3>Reports</h3>
|
||||||
<p>
|
<p>
|
||||||
The reports resource allows you to run and receive output from pre-defined Mifos X reports. The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URI.
|
The reports resource allows you to run and receive output from pre-defined Mifos X reports.
|
||||||
|
The default output is a JSON formatted "Generic Resultset".
|
||||||
|
The Generic Resultset contains Column Heading as well as Data information.
|
||||||
|
However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URL.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.
|
If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
<p>Add examples showing links to client listing report producing json, then csv, then a pentaho report producing html, pdf, csv</p>
|
The Mifos X Individual Lending client application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).
|
||||||
<p>
|
|
||||||
The Mifos X Individual Lending client application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI). Put a link to an example here.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2813,82 +2756,105 @@ Request Body:{
|
|||||||
<dd>optional, <span>The only valid value is 'true'. If any other value is provided the argument will be ignored</span></dd>
|
<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.</dd>
|
<dd>Output will be delivered as a CSV file instead of JSON.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Example Request:
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports">https://localhost:8443/mifosng-provider/api/v1/reports</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true">https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true</a>
|
||||||
</p>
|
<br><br>
|
||||||
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true&exportCSV=true">https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true&exportCSV=true</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://thedomainname/api/v1/reports</code>
|
<code class="method-declaration">GET https://thedomainname/api/v1/reports</code>
|
||||||
<code class="method-response">{
|
<code class="method-response">{
|
||||||
"columnHeaders": [
|
"columnHeaders" : [ {
|
||||||
{
|
"columnName" : "report_id",
|
||||||
"columnName": "report_id",
|
"columnType" : "INT",
|
||||||
"columnType": "INT",
|
"columnLength" : null,
|
||||||
"columnLength": null,
|
"columnDisplayType" : null,
|
||||||
"columnDisplayType": null,
|
"columnValues" : [ ]
|
||||||
"columnValues": []
|
}, {
|
||||||
},
|
"columnName" : "report_name",
|
||||||
{
|
"columnType" : "VARCHAR",
|
||||||
"columnName": "report_name",
|
"columnLength" : null,
|
||||||
"columnType": "VARCHAR",
|
"columnDisplayType" : null,
|
||||||
"columnLength": null,
|
"columnValues" : [ ]
|
||||||
"columnDisplayType": null,
|
}, {
|
||||||
"columnValues": []
|
"columnName" : "report_type",
|
||||||
},
|
"columnType" : "VARCHAR",
|
||||||
{
|
"columnLength" : null,
|
||||||
"columnName": "report_type",
|
"columnDisplayType" : null,
|
||||||
"columnType": "VARCHAR",
|
"columnValues" : [ ]
|
||||||
"columnLength": null,
|
}, {
|
||||||
"columnDisplayType": null,
|
"columnName" : "report_subtype",
|
||||||
"columnValues": []
|
"columnType" : "VARCHAR",
|
||||||
},
|
"columnLength" : null,
|
||||||
... more "columnHeaders" entries
|
"columnDisplayType" : null,
|
||||||
],
|
"columnValues" : [ ]
|
||||||
"data": [
|
}, {
|
||||||
{
|
"columnName" : "report_category",
|
||||||
"row": [
|
"columnType" : "VARCHAR",
|
||||||
"29",
|
"columnLength" : null,
|
||||||
"Client Listing",
|
"columnDisplayType" : null,
|
||||||
"Table",
|
"columnValues" : [ ]
|
||||||
null,
|
}, {
|
||||||
null,
|
"columnName" : "parameter_id",
|
||||||
"5",
|
"columnType" : "INT",
|
||||||
null,
|
"columnLength" : null,
|
||||||
"selectOfficeId"
|
"columnDisplayType" : null,
|
||||||
]
|
"columnValues" : [ ]
|
||||||
},
|
}, {
|
||||||
{
|
"columnName" : "report_parameter_name",
|
||||||
"row": [
|
"columnType" : "VARCHAR",
|
||||||
"42",
|
"columnLength" : null,
|
||||||
"Client Listing - Additional and Unlikely",
|
"columnDisplayType" : null,
|
||||||
"Table",
|
"columnValues" : [ ]
|
||||||
null,
|
}, {
|
||||||
null,
|
"columnName" : "parameter_name",
|
||||||
"5",
|
"columnType" : "VARCHAR",
|
||||||
null,
|
"columnLength" : null,
|
||||||
"selectOfficeId"
|
"columnDisplayType" : null,
|
||||||
]
|
"columnValues" : [ ]
|
||||||
},
|
} ],
|
||||||
{
|
"data" : [ {
|
||||||
"row": [
|
"row" : [ "29", "Client Listing", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
"30",
|
}, {
|
||||||
"Client Loans Listing",
|
"row" : [ "42", "Client Listing - Additional and Unlikely", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
"Table",
|
}, {
|
||||||
null,
|
"row" : [ "30", "Client Loans Listing", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
null,
|
}, {
|
||||||
"5",
|
"row" : [ "43", "Client Loans Listing - Additional", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
null,
|
}, {
|
||||||
"selectOfficeId"
|
"row" : [ "41", "Clients by Surname (a bit silly)", "Chart", "Pie", null, "5", null, "selectOfficeId" ]
|
||||||
]
|
}, {
|
||||||
},
|
"row" : [ "39", "Loan Disbursals in Previous Year", "Chart", "Bar", null, "5", null, "selectOfficeId" ]
|
||||||
... more "Row" entries
|
}, {
|
||||||
]
|
"row" : [ "39", "Loan Disbursals in Previous Year", "Chart", "Bar", null, "7", null, "currencyIdSelectOne" ]
|
||||||
}</code>
|
}, {
|
||||||
|
"row" : [ "40", "Loan Repayments in Previous Year", "Chart", "Bar", null, "5", null, "selectOfficeId" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "40", "Loan Repayments in Previous Year", "Chart", "Bar", null, "7", null, "currencyIdSelectOne" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "34", "Loans - Active Loans Portfolio Status", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "34", "Loans - Active Loans Portfolio Status", "Table", null, null, "6", null, "currencyIdSelectAll" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "31", "Loans Awaiting Disbursal", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "35", "Portfolio at Risk", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "35", "Portfolio at Risk", "Table", null, null, "6", null, "currencyIdSelectAll" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "32", "Upcoming Repayments", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "32", "Upcoming Repayments", "Table", null, null, "6", null, "currencyIdSelectAll" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "38", "Upcoming Repayments Summary By Month, Currency and Loan Risk", "Table", null, null, "5", null, "selectOfficeId" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "38", "Upcoming Repayments Summary By Month, Currency and Loan Risk", "Table", null, null, "6", null, "currencyIdSelectAll" ]
|
||||||
|
} ]
|
||||||
|
}
|
||||||
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="report_run" name="report_run" class="old-syle-anchor"> </a>
|
<a id="report_run" name="report_run" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
@@ -2896,6 +2862,9 @@ Request Body:{
|
|||||||
<p>
|
<p>
|
||||||
Runs a report and returns the report output.
|
Runs a report and returns the report output.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Note: </b> Pentaho details yet to be provided
|
||||||
|
</p>
|
||||||
<h5>Arguments</h5>
|
<h5>Arguments</h5>
|
||||||
<dl class="argument-list">
|
<dl class="argument-list">
|
||||||
<dt>R_'parameter names' ...</dt>
|
<dt>R_'parameter names' ...</dt>
|
||||||
@@ -2907,63 +2876,90 @@ Request Body:{
|
|||||||
<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.</dd>
|
||||||
<dt>exportCSV</dt>
|
<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>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>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Example Request:
|
<p>Example Requests: </p>
|
||||||
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1">https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1</a>
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true">https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true</a>
|
||||||
</p>
|
<br><br>
|
||||||
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true&exportCSV=true">https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true&exportCSV=true</a>
|
||||||
|
<br><br>
|
||||||
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports/selectOfficeId?R_officeId=1&pretty=true¶meterType=true">https://localhost:8443/mifosng-provider/api/v1/reports/selectOfficeId?R_officeId=1&pretty=true& parameterType=true</a>
|
||||||
|
<br><br>
|
||||||
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports/selectOfficeId?R_officeId=1&pretty=true¶meterType=true&exportCSV=true">https://localhost:8443/mifosng-provider/api/v1/reports/selectOfficeId?R_officeId=1&pretty=true& parameterType=true&exportCSV=true</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://thedomainname/api/v1/reports/{reportName}</code>
|
<code class="method-declaration">GET https://thedomainname/api/v1/reports/{reportName}</code>
|
||||||
<code class="method-response">{
|
<code class="method-response">{
|
||||||
"columnHeaders": [
|
"columnHeaders" : [ {
|
||||||
{
|
"columnName" : "Office/Branch",
|
||||||
"columnName": "Office/Branch",
|
"columnType" : "VARCHAR",
|
||||||
"columnType": "VARCHAR",
|
"columnLength" : null,
|
||||||
"columnLength": null,
|
"columnDisplayType" : null,
|
||||||
"columnDisplayType": null,
|
"columnValues" : [ ]
|
||||||
"columnValues": []
|
}, {
|
||||||
},
|
"columnName" : "Name",
|
||||||
{
|
"columnType" : "VARCHAR",
|
||||||
"columnName": "Name",
|
"columnLength" : null,
|
||||||
"columnType": "VARCHAR",
|
"columnDisplayType" : null,
|
||||||
"columnLength": null,
|
"columnValues" : [ ]
|
||||||
"columnDisplayType": null,
|
}, {
|
||||||
"columnValues": []
|
"columnName" : "Joining Date",
|
||||||
},
|
"columnType" : "DATE",
|
||||||
{
|
"columnLength" : null,
|
||||||
"columnName": "Joining Date",
|
"columnDisplayType" : null,
|
||||||
"columnType": "DATE",
|
"columnValues" : [ ]
|
||||||
"columnLength": null,
|
} ],
|
||||||
"columnDisplayType": null,
|
"data" : [ {
|
||||||
"columnValues": []
|
"row" : [ "Demo MFI Head Office", "O'Meara, Patrick", "2009-01-04" ]
|
||||||
}
|
}, {
|
||||||
],
|
"row" : [ "Demo MFI Head Office", "O'Meara, Dennis", "2009-01-04" ]
|
||||||
"data": [
|
}, {
|
||||||
{
|
"row" : [ "Demo MFI Head Office", "Smith, John", "2009-01-11" ]
|
||||||
"row": [
|
}, {
|
||||||
"Demo MFI Head Office",
|
"row" : [ "Demo MFI Head Office", "O'Meara, Jimmy", "2009-01-11" ]
|
||||||
"O'Meara, Patrick",
|
}, {
|
||||||
"2009-01-04"
|
"row" : [ "Demo MFI Head Office", "Sunnyville vegetable growers Ltd", "2009-01-24" ]
|
||||||
]
|
}, {
|
||||||
},
|
"row" : [ "Demo MFI Head Office", "Traoré, Kalilou", "2009-02-04" ]
|
||||||
{
|
}, {
|
||||||
"row": [
|
"row" : [ "Demo MFI Head Office", "Koné, Sidi", "2009-02-11" ]
|
||||||
"Demo MFI Head Office",
|
}, {
|
||||||
"O'Meara, Dennis",
|
"row" : [ "Demo MFI Head Office", "Yattabaré, Moustapha", "2009-02-18" ]
|
||||||
"2009-01-04"
|
}, {
|
||||||
]
|
"row" : [ "Demo MFI Head Office", "Mali fruit sales ltd.", "2009-02-18" ]
|
||||||
},
|
}, {
|
||||||
{
|
"row" : [ "Demo MFI Head Office", "Djenne co-op group", "2009-02-25" ]
|
||||||
"row": [
|
}, {
|
||||||
"Demo MFI Head Office",
|
"row" : [ "Demo MFI Head Office", "test, test", "2012-04-19" ]
|
||||||
"Smith, John",
|
}, {
|
||||||
"2009-01-11"
|
"row" : [ "Demo MFI Head Office", "Ziffle, Fred", "2012-04-21" ]
|
||||||
]
|
}, {
|
||||||
},
|
"row" : [ "Demo MFI Head Office", "omara, safik", "2012-04-24" ]
|
||||||
... more "row" entries
|
}, {
|
||||||
]
|
"row" : [ "Demo MFI Head Office", "HF Test", "2012-04-24" ]
|
||||||
}</code>
|
}, {
|
||||||
|
"row" : [ "Demo MFI Head Office", "HF Test 2", "2012-04-24" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "Demo MFI Head Office", "Kumar, Shiva", "2011-10-01" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "Demo MFI Head Office", "Yton, Petra", "2006-06-09" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "Demo MFI Head Office", "Yton, Petra", "2006-06-09" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "sub branch 1", "Lee, Jacques", "2012-04-03" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "sub branch 1", "Asare-Frimpong, Patrick", "2012-04-18" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "sub branch 2", "t, test", "2012-04-18" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "Majmoua", "client, firstMajmoua", "2011-12-01" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "Intrasoft Technologies", "Said, Zayyad", "2012-04-02" ]
|
||||||
|
}, {
|
||||||
|
"row" : [ "Hugo technologies", "typical individual lending client", "2010-06-02" ]
|
||||||
|
} ]
|
||||||
|
}
|
||||||
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,17 @@ list clients notes - noteType needs a 'text'
|
|||||||
|
|
||||||
updating client note - ignores clientId anyhow! so is it really a notes resource?
|
updating client note - ignores clientId anyhow! so is it really a notes resource?
|
||||||
|
|
||||||
|
loan template
|
||||||
|
Formatted field still there
|
||||||
|
Type fields rename and with associated text?
|
||||||
|
allowedProduct should maybe just be id & name
|
||||||
|
which fields have defaults as not all on NewLoanWorkflowStepOneData dto seem to be default.
|
||||||
|
|
||||||
|
|
||||||
|
Additional Fields
|
||||||
|
put right message for parameter not recognized etc.(plus tht 9 other jpwwrongmsg items)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Identify Fields that need explaining
|
Identify Fields that need explaining
|
||||||
Clients
|
Clients
|
||||||
|
|||||||
+4
-18
@@ -369,22 +369,6 @@ public class ReadExtraDataAndReportingServiceImpl implements
|
|||||||
@Override
|
@Override
|
||||||
public GenericResultset retrieveExtraData(String type, String set, Long id) {
|
public GenericResultset retrieveExtraData(String type, String set, Long id) {
|
||||||
|
|
||||||
if (type == null) {
|
|
||||||
throw new PlatformDataIntegrityException(
|
|
||||||
"error.msg.additional.fields.type.null",
|
|
||||||
"JPWWRONGMSG - Additional Fields Type is null.");
|
|
||||||
}
|
|
||||||
if (set == null) {
|
|
||||||
throw new PlatformDataIntegrityException(
|
|
||||||
"error.msg.additional.fields.set.null",
|
|
||||||
"JPWWRONGMSG - Additional Fields Set is null.");
|
|
||||||
}
|
|
||||||
if (id == null) {
|
|
||||||
throw new PlatformDataIntegrityException(
|
|
||||||
"error.msg.additional.fields.id.null",
|
|
||||||
"JPWWRONGMSG - Additional Fields Id is null.");
|
|
||||||
}
|
|
||||||
|
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
GenericResultset result = fillExtraDataGenericResultSet(type, set, id);
|
GenericResultset result = fillExtraDataGenericResultSet(type, set, id);
|
||||||
long elapsed = System.currentTimeMillis() - startTime;
|
long elapsed = System.currentTimeMillis() - startTime;
|
||||||
@@ -428,12 +412,14 @@ public class ReadExtraDataAndReportingServiceImpl implements
|
|||||||
+ rsch.getColumnName() + "`";
|
+ rsch.getColumnName() + "`";
|
||||||
|
|
||||||
rsch.setColumnType(rsmd.getString("data_type"));
|
rsch.setColumnType(rsmd.getString("data_type"));
|
||||||
rsch.setColumnLength(rsmd.getInt("data_length"));
|
if (rsmd.getInt("data_length") > 0)
|
||||||
|
rsch.setColumnLength(rsmd.getInt("data_length"));
|
||||||
rsch.setColumnDisplayType(rsmd.getString("display_type"));
|
rsch.setColumnDisplayType(rsmd.getString("display_type"));
|
||||||
allowedListId = rsmd.getInt("allowed_list_id");
|
allowedListId = rsmd.getInt("allowed_list_id");
|
||||||
if (allowedListId > 0) {
|
if (allowedListId > 0) {
|
||||||
|
|
||||||
//logger.info("allowedListId != null: Column: " + rsch.getColumnName());
|
// logger.info("allowedListId != null: Column: " +
|
||||||
|
// rsch.getColumnName());
|
||||||
sql = "select v.`name` from stretchydata_allowed_value v where allowed_list_id = "
|
sql = "select v.`name` from stretchydata_allowed_value v where allowed_list_id = "
|
||||||
+ allowedListId + " order by id";
|
+ allowedListId + " order by id";
|
||||||
ResultSet rsValues = db_statement2.executeQuery(sql);
|
ResultSet rsValues = db_statement2.executeQuery(sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user