How To - REST API

A new module added for REST API in Release 2.2.x

Configuration

REST Services will be enabled by default.

Based on Spring 3.0 MVC it required minimal configuration. REST APIs are secure and uses Mifos existing authentication scheme including roles and permissions.

REST API implementation just simply uses existing services (ServiceFacade) to generate a JSON object to be send over the wire.

Using REST API - Client

The client would have to login before using REST API, it will be same ask user authentication and then client would have to maintain the Cookie data to be able to maintain session for the communication.

Spring RestTemplate based on Apache HTTPClient can be used for building a Java client.

Python cookielib can be used for maintaining Cookie for the session.  Example script https://github.com/mifos/head/blob/master/rest/scripts/mifos-rest.py

Similarly almost all the language would have already an existing library for this purpose and you can recommend one that can be listed here.

There is a youtube video which shows the use of python client http://www.youtube.com/watch?v=bY0BAPZEZEk

Testing

As REST API uses existing service facades it only need functional testing which is done by acceptance tests (see RESTAPITest.java)

API Documentation

REST API Reference