v11

latestOpenAPI 3.1.0raw.githubusercontent.com2026-03-051387180.3 KB
tenants

Import tenants from warehouse table

Import tenants from a warehouse table using upsert semantics.

Creates new tenants and updates existing ones with new name/groups. Groups are added additively (not replaced).

Streams data from the warehouse in batches to handle large datasets without loading everything into memory.

For tenants with groups, groups are aggregated per tenant key and auto-created if they don't exist.

RLS: Filtered to current client (ClientRLSDB).

Raises: ConnectionNotFoundError: If the connection doesn't exist (404) TenantCreationNotAllowedError: If tenancy type is NONE (400)

post/api/v1/tenants/import/warehouse

Query parameters

sourcestring nullable

Headers

X-Kater-CLI-IDstring nullable

Request body

attribute_columnsobject nullable

Mapping of attribute names to warehouse column names for attribute import

connection_idstring uuid required

Warehouse connection ID to query

databasestring required

Database name containing the tenant table

schemastring required

Schema name containing the tenant table

tablestring required

Table name containing tenant data

tenant_group_columnstring nullable

Column name for tenant group (optional)

tenant_key_columnstring required

Column name for tenant key

tenant_name_columnstring nullable

Column name for tenant display name (optional)

Response

Successful Response

groups_createdstring[]

Groups that were auto-created

total_foundinteger required

Unique tenant keys found in source

total_importedinteger required

New tenants created

total_updatedinteger required

Existing tenants updated