HTTP routes and handlers for tenant management.
Provides REST API endpoints for:
All routes require the global admin role (BOU-568).
HTTP routes and handlers for tenant management. Provides REST API endpoints for: - Tenant CRUD operations (list, get, create, update, delete) - Tenant provisioning (schema creation, data seeding) - Tenant activation/suspension All routes require the global admin role (BOU-568).
(activate-tenant-handler tenant-service)Activate suspended tenant.
Activate suspended tenant.
(create-tenant-handler tenant-service)Create new tenant.
Request body:
Create new tenant. Request body: - name: Tenant display name (required) - slug: Tenant slug for URLs (required, unique) - status: Initial status (:active or :suspended, default :active)
(delete-tenant-handler tenant-service)Delete tenant (soft delete).
This marks the tenant as deleted but preserves data for audit purposes.
Delete tenant (soft delete). This marks the tenant as deleted but preserves data for audit purposes.
(get-tenant-handler tenant-service)Get tenant by ID.
Get tenant by ID.
(list-tenants-handler tenant-service)List tenants, newest first, as a JSON array like the membership list.
Query params:
List tenants, newest first, as a JSON array like the membership list. Query params: - limit: Number of results (default 20, max 100) - offset: Pagination offset (default 0) - status: Filter by status (active, suspended) - search: Match against name or slug
(provision-tenant-handler tenant-service db-context)Provision tenant database schema.
Creates the tenant's PostgreSQL schema and its tables. Idempotent. Any other database answers 501.
Provision tenant database schema. Creates the tenant's PostgreSQL schema and its tables. Idempotent. Any other database answers 501.
(suspend-tenant-handler tenant-service)Suspend tenant (prevents login and access).
Suspend tenant (prevents login and access).
(tenant-routes tenant-service db-context _config)This module's contribution to the route table: Reitit route data under :api, at paths relative to /api/v1. Every route requires the admin role.
This module's contribution to the route table: Reitit route data under :api, at paths relative to /api/v1. Every route requires the admin role.
(update-tenant-handler tenant-service)Update a tenant's name or status.
The slug names the tenant's schema, so it cannot change; sending the current one is accepted.
Update a tenant's name or status. The slug names the tenant's schema, so it cannot change; sending the current one is accepted.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |