Manage tenants¶
Full lifecycle for multi-tenant deployments: create, configure, suspend, and delete tenants.
Create a tenant¶
This creates a tenant with:
- A unique slug (
acme) - A display name
- An optional Label Studio organisation ID for review routing
- A named graph prefix (
http://riverbank.example/graph/acme/)
List tenants¶
Activate RLS¶
Before tenants are isolated at the database level:
This enables Row-Level Security policies on all _riverbank catalog tables. Safe to call multiple times (idempotent).
Ingest per-tenant data¶
Set the tenant context:
All sources, fragments, and runs are tagged with tenant_id = 'acme'.
Suspend a tenant¶
Suspended tenants cannot run queries or ingestion. Their data remains intact.
Delete a tenant¶
Soft-delete (data preserved):
GDPR erasure (all data destroyed):
Danger
--gdpr is irreversible. It cascades through the provenance graph and deletes all sources, fragments, runs, compiled triples, and audit log entries belonging to the tenant.
Verify isolation¶
Query as the tenant and confirm you only see tenant-scoped data:
Switch to another tenant — different count: