AdminRoleService
Chatto exposes this service below /api/connect.
Shared message and enum definitions are documented in Shared Types And Enums.
AdminRoleService
Section titled “AdminRoleService”Provides authenticated role reads and administrative role definition changes.
ListRoles
Section titled “ListRoles”Lists the role catalog including permission arrays as a finite snapshot. Requires an authenticated user. This intentionally includes permission arrays for clients that need to show a user’s assigned roles and their effects; use chatto.api.v1.RoleService for lightweight catalog rendering.
POST /api/connect/chatto.admin.v1.AdminRoleService/ListRolesInput: ListRolesRequest
Section titled “Input: ListRolesRequest”Request the role catalog.
Result: ListRolesResponse
Section titled “Result: ListRolesResponse”Finite role catalog snapshot plus viewer role-management capabilities.
| Field | Type | Description |
|---|---|---|
roles | repeated AdminRole | Roles sorted by position. |
viewer_can_manage_roles | bool | Whether the caller may create/update/delete role definitions. |
viewer_can_assign_roles | bool | Whether the caller may assign/revoke roles and view role rosters. |
GetRole
Section titled “GetRole”Gets one role plus admin detail metadata. Returns NOT_FOUND when the role does not exist. Requires an authenticated user; the assigned-user roster is empty unless the caller may assign roles.
POST /api/connect/chatto.admin.v1.AdminRoleService/GetRoleInput: GetRoleRequest
Section titled “Input: GetRoleRequest”Request one role.
| Field | Type | Description |
|---|---|---|
name | string | Stable role name. |
Result: GetRoleResponse
Section titled “Result: GetRoleResponse”One role plus role-management metadata.
| Field | Type | Description |
|---|---|---|
role | AdminRole | Requested role. |
users | repeated chatto.api.v1.User | Explicit users with this role. Empty unless the caller may assign roles. |
viewer_can_manage_roles | bool | Whether the caller may create/update/delete role definitions. |
viewer_can_assign_roles | bool | Whether the caller may assign/revoke roles and view role rosters. |
CreateRole
Section titled “CreateRole”Creates a custom role. Requires role.manage.
POST /api/connect/chatto.admin.v1.AdminRoleService/CreateRoleInput: CreateRoleRequest
Section titled “Input: CreateRoleRequest”Request to create a role.
| Field | Type | Description |
|---|---|---|
name | string | Stable role name. |
display_name | string | Display name shown in admin and mention UIs. |
description | string | Optional role description. |
pingable | bool | Whether messages may notify users assigned to this role. |
Result: CreateRoleResponse
Section titled “Result: CreateRoleResponse”Result of creating a role.
| Field | Type | Description |
|---|---|---|
role | AdminRole | Created role. |
UpdateRole
Section titled “UpdateRole”Updates role metadata. Requires role.manage.
POST /api/connect/chatto.admin.v1.AdminRoleService/UpdateRoleInput: UpdateRoleRequest
Section titled “Input: UpdateRoleRequest”Request to update role metadata.
| Field | Type | Description |
|---|---|---|
name | string | Stable role name. |
display_name | optional string | Display name shown in admin and mention UIs, when changing it. |
description | optional string | Role description, when changing it. Empty clears the description. |
pingable | optional bool | Whether messages may notify users assigned to this role, when changing it. |
Result: UpdateRoleResponse
Section titled “Result: UpdateRoleResponse”Result of updating a role.
| Field | Type | Description |
|---|---|---|
role | AdminRole | Updated role. |
DeleteRole
Section titled “DeleteRole”Deletes a custom role. Requires role.manage.
POST /api/connect/chatto.admin.v1.AdminRoleService/DeleteRoleInput: DeleteRoleRequest
Section titled “Input: DeleteRoleRequest”Request to delete a role.
| Field | Type | Description |
|---|---|---|
name | string | Stable role name. |
Result: DeleteRoleResponse
Section titled “Result: DeleteRoleResponse”Result of deleting a role.
| Field | Type | Description |
|---|---|---|
deleted | bool | True when the request completed. |
ReorderRoles
Section titled “ReorderRoles”Replaces the custom role order. Requires role.manage.
POST /api/connect/chatto.admin.v1.AdminRoleService/ReorderRolesInput: ReorderRolesRequest
Section titled “Input: ReorderRolesRequest”Request to replace custom role order.
| Field | Type | Description |
|---|---|---|
role_names | repeated string | Ordered custom role names. The list must include every custom role exactly once; system roles keep fixed positions and must not be included. |
Result: ReorderRolesResponse
Section titled “Result: ReorderRolesResponse”Result of replacing custom role order.
| Field | Type | Description |
|---|---|---|
roles | repeated AdminRole | Full role catalog after reordering. |