Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/v1/admin/rls
Check RLS status on all tenant-scoped tables. Returns which tables have RLS enabled, forced, and which have thetenant_isolation policy.
Response
Summary Fields
| Field | Type | Description |
|---|---|---|
totalTables | integer | Total number of tenant-scoped tables |
rlsEnabled | integer | Tables with RLS enabled |
rlsForced | integer | Tables with FORCE RLS (applies even to table owners) |
withPolicy | integer | Tables with the tenant_isolation policy |
missingRLS | string[] | Table names missing RLS or the isolation policy |
Roles
admin onlyPOST /api/v1/admin/rls
Enable RLS on all tenant-scoped tables. This is idempotent and safe to call multiple times. For each table, it:- Enables RLS (
ALTER TABLE ... ENABLE ROW LEVEL SECURITY) - Forces RLS for table owners (
ALTER TABLE ... FORCE ROW LEVEL SECURITY) - Creates a
tenant_isolationpolicy (CREATE POLICY ... USING ("tenantId" = current_setting('app.tenant_id')))
Response
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | true if no tables failed |
enabled | string[] | Tables where RLS was successfully enabled |
failed | string[] | Tables where RLS enablement failed |
totalTables | integer | Total number of tenant-scoped tables |