...
Separate root URL for customer self service
New root resource url /mifosng-selfservice would be defined where all the self service APIs would be exposed.The resources exposed as part of this root would be similar to /mifosng-provider root. For eg, API to get list of loans in self-service would be /mifosng-selfserviceAll the APIs resources for customer self service would start with /mifosng-provider/api/v1/loansself.This would be achieved similar to the suggestion provided here http://stackoverflow.com/questions/10231854/multiple-jersey-applications-with-same-path-for-root-resource
Having separate root context for this API comes with lot of complications. It would require changes at tomcat deployment level.
Identifying self service user
...
Usecase | API |
---|---|
Authentication Basic HTTP | /mifosng-selfserviceprovider/api/v1/self/authentication?username={username}&password={password} |
Authentication Oauth2 | /mifosng-selfserviceprovider/api/self/oauth/token?username={username}&password={password}&client_id={clientId}&grant_type={grant_type}&client_secret={client_secret} |
/mifosng-selfserviceprovider/api/self/oauth/token?refresh_token={refresh_token}&client_id={clientId}&grant_type={grant_type}&client_secret={client_secret} | |
/mifosng-selfserviceprovider/api/v1/self/userdetails?access_token={access_token} | |
List Clients | /mifosng-selfserviceprovider/api/v1/self/clients |
Retrieve a Client | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId} |
Retrieve client accounts overview | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/accounts |
Get client image | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/images |
List client charges | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/charges |
Retrieve a client charge | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/charges/{clientChargeId} |
List client transactions | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/transactions |
Retrieve a client transaction | /mifosng-selfserviceprovider/api/v1/self/clients/{clientId}/transaction/{transactionId} |
Retrieve a Savings Account | /mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId} |
List Savings account transactions | /mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/transactions |
Retrieve a savings account transaction | /mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/transactions/{transactionId} |
List Savings account charges | /mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/charges |
Retrieve a savings account charge | /mifosng-selfserviceprovider/api/v1/self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} |
Retrieve a Loan | /mifosng-selfserviceprovider/api/v1/self/loans/{loanId} |
List loan account transactions | /mifosng-selfserviceprovider/api/v1/self/loans/{loanId}/transactions |
Retrieve loan account transaction | /mifosng-selfserviceprovider/api/v1/self/loans/{loanId}/transactions/{transactionId} |
List loan account charges | /mifosng-selfserviceprovider/api/v1/self/loans/{loanId}/charges |
Retrieve a loan account charge | /mifosng-selfservice/api/v1/loans/{loanId}/charges/{chargeId} |
...