Skip to main content
Version: 3.4.0-rc.1

cmind/tenants/v1/tenant_service.proto

Package: cmind.tenants.v1

Messages​

Tenant​

Tenant is the full tenant representation returned by admin-gated endpoints. Carries fields whose computation is acceptable on those paths (e.g. user_count requires a Keycloak round-trip per tenant).

FieldTypeNumberDescription
idstring1
namestring2
userCountuint323
createdAtgoogle.protobuf.Timestamp4
groupCountuint325group_count is the number of custom groups in the tenant — like user_count, a Keycloak round-trip per tenant, so it's only on this admin-gated shape.

TenantSummary​

TenantSummary is the lightweight representation used by hot, user-facing endpoints where we don't want to pay for full enrichment. Beyond identity it carries the calling user's own role in the tenant.

FieldTypeNumberDescription
idstring1
namestring2
roleTenantRole3role is the calling user's role level in this tenant.

ListUserTenantsRequest​

ListUserTenantsResponse​

FieldTypeNumberDescription
tenantsrepeated TenantSummary1

ListTenantsRequest​

ListTenantsResponse​

FieldTypeNumberDescription
tenantsrepeated Tenant1

GetTenantRequest​

FieldTypeNumberDescription
tenantIdstring1

GetTenantResponse​

FieldTypeNumberDescription
tenantTenant1

CreateTenantRequest​

FieldTypeNumberDescription
namestring1

CreateTenantResponse​

FieldTypeNumberDescription
tenantTenant1

DeleteTenantRequest​

FieldTypeNumberDescription
tenantIdstring1

DeleteTenantResponse​

TenantMember​

FieldTypeNumberDescription
userIdstring1
roleTenantRole2
metadatacmind.permissions.v1.UserMetadata3metadata is populated by List responses only. Absent when the user can no longer be resolved (deleted from the identity provider).

ListTenantMembersRequest​

FieldTypeNumberDescription
tenantIdstring1

ListTenantMembersResponse​

FieldTypeNumberDescription
membersrepeated TenantMember1

SetTenantMemberRoleRequest​

SetTenantMemberRole changes the role of a user who is already a member. Joining is the invite/accept flow (InviteService); this fails with NotFound if the user is not already in the tenant.

FieldTypeNumberDescription
tenantIdstring1
userIdstring2
roleTenantRole3

SetTenantMemberRoleResponse​

RemoveTenantMemberRequest​

RemoveTenantMember removes the user from the tenant entirely (all levels).

FieldTypeNumberDescription
tenantIdstring1
userIdstring2

RemoveTenantMemberResponse​

AddTenantMemberRequest​

AddTenantMember adds a user to the tenant at the given role. A platform operation (can_manage_tenants): unlike the invite flow, it adds the user directly. The caller can pass their own user_id to join a tenant they manage; leaving is RemovePlatformTenantMember with one's own id, because the role joined at (member or editor) carries no can_admin for RemoveTenantMember.

FieldTypeNumberDescription
tenantIdstring1
userIdstring2
roleTenantRole3

AddTenantMemberResponse​

PlatformUser​

PlatformUser is a user known to the identity provider, with their tenant memberships. Admin-gated — computing memberships is a Keycloak round-trip per user.

FieldTypeNumberDescription
userIdstring1
usernamestring2
emailstring3
tenantsrepeated UserTenantMembership4Tenants the user belongs to, each with their role. Empty for a user who holds no tenant membership.

UserTenantMembership​

FieldTypeNumberDescription
tenantIdstring1
tenantNamestring2
roleTenantRole3

ListPlatformUsersRequest​

FieldTypeNumberDescription
pagecmind.common.v1.PageRequest1
searchstring2Optional: return only users whose username or email contains this substring (case-insensitive, Keycloak's native search).

ListPlatformUsersResponse​

FieldTypeNumberDescription
usersrepeated PlatformUser1
pagecmind.common.v1.PageInfo2

RemovePlatformTenantMemberRequest​

FieldTypeNumberDescription
tenantIdstring1
userIdstring2

RemovePlatformTenantMemberResponse​

SetContentCaptureRequest​

Content-capture policy — a personal, per-admin opt-in governing whether the gateway records trace content for the caller's own requests: the prompt + answer (a gen_ai event) and the tool-call span content. The target is always the caller, derived server-side from the authenticated principal — never a field on these messages, so one admin can never flip capture on (or read it back) for someone else. Off by default; unset is treated as off.

FieldTypeNumberDescription
tenantIdstring1
enabledbool2

SetContentCaptureResponse​

GetContentCaptureRequest​

FieldTypeNumberDescription
tenantIdstring1

GetContentCaptureResponse​

FieldTypeNumberDescription
enabledbool1

ListGenAiEventsRequest​

gen_ai event read — lists the prompt/answer events the gateway captured for a tenant (opt-in via the content-capture policy) into the queryable gen_ai_events analytics table. Backs the inspection UI; each event joins to its trace by trace_id.

FieldTypeNumberDescription
tenantIdstring1
limituint322limit defaults to 100 and is capped at 1000 server-side.
pageOffsetuint323
startTimegoogle.protobuf.Timestamp4Optional time window; an unset bound is unbounded.
endTimegoogle.protobuf.Timestamp5
conversationIdstring6Optional filters: conversation_id groups a conversation's turns; trace_id fetches a single trace's event (the inspection UI's per-trace view).
traceIdstring7

GenAiEvent​

GenAiEvent is one captured inference: the model, the prompt/answer message arrays (OTel GenAI message-array JSON), and the ids correlating it to a trace and conversation.

FieldTypeNumberDescription
timestampgoogle.protobuf.Timestamp1
traceIdstring2
spanIdstring3
requestModelstring4
inputMessagesstring5
outputMessagesstring6
conversationIdstring7
responseIdstring8

ListGenAiEventsResponse​

FieldTypeNumberDescription
eventsrepeated GenAiEvent1
hasMorebool2has_more is true when rows exist past this page (via a limit+1 over-fetch).

GetChatInstructionsRequest​

Tenant chat instructions: the tenant-admin-editable general assistant prompt composed into direct-model Chat requests. Three states: unset (the platform baseline applies), empty string (the tenant component is omitted entirely), or custom text (used verbatim). Never applies to preset agents.

FieldTypeNumberDescription
tenantIdstring1

GetChatInstructionsResponse​

FieldTypeNumberDescription
instructionsstring1The effective instructions: the platform baseline when the tenant is unset, otherwise the tenant's stored text. Empty means the tenant explicitly omitted the tenant component.
usesDefaultbool2True when the tenant is on the platform baseline (nothing stored). The editor uses this to offer reset-to-baseline.

SetChatInstructionsRequest​

FieldTypeNumberDescription
tenantIdstring1
instructionsoptional string2Optional. Absent resets the tenant to the platform baseline. An explicit empty string omits the tenant component. Nonempty text is stored verbatim as the tenant's custom instructions.

SetChatInstructionsResponse​

Services​

TenantService​

ListUserTenants​

GET /cmind.tenants.v1.TenantService/ListUserTenants

Returns tenants the authenticated user belongs to.

Request: ListUserTenantsRequest

Response: ListUserTenantsResponse

ListTenants​

GET /cmind.tenants.v1.TenantService/ListTenants

Returns all tenants (admin operation).

Request: ListTenantsRequest

Response: ListTenantsResponse

GetTenant​

GET /cmind.tenants.v1.TenantService/GetTenant

Returns a single tenant. Gated on can_admin of the specific tenant so tenant admins (not just platform admins) can fetch their own tenant.

Request: GetTenantRequest

Response: GetTenantResponse

CreateTenant​

POST /cmind.tenants.v1.TenantService/CreateTenant

Request: CreateTenantRequest

Response: CreateTenantResponse

DeleteTenant​

POST /cmind.tenants.v1.TenantService/DeleteTenant

Request: DeleteTenantRequest

Response: DeleteTenantResponse

ListTenantMembers​

GET /cmind.tenants.v1.TenantService/ListTenantMembers

Lists members of the tenant with their roles. Any tenant member may read it: sharing a resource with a person needs the tenant's directory.

Request: ListTenantMembersRequest

Response: ListTenantMembersResponse

SetTenantMemberRole​

POST /cmind.tenants.v1.TenantService/SetTenantMemberRole

Changes an existing member's role within the tenant.

Request: SetTenantMemberRoleRequest

Response: SetTenantMemberRoleResponse

RemoveTenantMember​

POST /cmind.tenants.v1.TenantService/RemoveTenantMember

Removes a member from the tenant entirely.

Request: RemoveTenantMemberRequest

Response: RemoveTenantMemberResponse

AddTenantMember​

POST /cmind.tenants.v1.TenantService/AddTenantMember

Adds a user to the tenant at a given role (also used to join a tenant you manage by passing your own id).

Request: AddTenantMemberRequest

Response: AddTenantMemberResponse

GetContentCapture​

GET /cmind.tenants.v1.TenantService/GetContentCapture

Returns whether content capture is enabled for the caller's own requests in this tenant — not the tenant as a whole. Gated can_read.

Request: GetContentCaptureRequest

Response: GetContentCaptureResponse

SetContentCapture​

POST /cmind.tenants.v1.TenantService/SetContentCapture

Sets whether content capture is enabled for the caller's own requests in this tenant (tenant-admin). Off by default; enabling opts in only your own traffic — other members' conversations are never captured.

Request: SetContentCaptureRequest

Response: SetContentCaptureResponse

ListGenAiEvents​

GET /cmind.tenants.v1.TenantService/ListGenAiEvents

Lists captured gen_ai events (prompt + answer) for a tenant, newest first, from the queryable gen_ai_events analytics table. Gated can_admin: this returns raw cross-user prompt/answer content (a higher sensitivity class than GetContentCapture's single on/off bit), so reading it is admin-only — symmetric with SetContentCapture, which gates the decision to capture.

Request: ListGenAiEventsRequest

Response: ListGenAiEventsResponse

GetChatInstructions​

GET /cmind.tenants.v1.TenantService/GetChatInstructions

Returns the tenant's effective chat instructions for the admin editor. Gated can_admin: instructions shape every member's Chat traffic.

Request: GetChatInstructionsRequest

Response: GetChatInstructionsResponse

SetChatInstructions​

POST /cmind.tenants.v1.TenantService/SetChatInstructions

Sets the tenant's chat instructions. Gated can_admin. Absent instructions resets to the platform baseline; an explicit empty string omits the tenant component; nonempty text is stored verbatim.

Request: SetChatInstructionsRequest

Response: SetChatInstructionsResponse

ListPlatformUsers​

POST /cmind.tenants.v1.TenantService/ListPlatformUsers

Lists every user in the identity provider realm, with their tenant memberships. Platform-admin operation.

Request: ListPlatformUsersRequest

Response: ListPlatformUsersResponse

RemovePlatformTenantMember​

POST /cmind.tenants.v1.TenantService/RemovePlatformTenantMember

Removes a user from a tenant. Platform-admin operation: unlike RemoveTenantMember (tenant-admin gated), this does not require the caller to be an admin of the target tenant.

Request: RemovePlatformTenantMemberRequest

Response: RemovePlatformTenantMemberResponse