diff --git a/APIFolder/api.htm b/APIFolder/api.htm index de361a236..16a11f812 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -140,19 +140,24 @@
- The Mifox X API is organized around + The Mifos X API is organized around REST. Our API is designed to have predictable, resource-oriented URLs, to use HTTP response codes to indicate API errors, and @@ -2576,11 +2581,286 @@ Request body:
Delete reference to application user on platform.
+DELETE https://thedomainname/api/v1/users/11
+DELETE https://localhost:8443/mifosng-provider/api/v1/users/11
+Content-Type: application/json
+
+
+{
+ "entityId": 11
+}
+
+ An API capability to support management of application roles for user administration.
+Returns all roles.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/roles +
+GET https://thedomainname/api/v1/roles
+GET https://localhost:8443/mifosng-provider/api/v1/roles
+
+{
+ "roles": [
+ {
+ "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": []
+ },
+ {
+ "id": 3,
+ "orgId": 1,
+ "name": "Data Entry (Portfolio only)",
+ "description": "This role allows a user full permissions around client and loan functionality but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 4,
+ "orgId": 1,
+ "name": "Credit Committe Member",
+ "description": "This role allows a user to approve reject or withdraw loans (with reporting).",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 5,
+ "orgId": 1,
+ "name": "Manager",
+ "description": "This role allows a manager to do anything related to portfolio management and also view all reports.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 6,
+ "orgId": 1,
+ "name": "new role test",
+ "description": "test new role description...",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 7,
+ "orgId": 1,
+ "name": "new",
+ "description": "test",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ }
+ ]
+}
+
+ Returns details for new role screen
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/roles/template +
+GET https://thedomainname/api/v1/roles/template
+GET https://localhost:8443/mifosng-provider/api/v1/roles/template
+
+{
+ "id": null,
+ "orgId": null,
+ "name": null,
+ "description": null,
+ "availablePermissions": [
+ {
+ "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": 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
+ },
+ ...
+ ...
+ {
+ "id": 20,
+ "orgId": 1,
+ "name": "Can add a new client.",
+ "description": "Allows an application user to add a new client.",
+ "code": "CAN_ENROLL_NEW_CLIENT_ROLE",
+ "groupType": 3
+ }
+ ],
+ "selectedPermissions": []
+}
+
+ Returns details for existing application role
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/roles/1 +
+GET https://thedomainname/api/v1/roles/1
+GET https://localhost:8443/mifosng-provider/api/v1/roles/1
+
+{
+ "id": 1,
+ "orgId": 1,
+ "name": "Super user",
+ "description": "This role provides all application permissions.",
+ "availablePermissions": [
+ {
+ "id": 5,
+ "orgId": 1,
+ "name": "Can submit new loan application",
+ "description": "Allows an application user to sumit new loan application.",
+ "code": "CAN_SUBMIT_NEW_LOAN_APPLICATION_ROLE",
+ "groupType": 3
+ },
+ ...
+ ...
+ {
+ "id": 19,
+ "orgId": 1,
+ "name": "Can enter a repayment against a loan in the past",
+ "description": "Allows an application user to enter a repayment on the loan where the repayment date is in the past.",
+ "code": "CAN_MAKE_LOAN_REPAYMENT_IN_THE_PAST_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 20,
+ "orgId": 1,
+ "name": "Can add a new client.",
+ "description": "Allows an application user to add a new client.",
+ "code": "CAN_ENROLL_NEW_CLIENT_ROLE",
+ "groupType": 3
+ }
+ ],
+ "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": 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
+ }
+ ]
+}
+
+ Adds new application role to the platform.
+POST https://thedomainname/api/v1/roles
+POST https://localhost:8443/mifosng-provider/api/v1/roles
+Content-Type: application/json
+Request body:
+{
+ "name": "Some role name",
+ "description": "A description outlining the purpose of this role in relation to the application.",
+ "selectedItems": ["1", "2", "3"]
+}
+
+{
+ "entityId": 8
+}
+
+ Update details of an existing application role.
+PUT https://thedomainname/api/v1/roles/8
+PUT https://localhost:8443/mifosng-provider/api/v1/roles/8
+Content-Type: application/json
+Request body:
+{
+ "name": "Some role name update",
+ "description": "A description outlining the purpose of this role in relation to the application. [updated]",
+ "selectedItems": ["1", "2", "3", "4", "5"]
+}
+
+{
+ "entityId": 8
+}
+
+