Skip to main content

Tenant Schemas

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

PropertyTypeDescription
tenantsTenant[]List of tenants the user belongs to
pendingInvitesPendingInvite[]List of pending invites for the user

Tenant Object

PropertyTypeDescription
idstringUnique identifier for the tenant (group ID)
namestringHuman-readable name of the tenant
pathstringAPI path for the tenant
isAdminbooleanWhether the user has admin permissions for this tenant
scopesstring[]List of scopes/permissions the user has in this tenant
restrictCustomDeploymentsbooleanWhether custom deployments are restricted in this tenant

PendingInvite Object

PropertyTypeDescription
inviteIdstringUnique identifier for the invite
tenantIdstringID of the tenant the user is invited to
tenantNamestringName of the tenant
emailstringEmail address the invite was sent to
expirystringExpiration timestamp of the invite
statusstringStatus 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",
"email": "[email protected]",
"expiry": "2023-12-31T23:59:59Z",
"status": "pending"
}
]
}

CreateTenantRequest

Request body for POST /tenant.

Properties

PropertyTypeDescription
namestringName of the new tenant (alphanumeric and underscores only)

Example

{
"name": "new_project_team"
}

CreateTenantResponse

Response for POST /tenant.

Properties

PropertyTypeDescription
tenantobjectThe created tenant object (Keycloak group representation)
resourceIdstringThe 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

PropertyTypeDescription
tenantsTenantInfo[]List of detailed tenant information
uniqueUsersnumberTotal count of unique users across all tenants

TenantInfo Object

PropertyTypeDescription
idstringUnique identifier for the tenant
namestringName of the tenant
userCountnumberNumber of users in the tenant
serviceCountnumberNumber of services deployed in the tenant
subgroupCountnumberNumber of subgroups within the tenant
isPersonalbooleanWhether this is a personal tenant
useDefaultLimitsbooleanWhether the tenant uses default system limits
restrictCustomDeploymentsbooleanWhether 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
}

PlatformUsersResponse

Response for GET /tenants/admin/users. Lists all users in the platform with their tenant memberships.

Properties

PropertyTypeDescription
usersPlatformUser[]List of platform users

PlatformUser Object

PropertyTypeDescription
idstringUser ID
usernamestringUsername
emailstringUser email address
isTenantAdminbooleanWhether the user has global tenant admin permissions
tenantsUserTenantMembership[]List of tenants the user belongs to

UserTenantMembership Object

PropertyTypeDescription
idstringTenant ID
namestringTenant name
isAdminbooleanWhether the user is an admin of this tenant

Example

{
"users": [
{
"id": "user-1",
"username": "alice",
"email": "[email protected]",
"isTenantAdmin": true,
"tenants": [
{
"id": "tenant-abc",
"name": "data-science",
"isAdmin": true
}
]
}
]
}

TenantSubgroupsResponse

Response for GET /tenants/{tenantId}/subgroups.

Properties

PropertyTypeDescription
subgroupsSubgroup[]List of subgroups in the tenant

Subgroup Object

PropertyTypeDescription
idstringSubgroup ID
namestringSubgroup name
pathstringAPI path for the subgroup
memberCountnumberNumber of members in the subgroup
userScopesstring[]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

PropertyTypeDescription
subgroupNamestringName of the subgroup to create

Example

{
"subgroupName": "viewers"
}

CreateTenantSubgroupResponse

Response for POST /tenants/{tenantId}/subgroups.

Properties

PropertyTypeDescription
subgroupSubgroupThe 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

PropertyTypeDescription
usersTenantUser[]List of users in the tenant

TenantUser Object

PropertyTypeDescription
idstringUser ID
usernamestringUsername
emailstringUser email
groupsstring[]List of subgroups the user belongs to within the tenant

Example

{
"users": [
{
"id": "user-2",
"username": "bob",
"email": "[email protected]",
"groups": ["admins"]
}
]
}

TenantLimitsResponse

Response for GET /tenants/{tenantId}/limits.

Properties

PropertyTypeDescription
typeServiceTypeThe type of service limit
limitnumberThe numeric limit value
tenant_idstringThe 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

PropertyTypeDescription
limitsTenantLimit[]List of limits to update
useDefaultLimitsboolean(Optional) Whether to revert to default system limits

TenantLimit Object

PropertyTypeDescription
typeServiceTypeThe type of service limit to set
limitnumberThe new limit value

Example

{
"limits": [
{
"type": "model",
"limit": 5
}
],
"useDefaultLimits": false
}

UpdateTenantRestrictionsRequest

Request body for PATCH /tenants/{tenantId}/restrictions.

Properties

PropertyTypeDescription
restrictCustomDeploymentsbooleanWhether to restrict custom deployments for this tenant

Example

{
"restrictCustomDeployments": true
}

UpdateTenantRestrictionsResponse

Response for PATCH /tenants/{tenantId}/restrictions.

Properties

PropertyTypeDescription
successbooleanWhether the update was successful
messagestringStatus message
restrict_custom_deploymentsbooleanThe updated restriction value

Example

{
"success": true,
"message": "Tenant restrictions updated successfully",
"restrict_custom_deployments": true
}

TenantInvitesResponse

Response for GET /tenants/{tenantId}/invites.

Properties

PropertyTypeDescription
invitesInvite[]List of invites
paginationPaginationPagination details
filtersFiltersApplied filters

Invite Object

PropertyTypeDescription
inviteIdstringUnique invite ID
tenantIdstringTenant ID
tenantNamestringTenant name
emailstringInvited email
statusstringStatus (e.g., "pending", "accepted")
expirystringExpiration timestamp
createdAtstringCreation timestamp

Example

{
"invites": [
{
"inviteId": "inv-1",
"tenantId": "tenant-abc",
"tenantName": "data-science",
"email": "[email protected]",
"status": "pending",
"expiry": "2023-12-31T23:59:59Z",
"createdAt": "2023-12-01T10:00:00Z"
}
],
"pagination": {
"hasMore": false,
"nextTimestamp": 0,
"limit": 50
},
"filters": {
"email": "[email protected]",
"pendingOnly": true
}
}

CreateTenantInviteRequest

Request body for POST /tenants/{tenantId}/invites.

Properties

PropertyTypeDescription
emailstringEmail address to invite

Example

{
"email": "[email protected]"
}

CreateTenantInviteResponse

Response for POST /tenants/{tenantId}/invites.

Properties

PropertyTypeDescription
successbooleanWhether the invite was created successfully
messagestringStatus message
inviteIdstringThe ID of the created invite
userIdstringThe ID of the user (if they already exist)

Example

{
"success": true,
"message": "Invite created successfully",
"inviteId": "inv-2",
"userId": "user-3"
}

CreatePlatformInviteRequest

Request body for POST /invites/{email}.

Properties

PropertyTypeDescription
tenantIdsstring[](Optional) List of tenant IDs to add the user to upon acceptance

Example

{
"tenantIds": ["tenant-abc", "tenant-xyz"]
}

CreatePlatformInviteResponse

Response for POST /invites/{email}.

Properties

PropertyTypeDescription
successbooleanWhether the invite was created successfully
messagestringStatus message
userIdstringThe ID of the user (if they already exist)

Example

{
"success": true,
"message": "Platform invite sent",
"userId": "user-4"
}