ClouisleClouisle

Admin API Reference

Admin panel endpoint groups, permission codes, and usage boundaries

Admin routes are mounted under /api/v1/admin and cover dashboards, observability, audit logs, conversations, users, roles, permissions, site settings, models, SSO, notifications, teams, memory, Agents, tools, Skills, workflows, workflow metrics, TOTP, packages, and knowledge bases. They are used by the admin panel and return the unified code/data/msg envelope. They are not public APIs for anonymous calls.

Permission Model

Every endpoint declares the permission code it requires (admin:* or audit:*) through a dependency:

  • Superusers bypass everything: an account with is_superuser skips all permission-code checks.
  • Everyone else is judged by permission code: the account must hold the endpoint's declared code through a role. Codes come from the system permission definitions synced at startup and can be freely combined in roles (see /api/v1/admin/roles and /api/v1/admin/permissions).
  • API Keys carry the same checks: an API Key is validated against its bound user's permission set, so never grant an API Key unnecessary admin:* permissions.
  • Knowledge bases are the exception: /api/v1/admin/knowledge-bases reuses the platform knowledge-base routes, but switches the required code to admin:knowledge-base:{read,test,create,update,delete} based on the request path prefix and skips team-membership checks so the admin view can work across teams.

Authorization is enforced server-side. Hiding a menu entry in the UI is not a security boundary; third-party integrations must request the minimum permission codes.

Groups and Permission Codes

GroupMounted prefixPermission codes
Dashboard/api/v1/admin/dashboardadmin:dashboard:access
Observability/api/v1/admin/observabilityadmin:dashboard:access
Audit logs/api/v1/admin/audit-logsaudit:read (queries), audit:export (export, archive)
Conversations/api/v1/admin/conversationsadmin:conversation:read, admin:conversation:delete
Users/api/v1/admin/usersadmin:user:read, admin:user:create, admin:user:update, admin:user:delete
Roles/api/v1/admin/rolesadmin:role:read, admin:role:create, admin:role:update, admin:role:delete
Permissions/api/v1/admin/permissionsadmin:permission:read, admin:permission:create, admin:permission:update, admin:permission:delete
Site settings/api/v1/admin/site-settingsadmin:settings:read, admin:settings:update (archiving audit logs additionally needs audit:export)
Models/api/v1/admin/modelsadmin:model:read, admin:model:create, admin:model:update, admin:model:delete
SSO/api/v1/admin/ssoadmin:sso:read, admin:sso:update
Notifications/api/v1/admin/notificationsadmin:notification:create (create), admin:notification:delete (delete); listing narrows to global admin access or an authorized team
Teams/api/v1/admin/teamsadmin:team:read, admin:team:create, admin:team:delete
Memories/api/v1/admin/memoriesadmin:memory:read, admin:memory:update, admin:memory:delete
Agents/api/v1/admin/agentsadmin:app:read, admin:app:create, admin:app:update, admin:app:delete, admin:app:publish, admin:app:duplicate
Tools/api/v1/admin/toolsadmin:capability:read, admin:capability:create, admin:capability:update, admin:capability:delete, admin:capability:execute
Skills/api/v1/admin/skillsadmin:capability:read, admin:capability:create, admin:capability:update, admin:capability:delete, admin:capability:execute
Workflows/api/v1/admin/workflowsadmin:app:read, admin:app:create, admin:app:update, admin:app:delete, admin:app:publish, admin:app:duplicate
Workflow metrics/api/v1/admin/workflows/metricsadmin:dashboard:access (clearing the cache needs admin:settings:update)
TOTP/api/v1/admin/totpadmin:dashboard:access
Packages/api/v1/admin/packagesRequires an authenticated user (import/export validate against each resource's own access rules)
Knowledge bases/api/v1/admin/knowledge-basesadmin:knowledge-base:read, admin:knowledge-base:test, admin:knowledge-base:create, admin:knowledge-base:update, admin:knowledge-base:delete

The Agents and Workflows groups share the same admin:app:* codes, and Tools and Skills share the same admin:capability:* codes. Granting one group therefore affects the other.

Common Endpoints

MethodPathPurpose
GET/api/v1/admin/dashboard/statsSystem-wide totals (users, teams, Agents, workflows, conversations, tokens)
GET/api/v1/admin/dashboard/stats/trendsSystem growth trends
GET/api/v1/admin/observability/overviewRuntime observability overview
GET/api/v1/admin/observability/timeoutsTimeout statistics
GET/api/v1/admin/audit-logsPaginated audit-log query
GET/api/v1/admin/audit-logs/exportExport audit logs
GET/api/v1/admin/rolesList roles
PUT/api/v1/admin/roles/{role_id}/permissionsReplace a role's permission set
GET/api/v1/admin/permissions/scopesList permission scope options
GET/api/v1/admin/users/statsUser statistics
POST/api/v1/admin/users/{user_id}/deactivateDeactivate a user
GET/api/v1/admin/teamsList all teams
GET/api/v1/admin/memories/entitiesList memory entities
GET/api/v1/admin/memories/relationsList memory relations
GET/api/v1/admin/agents/filtersAgent filter options
POST/api/v1/admin/agents/{agent_id}/publishPublish an Agent
GET/api/v1/admin/tools/configList global tool configurations
GET/api/v1/admin/skills/filtersSkill filter options
GET/api/v1/admin/workflows/filtersWorkflow filter options
GET/api/v1/admin/totp/statsTOTP usage statistics
GET/api/v1/admin/notificationsAdmin-view notification list
GET/api/v1/admin/knowledge-basesCross-team knowledge-base list

Workflow Metrics

Workflow execution metrics are not under /api/v1/workflows; they live under the admin prefix at /api/v1/admin/workflows/metrics/*. The router carries its own /workflows/metrics prefix, so it coexists with the /api/v1/admin/workflows CRUD routes without colliding.

MethodPathPurposePermission
GET/api/v1/admin/workflows/metrics/dashboardMetrics dashboard summary (includes running workflows)admin:dashboard:access
GET/api/v1/admin/workflows/metrics/workflows/{workflow_id}Execution metrics for one workflowadmin:dashboard:access
GET/api/v1/admin/workflows/metrics/nodesMetrics for every node typeadmin:dashboard:access
GET/api/v1/admin/workflows/metrics/nodes/{node_type}Metrics for one node typeadmin:dashboard:access
GET/api/v1/admin/workflows/metrics/runningCurrently running workflowsadmin:dashboard:access
GET/api/v1/admin/workflows/metrics/cacheMetrics cache statisticsadmin:dashboard:access
DELETE/api/v1/admin/workflows/metrics/cacheClear the metrics cacheadmin:settings:update
curl -X GET "https://your-domain.com/api/v1/admin/workflows/metrics/dashboard" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Request Example

curl -X GET "https://your-domain.com/api/v1/admin/users?page=1&page_size=20" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Integration Guidance

  • Third-party apps should prefer the Agent, workflow, conversation, and knowledge base resource endpoints over admin endpoints.
  • Admin automation must pin the Clouisle version, record the required permission codes, and check the OpenAPI Schema before upgrading.
  • Audit and user management operations contain sensitive data; use short-lived keys together with minimal rate limits.
  • Grant admin:* only when cross-team operations are genuinely required; day-to-day work should use team roles with platform permissions such as workflow:read or kb:read.

Common Errors

HTTP / codeMeaning
401 / 2000Authentication is missing
403 / 3000The required permission code is missing
404 / 4000Resource does not exist
1001Request validation failed

Last Updated: 2026-09-26

How is this guide?

On this page