diff --git a/APIFolder/api.htm b/APIFolder/api.htm index a4ac3b228..361084388 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -137,7 +137,11 @@
An API capability to support user administration.
+Returns all users.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/users +
+GET https://thedomainname/api/v1/users
+GET https://localhost:8443/mifosng-provider/api/v1/users
+
+{
+ "users": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "mifos",
+ "firstname": "App hello",
+ "lastname": "Administrator",
+ "email": "demomfi@mifos.org",
+ "allowedOffices": [],
+ "availableRoles": [],
+ "selectedRoles": []
+ },
+ {
+ "id": 2,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "super1",
+ "firstname": "super",
+ "lastname": "user",
+ "email": "fake@email.com",
+ "allowedOffices": [],
+ "availableRoles": [],
+ "selectedRoles": []
+ }
+ ]
+}
+
+ Returns details for new user screen
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/users/template +
+GET https://thedomainname/api/v1/users/template
+GET https://localhost:8443/mifosng-provider/api/v1/users/template
+
+{
+ "id": null,
+ "orgId": null,
+ "officeId": null,
+ "officeName": null,
+ "username": null,
+ "firstname": null,
+ "lastname": null,
+ "email": null,
+ "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": []
+ }
+ ],
+ "availableRoles": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "Super user",
+ "description": "This role provides all application permissions.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Field officer",
+ "description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ }
+ ],
+ "selectedRoles": []
+}
+
+ Returns details for existing application user
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/users/1 +
+GET https://thedomainname/api/v1/users/1
+GET https://localhost:8443/mifosng-provider/api/v1/users/1
+
+{
+ "id": 1,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "mifos",
+ "firstname": "App hello",
+ "lastname": "Administrator",
+ "email": "demomfi@mifos.org",
+ "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": []
+ }
+ ],
+ "availableRoles": [
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Field officer",
+ "description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ }
+ ],
+ "selectedRoles": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "Super user",
+ "description": "This role provides all application permissions.",
+ "availablePermissions": [],
+ "selectedPermissions": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "User administration ALL",
+ "description": "An application user will have permission to execute all tasks related to user administration.",
+ "code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
+ "groupType": 1
+ },
+ {
+ "id": 4,
+ "orgId": 1,
+ "name": "Reporting ALL",
+ "description": "An application user will have permission to execute and view all reports.",
+ "code": "REPORTING_SUPER_USER_ROLE",
+ "groupType": 4
+ },
+ {
+ "id": 3,
+ "orgId": 1,
+ "name": "Portfolio management ALL",
+ "description": "An application user will have permission to execute all tasks related to portfolio management.",
+ "code": "PORTFOLIO_MANAGEMENT_SUPER_USER_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Organisation adminsitration ALL",
+ "description": "An application user will have permission to execute all tasks related to organisation administration.",
+ "code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
+ "groupType": 2
+ }
+ ]
+ }
+ ]
+}
+
+