From d127003d6da5ad7a9ccbe3093941fbf97a6dbd19 Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Tue, 29 May 2012 02:08:03 +1000 Subject: [PATCH] api docs update --- APIFolder/api.htm | 224 +++++++++++--------------------- APIFolder/docUpdateComments.txt | 8 +- 2 files changed, 84 insertions(+), 148 deletions(-) diff --git a/APIFolder/api.htm b/APIFolder/api.htm index f4d583800..836c3e55f 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -393,30 +393,7 @@

Clients

-

Clients ...

-
-
- -
-
-
Attributes
-
-
- id -
-
- string jpw ipsum as an example of showing the (at least important) columns -
-
- amount -
-
blah -
-
blah
-
- card -
-
+

Clients are people and businesses that have applied (or may apply) to an MFI for loans.

@@ -424,46 +401,34 @@
GET https://thedomainname/api/v1/clients -{ - "clients": [ - { - "organisationId": 1, - "organisationName": "Demo MFI", - "officeId": 2, - "officeName": "sub branch 1", - "id": 14, - "firstname": "Patrick", - "lastname": "Asare-Frimpong", - "displayName": "Patrick Asare-Frimpong", - "externalId": null, - "joinedDate": "2012-04-18", - "allowedOffices": [], - "maxJoinedOnOffsetFromToday": -34 - }, - ... - ... - { - "organisationId": 1, - "organisationName": "Demo MFI", - "officeId": 1, - "officeName": "Demo MFI Head Office", - "id": 17, - "firstname": "Fred", - "lastname": "Ziffle", - "displayName": "Fred Ziffle", - "externalId": null, - "joinedDate": "2012-04-21", - "allowedOffices": [], - "maxJoinedOnOffsetFromToday": -31 - } - ] -} +[ { + "officeId" : 1, + "officeName" : "change super user", + "id" : 2, + "firstname" : "Dennis", + "lastname" : "O'Meara", + "displayName" : "Dennis O'Meara", + "externalId" : null, + "joinedDate" : [ 2009, 1, 4 ], + "maxJoinedOnOffsetFromToday" : -1241 +}, { + "officeId" : 1, + "officeName" : "change super user", + "id" : 4, + "firstname" : "Jimmy", + "lastname" : "O'Meara", + "displayName" : "Jimmy O'Meara", + "externalId" : null, + "joinedDate" : [ 2009, 1, 11 ], + "maxJoinedOnOffsetFromToday" : -1234 +}...]
@@ -479,46 +444,17 @@
  • Allowed Value Lists
  • -

    Example Request: - https://localhost:8443/mifosng-provider/api/v1/clients/template -

    +

    Example Request:

    + https://localhost:8443/mifosng-provider/api/v1/clients/template?pretty=true
    GET https://thedomainname/api/v1/clients/template { - "organisationId": 1, - "organisationName": null, - "officeId": 1, - "officeName": null, - "id": -1, - "firstname": "", - "lastname": "", - "displayName": "", - "externalId": null, - "joinedDate": "2012-05-22", - "allowedOffices": [ - { - "id": 1, - "name": "Demo MFI Head Office", - "externalId": "1", - "openingDate": "2009-01-01", - "hierarchy": ".", - "parentName": null, - "parentId": 0, - "allowedParents": [] - }, - { - "id": 2, - "name": "sub branch 1", - "externalId": "2", - "openingDate": "2012-01-02", - "hierarchy": ".2.", - "parentName": "Demo MFI Head Office", - "parentId": 1, - "allowedParents": [] - } - ], - "maxJoinedOnOffsetFromToday": 0 + "joinedDate" : [ 2012, 5, 29 ], + "allowedOffices" : [ { + "id" : 1, + "name" : "change super user" + } ] }
    @@ -529,27 +465,25 @@
    GET https://thedomainname/api/v1/clients/{clientId} { - "organisationId": 1, - "organisationName": "Demo MFI", - "officeId": 1, - "officeName": "Demo MFI Head Office", - "id": 1, - "firstname": "Patrick", - "lastname": "O'Meara", - "displayName": "Patrick O'Meara", - "externalId": null, - "joinedDate": "2009-01-04", - "allowedOffices": [], - "maxJoinedOnOffsetFromToday": -1234 + "officeId" : 1, + "officeName" : "change super user", + "id" : 1, + "firstname" : "Patrick", + "lastname" : "O'Meara", + "displayName" : "Patrick O'Meara", + "externalId" : null, + "joinedDate" : [ 2009, 1, 4 ], + "maxJoinedOnOffsetFromToday" : -1241 }
    @@ -2337,22 +2271,27 @@ Request Body: POST https://thedomainname/api/v1/loanproducts https://localhost:8443/mifosng-provider/api/v1/loanproducts Content-Type: application/json -Request Body: -{ - "name": "New kind of Loan", - "description": "A description not exceeding 500 characters.", - "currencyCode": "XOF", - "digitsAfterDecimal": 0, - "principal": 100000, - "inArrearsToleranceAmount": 1000, - "numberOfRepayments": 1, - "repaymentEvery": 1, - "repaymentFrequency": 2, - "amortizationMethod": 1, - "interestRatePerPeriod": 1.75, - "interestRateFrequencyMethod": 2, - "interestCalculationPeriodMethod": 1, - "interestMethod": 0 +Request Body:{ +"name": "Newish kind of Loan", +"description": "A description not exceeding 500 characters.", +"externalId": "1077", +"locale": "en-us", +"currencyCode": "XOF", +"digitsAfterDecimal": 0, +"principalFormatted": "100,000", +"inArrearsToleranceAmountFormatted": "1,000", + "repaymentEvery": 1, + "repaymentFrequency": 2, +"numberOfRepayments": 1, +"interestRatePerPeriodFormatted": "1.75", +"interestRateFrequencyMethod": 2, +"amortizationMethod": 1, +"interestMethod": 0 , +"interestCalculationPeriodMethod": 1 +} + +{ + "entityId": 9 }
    @@ -2368,21 +2307,12 @@ Request Body: https://localhost:8443/mifosng-provider/api/v1/loanproducts/1 Content-Type: application/json Request Body: -{ - "name": "New kind of Loan updated", - "description": "An updated description not exceeding 500 characters.", - "currencyCode": "XOF", - "digitsAfterDecimal": 0, - "principal": 100000, - "inArrearsToleranceAmount": 1000, - "numberOfRepayments": 1, - "repaymentEvery": 1, - "repaymentFrequency": 2, - "amortizationMethod": 1, - "interestRatePerPeriod": 1.75, - "interestRateFrequencyMethod": 2, - "interestCalculationPeriodMethod": 1, - "interestMethod": 0 +{ +"name": "Loan name - updated" +} + +{ + "entityId": 1 } @@ -3050,7 +2980,7 @@ No Request Body  
    -

    Create new user

    +

    Create a User

    Adds new application user.

    @@ -3080,7 +3010,7 @@ Request body:  
    -

    Update existing user

    +

    Update a User

    PUT https://thedomainname/api/v1/users/{userId) diff --git a/APIFolder/docUpdateComments.txt b/APIFolder/docUpdateComments.txt index dcfa3cb01..806138ff7 100644 --- a/APIFolder/docUpdateComments.txt +++ b/APIFolder/docUpdateComments.txt @@ -27,4 +27,10 @@ update: give hardtofigureout error msg when using equivalent to create parameter delete: does delete (I delete super1), no 200 ok returned, "org.springframework.dao.InvalidDataAccessApiUsageException: attempt to create merge event with null entity; " if delete a non-existant user Loan Product -List - interestRateCalculatedInPeriod is it usefult to show this field...also enums questionsor show only a few cos on loan template \ No newline at end of file +List - interestRateCalculatedInPeriod is it usefult to show this field...also enums questionsor show only a few cos on loan template +Create - get NullPointerException when creating using values in api doc (? about using principal or principal formatted or the right locale values) +Update - tried to update name (using api docs data) and got a NullPointerException + +Clients +List - can't get client other than from office 1 +template - only get office 1 in allowed offices \ No newline at end of file