Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ A Spring Boot plugin that extends [Apache Fineract](https://fineract.apache.org/
- [Deploy with Fineract (Docker)](#deploy-with-fineract-docker)
- [Deploy with Fineract (Tomcat)](#deploy-with-fineract-tomcat)
- [API Reference](#api-reference)
- [Tenant Management](#tenant-management)
- [Contributing](#contributing)
- [History](#history)
- [Important Notices](#important-notices)
Expand Down Expand Up @@ -143,7 +144,7 @@ Pre-built snapshots are published to JFrog Artifactory:

## API Reference

All endpoints live under `/v1/self/`. Here's a summary of the available resources:
Most endpoints live under `/v1/self/`. Here's a summary of the available resources:

| Base Path | Resource | Methods |
|---|---|---|
Expand All @@ -165,10 +166,32 @@ All endpoints live under `/v1/self/`. Here's a summary of the available resource
| `/v1/self/surveys` | Surveys (SPM) | `GET` |
| `/v1/self/surveys/scorecards` | Survey Scorecards | `GET`, `POST` |

### Administrative Endpoints

These are consumed by staff-facing clients such as the web app rather than by self-service users,
so they sit **outside** `/v1/self/`: that prefix is matched by the self-service security chain and
authenticates self-service users only. Outside it, ordinary platform credentials apply.

| Base Path | Resource | Methods |
|---|---|---|
| `/v1/branding` | Tenant Branding | `GET`, `PUT` |
| `/v1/admin/tenants` | Tenant Management (master users only) — see [TENANT_MANAGEMENT.md](TENANT_MANAGEMENT.md) | `GET`, `POST`, `PUT`, `DELETE` |

Full OpenAPI/Swagger documentation is available at runtime via the Fineract Swagger UI when the plugin is loaded.

A [Postman collection](postman/) is also included for hands-on API exploration.

## Tenant Management

The plugin can manage the tenants of the installation itself — create, update, activate, deactivate,
suspend and remove — with schema provisioning, an audit trail, and enforcement so a suspended tenant
actually stops being served.

Because this administers the platform itself rather than any one tenant, it runs in a separate
master context — master users with the `SUPER_MASTER` role — and is documented separately:

**→ [TENANT_MANAGEMENT.md](TENANT_MANAGEMENT.md)**

## Contributing

Interested in contributing? We'd love your help. See the **[Contributing Guide](CONTRIBUTING.md)** for everything you need — development setup, running tests, code style, and project structure.
Expand Down
280 changes: 280 additions & 0 deletions TENANT_MANAGEMENT.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
info:
name: 01. LIST TENANTS
type: http
seq: 1

http:
method: GET
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants?offset=0&limit=20
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
info:
name: 02. LIST TENANTS FILTERED
type: http
seq: 2

http:
method: GET
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants?search=acme&status=ACTIVE&offset=0&limit=20
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
info:
name: 03. GET TENANT TEMPLATE
type: http
seq: 3

http:
method: GET
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants/template
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
info:
name: 04. GET TENANT
type: http
seq: 4

http:
method: GET
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants/1
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
info:
name: 05. CREATE TENANT
type: http
seq: 5

http:
method: POST
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants
body:
type: json
data: |-
{
"identifier": "acme",
"name": "Acme Microfinance",
"timezoneId": "Asia/Kolkata",
"status": "ACTIVE",
"description": "Created through the tenant management API",
"contactEmail": "ops@acme.example.org",
"schemaName": "mifostenant_acme",
"schemaServer": "localhost",
"schemaServerPort": "5432",
"schemaUsername": "postgres",
"schemaPassword": "{{tenant_db_password}}",
"autoUpdate": true
}
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
info:
name: 06. UPDATE TENANT
type: http
seq: 6

http:
method: PUT
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants/1
body:
type: json
data: |-
{
"name": "Acme Microfinance Ltd",
"contactEmail": "newops@acme.example.org"
}
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
info:
name: 07. CHANGE TENANT STATUS
type: http
seq: 7

http:
method: POST
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants/1?command=suspend
body:
type: json
data: |-
{}
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
info:
name: 08. TEST TENANT CONNECTION
type: http
seq: 8

http:
method: POST
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants/test-connection
body:
type: json
data: |-
{
"schemaName": "mifostenant_acme",
"schemaServer": "localhost",
"schemaServerPort": "5432",
"schemaUsername": "postgres",
"schemaPassword": "{{tenant_db_password}}"
}
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
info:
name: 09. REMOVE TENANT
type: http
seq: 9

http:
method: DELETE
url: http://localhost:8080/fineract-provider/api/v1/admin/tenants/1
auth:
type: basic
username: "{{master_username}}"
password: "{{master_password}}"

settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
info:
name: TENANT MANAGEMENT
type: folder
seq: 11

request:
auth: inherit
Loading
Loading