This document defines the schemas used for tenant management endpoints in the ConfidentialMind Manager API.
UserTenantsResponse
Response for GET /tenants. Returns the list of tenants the authenticated user is a member of, along with any pending invites.
Properties
| Property | Type | Description |
|---|
| tenants | Tenant[] | List of tenants the user belongs to |
| pendingInvites | PendingInvite[] | List of pending invites for the user |
Tenant Object
| Property | Type | Description |
|---|
| id | string | Unique identifier for the tenant (group ID) |
| name | string | Human-readable name of the tenant |
| path | string | API path for the tenant |
| isAdmin | boolean | Whether the user has admin permissions for this tenant |
| scopes | string[] | List of scopes/permissions the user has in this tenant |
| restrictCustomDeployments | boolean | Whether custom deployments are restricted in this tenant |
PendingInvite Object
| Property | Type | Description |
|---|
| inviteId | string | Unique identifier for the invite |
| tenantId | string | ID of the tenant the user is invited to |
| tenantName | string | Name of the tenant |
| email | string | Email address the invite was sent to |
| expiry | string | Expiration timestamp of the invite |
| status | string | Status of the invite (e.g., "pending") |
Example
{
"tenants": [
{
"id": "tenant-123",
"name": "engineering",
"path": "/tenants/engineering",
"isAdmin": true,
"scopes": ["admin", "view"],
"restrictCustomDeployments": false
}
],
"pendingInvites": [
{
"inviteId": "inv-456",
"tenantId": "tenant-789",
"tenantName": "marketing",
"expiry": "2023-12-31T23:59:59Z",
"status": "pending"
}
]
}
CreateTenantRequest
Request body for POST /tenant.
Properties
| Property | Type | Description |
|---|
| name | string | Name of the new tenant (alphanumeric and underscores only) |
Example
{
"name": "new_project_team"
}
CreateTenantResponse
Response for POST /tenant.
Properties
| Property | Type | Description |
|---|
| tenant | object | The created tenant object (Keycloak group representation) |
| resourceId | string | The ID of the created tenant resource |
Example
{
"tenant": {
"id": "tenant-new-123",
"name": "new_project_team",
"path": "/tenants/new_project_team"
},
"resourceId": "tenant-new-123"
}
TenantInfoResponse
Response for GET /tenants/admin. Provides detailed information about all tenants for system administrators.
Properties
| Property | Type | Description |
|---|
| tenants | TenantInfo[] | List of detailed tenant information |
| uniqueUsers | number | Total count of unique users across all tenants |
TenantInfo Object
| Property | Type | Description |
|---|
| id | string | Unique identifier for the tenant |
| name | string | Name of the tenant |
| userCount | number | Number of users in the tenant |
| serviceCount | number | Number of services deployed in the tenant |
| subgroupCount | number | Number of subgroups within the tenant |
| isPersonal | boolean | Whether this is a personal tenant |
| useDefaultLimits | boolean | Whether the tenant uses default system limits |
| restrictCustomDeployments | boolean | Whether custom deployments are restricted |
Example
{
"tenants": [
{
"id": "tenant-abc",
"name": "data-science",
"userCount": 5,
"serviceCount": 3,
"subgroupCount": 1,
"isPersonal": false,
"useDefaultLimits": true,
"restrictCustomDeployments": false
}
],
"uniqueUsers": 12
}
Response for GET /tenants/admin/users. Lists all users in the platform with their tenant memberships.
Properties
| Property | Type | Description |
|---|
| users | PlatformUser[] | List of platform users |
| Property | Type | Description |
|---|
| id | string | User ID |
| username | string | Username |
| email | string | User email address |
| isTenantAdmin | boolean | Whether the user has global tenant admin permissions |
| tenants | UserTenantMembership[] | List of tenants the user belongs to |
UserTenantMembership Object
| Property | Type | Description |
|---|
| id | string | Tenant ID |
| name | string | Tenant name |
| isAdmin | boolean | Whether the user is an admin of this tenant |
Example
{
"users": [
{
"id": "user-1",
"username": "alice",
"isTenantAdmin": true,
"tenants": [
{
"id": "tenant-abc",
"name": "data-science",
"isAdmin": true
}
]
}
]
}
TenantSubgroupsResponse
Response for GET /tenants/{tenantId}/subgroups.
Properties
| Property | Type | Description |
|---|
| subgroups | Subgroup[] | List of subgroups in the tenant |
Subgroup Object
| Property | Type | Description |
|---|
| id | string | Subgroup ID |
| name | string | Subgroup name |
| path | string | API path for the subgroup |
| memberCount | number | Number of members in the subgroup |
| userScopes | string[] | Scopes granted to members of this subgroup |
Example
{
"subgroups": [
{
"id": "sub-1",
"name": "admins",
"path": "/tenants/data-science/admins",
"memberCount": 2,
"userScopes": ["admin"]
}
]
}
CreateTenantSubgroupRequest
Request body for POST /tenants/{tenantId}/subgroups.
Properties
| Property | Type | Description |
|---|
| subgroupName | string | Name of the subgroup to create |
Example
{
"subgroupName": "viewers"
}
CreateTenantSubgroupResponse
Response for POST /tenants/{tenantId}/subgroups.
Properties
| Property | Type | Description |
|---|
| subgroup | Subgroup | The created subgroup object |
Example
{
"subgroup": {
"id": "sub-2",
"name": "viewers",
"path": "/tenants/data-science/viewers",
"memberCount": 0,
"userScopes": ["view"]
}
}
TenantUsersResponse
Response for GET /tenants/{tenantId}/users.
Properties
| Property | Type | Description |
|---|
| users | TenantUser[] | List of users in the tenant |
TenantUser Object
| Property | Type | Description |
|---|
| id | string | User ID |
| username | string | Username |
| email | string | User email |
| groups | string[] | List of subgroups the user belongs to within the tenant |
Example
{
"users": [
{
"id": "user-2",
"username": "bob",
"groups": ["admins"]
}
]
}
TenantLimitsResponse
Response for GET /tenants/{tenantId}/limits.
Properties
| Property | Type | Description |
|---|
| type | ServiceType | The type of service limit |
| limit | number | The numeric limit value |
| tenant_id | string | The ID of the tenant the limit applies to |
Example
[
{
"type": "api",
"limit": 10,
"tenant_id": "tenant-abc"
}
]
UpdateTenantLimitsRequest
Request body for POST /tenants/{tenantId}/limits.
Properties
| Property | Type | Description |
|---|
| limits | TenantLimit[] | List of limits to update |
| useDefaultLimits | boolean | (Optional) Whether to revert to default system limits |
TenantLimit Object
| Property | Type | Description |
|---|
| type | ServiceType | The type of service limit to set |
| limit | number | The new limit value |
Example
{
"limits": [
{
"type": "model",
"limit": 5
}
],
"useDefaultLimits": false
}
UpdateTenantRestrictionsRequest
Request body for PATCH /tenants/{tenantId}/restrictions.
Properties
| Property | Type | Description |
|---|
| restrictCustomDeployments | boolean | Whether to restrict custom deployments for this tenant |
Example
{
"restrictCustomDeployments": true
}
UpdateTenantRestrictionsResponse
Response for PATCH /tenants/{tenantId}/restrictions.
Properties
| Property | Type | Description |
|---|
| success | boolean | Whether the update was successful |
| message | string | Status message |
| restrict_custom_deployments | boolean | The updated restriction value |
Example
{
"success": true,
"message": "Tenant restrictions updated successfully",
"restrict_custom_deployments": true
}
TenantInvitesResponse
Response for GET /tenants/{tenantId}/invites.
Properties
| Property | Type | Description |
|---|
| invites | Invite[] | List of invites |
| pagination | Pagination | Pagination details |
| filters | Filters | Applied filters |
Invite Object
| Property | Type | Description |
|---|
| inviteId | string | Unique invite ID |
| tenantId | string | Tenant ID |
| tenantName | string | Tenant name |
| email | string | Invited email |
| status | string | Status (e.g., "pending", "accepted") |
| expiry | string | Expiration timestamp |
| createdAt | string | Creation timestamp |
Example
{
"invites": [
{
"inviteId": "inv-1",
"tenantId": "tenant-abc",
"tenantName": "data-science",
"status": "pending",
"expiry": "2023-12-31T23:59:59Z",
"createdAt": "2023-12-01T10:00:00Z"
}
],
"pagination": {
"hasMore": false,
"nextTimestamp": 0,
"limit": 50
},
"filters": {
"pendingOnly": true
}
}
CreateTenantInviteRequest
Request body for POST /tenants/{tenantId}/invites.
Properties
| Property | Type | Description |
|---|
| email | string | Email address to invite |
Example
CreateTenantInviteResponse
Response for POST /tenants/{tenantId}/invites.
Properties
| Property | Type | Description |
|---|
| success | boolean | Whether the invite was created successfully |
| message | string | Status message |
| inviteId | string | The ID of the created invite |
| userId | string | The ID of the user (if they already exist) |
Example
{
"success": true,
"message": "Invite created successfully",
"inviteId": "inv-2",
"userId": "user-3"
}
Request body for POST /invites/{email}.
Properties
| Property | Type | Description |
|---|
| tenantIds | string[] | (Optional) List of tenant IDs to add the user to upon acceptance |
Example
{
"tenantIds": ["tenant-abc", "tenant-xyz"]
}
Response for POST /invites/{email}.
Properties
| Property | Type | Description |
|---|
| success | boolean | Whether the invite was created successfully |
| message | string | Status message |
| userId | string | The ID of the user (if they already exist) |
Example
{
"success": true,
"message": "Platform invite sent",
"userId": "user-4"
}