fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] nikpawar89 commented on a change in pull request #1051: gsim_glim_documentation
Date Sat, 13 Jun 2020 15:21:59 GMT

nikpawar89 commented on a change in pull request #1051:
URL: https://github.com/apache/fineract/pull/1051#discussion_r439746770



##########
File path: fineract-provider/src/main/resources/static/api-docs/apiLive.htm
##########
@@ -9438,170 +9585,1409 @@ <h4>Retrieve Group accounts overview</h4>
     }
    ]
 }
-					</code>
-				</div>
-			</div>
-<!--End of Group account summary -->
+					</code>
+				</div>
+			</div>
+<!--End of Group account summary -->
+
+			<a id="groups_update" name="groups_update" class="old-syle-anchor">&nbsp;</a>
+			<div class="method-section">
+				<div class="method-description">
+					<h4>Update a Group</h4>
+				</div>
+				<div class="method-example">
+					<code class="method-declaration">
+PUT https://DomainName/fineract-provider/api/v1/groups/{groupid}
+						</code>
+					<code class="method-request">
+PUT groups/1
+Content-Type: application/json
+Request Body:
+{
+	"name": "First Group (changed)"
+}
+					</code>
+					<code class="method-response">
+{
+  "officeId": 1,
+  "groupId": 1,
+  "resourceId": 1,
+  "changes": {
+    "name": "First Group (changed)"
+  }
+}
+					</code>
+				</div>
+			</div>
+
+			<a id="groups_delete" name="groups_delete" class="old-syle-anchor">&nbsp;</a>
+			<div class="method-section">
+				<div class="method-description">
+					<h4>Delete a Group</h4>
+					<p>A group can be deleted if it is in <i>pending</i> state and has
no associations - clients, loans or savings</p>
+				</div>
+				<div class="method-example">
+					<code class="method-declaration">
+POST https://DomainName/fineract-provider/api/v1/groups/{groupid}
+						</code>
+					<code class="method-request">
+DELETE groups/2
+					</code>
+					<code class="method-response">
+{
+  "officeId": 1,
+  "groupId": 2,
+  "resourceId": 2
+}
+					</code>
+				</div>
+			</div>
+
+			<a id="groups_list" name="groups_list" class="old-syle-anchor">&nbsp;</a>
+			<div class="method-section">
+				<div class="method-description">
+					<h4>List Groups</h4>
+					<p>The default implementation of <i>listing Groups</i> returns 200
entries with support for <b>pagination</b> and <b>sorting</b>. Using
the parameter <b>limit</b> with value <b>-1</b> returns all entries.</p>
+					<h5>Optional Arguments</h5>
+					<dl class="argument-list">
+						<dt>paged</dt>
+						<dd>
+							Boolean <span>optional</span>, defaults to false
+						</dd>
+						<dd>If paged is <span>true</span> then results will be paginated.</dd>
+						<dt>offset</dt>
+						<dd>
+							Integer <span>optional</span>, defaults to 0
+						</dd>
+						<dd>Indicates from what result to start from.</dd>
+
+						<dt>limit</dt>
+						<dd>
+							Integer <span>optional</span>, defaults to 200
+						</dd>
+						<dd>Restricts the size of results returned. To override the default and return
all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0,
or limit=-1</dd>
+
+						<dt>orderBy</dt>
+						<dd>
+							String <span>optional</span>, one of <span>displayName, accountNo,
officeId, officeName</span>
+						</dd>
+						<dd>Orders the results by the field indicated.</dd>
+
+						<dt>sortBy</dt>
+						<dd>
+							String <span>optional</span>, one of <span>ASC, DESC</span>
+						</dd>
+						<dd>Indicates what way to order results if <i>orderBy</i> is used.</dd>
+
+						<dt>officeId</dt>
+						<dd>
+							Integer <span>optional</span>
+						</dd>
+						<dd>Provides ability to restrict list of groups returned based on the office
there associated with.</dd>
+						<dt>underHierarchy</dt>
+						<dd>
+							String <span>optional</span>
+						</dd>
+						<dd>Use the office hierarchy string to return all groups under a given hierarchy.</dd>
+
+						<dt>name</dt>
+						<dd>
+							String <span>optional</span>
+						</dd>
+						<dd>Use name of groups to restrict results.</dd>
+
+						<dt>externalId</dt>
+						<dd>
+							String <span>optional</span>
+						</dd>
+						<dd>Use externalId of groups to restrict results.</dd>
+
+						<dt>sqlSearch</dt>
+						<dd>
+							String <span>optional</span>
+						</dd>
+						<dd>Use an sql fragment valid for the underlying group schema to filter results.
e.g. display_name like %K%</dd>
+						<dt>orphansOnly</dt>
+						<dd>
+							Boolean <span>optional</span>, defaults to false
+						</dd>
+						<dd>Use orphansOnly as true to list groups which are not associated to any center/parent.</dd>
+					</dl>
+					<p>Example Requests:</p>
+					<div class=apiClick>groups</div>
+					<br>
+					<div class=apiClick>groups?fields=name,officeName,joinedDate</div>
+					<br>
+					<div class=apiClick>groups?offset=10&limit=50</div>
+					<br>
+					<div class=apiClick>groups?orderBy=name&sortOrder=DESC</div>
+				</div>
+				<div class="method-example">
+					<code class="method-declaration">
+GET https://DomainName/fineract-provider/api/v1/groups?paged=true
+					</code>
+					<code class="method-response">
+{
+  "totalFilteredRecords": 2,
+  "pageItems": [
+    {
+      "id": 4,
+      "name": "AnotherGroup",
+      "status": {
+        "id": 100,
+        "code": "clientStatusType.pending",
+        "value": "Pending"
+      },
+      "active": false,
+      "officeId": 1,
+      "officeName": "Head Office",
+      "hierarchy": ".4."
+    }
+  ]
+}
+					</code>
+				</div>
+			</div>
+			<!-- end of group api docs -->
+
+            <!--Getting GSIM: -->
+            <a id="gsim_list" name="gsim_list" class="old-syle-anchor">&nbsp;</a>
+            <div class="method-section">
+                <div class="method-description">
+                    <h4>Retrieve a GSIM Application</h4>
+                    <p>Associations: String optional
+                        One of, or comma separated of GSIM Applications or all for all associations
+                    </p>
+
+                </div>
+                <div class="method-example">
+                    <code class="method-declaration">
+GET  https://DomainName/fineract-provider/api/v1/groups/{groupId}/gsimaccounts
+                    </code>
+
+
+                    <code class="method-response">
+[{

Review comment:
       check the formatting of other apis and align it accordingly. 
   you may also use this tool for formatting the JSON body:
   https://jsonformatter.curiousconcept.com/




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message