HTTP REST API
HTTP REST API
Section titled “HTTP REST API”The Dewee Gateway exposes REST endpoints under /v1/.
Endpoints Summary
Section titled “Endpoints Summary”POST /v1/chat/completions— OpenAI-compatible chat completion.GET /v1/agents— List accessible agents for the authenticated caller.POST /v1/agents— Create a new agent in the tenant workspace.GET /v1/traces/follow— Stateless polling endpoint for trace updates.GET /v1/usage/summary— Aggregate token and request analytics.GET /health— Public health and readiness probe (returns protocol v3).
Interactive API Console
Section titled “Interactive API Console”Test live requests using the Dewee Interactive API Console.
| Capability | Gateway API/RPC | dewee CLI | RGD | CCP | ACP | /api-docs/proxy |
|---|---|---|---|---|---|---|
| Check System Health | GET /health (openapi:110, public) | dewee doctor (doctor.go:21) | Overview status indicator | System Health Status | health/index.astro | Relay Try-It -> GET /health |
| Sync Browser Cookies | POST /v1/browser/cookies/sync (openapi:148, header: X-GoClaw-User-Id :157) | N/A (CLI parity gap, issue #622) | N/A (i18n key only) | N/A (no UI component) | N/A (scope: user/agent) | Relay Try-It (Bearer only; identity header stripped by proxy) |
| Chat Completions | POST /v1/chat/completions (openapi:432, OpenAI-compat) | dewee agent chat (agent_chat.go:15) | Chat session viewer | Workspace Chat (/chat.astro) | N/A (scope: tenant user) | Relay Try-It (JSON body) |
| Audit Master API Keys | GET /internal/v1/owner/api-keys (openapi:950, RoleOwner) | N/A (CLI parity gap, issue #622) | N/A (tenant UI no access) | N/A (tenant UI no access) | N/A (managed via direct API) | DENIED — HTTP 403 (/internal/* blocked) |
| Manage Owner Tenants | GET /internal/v1/owner/tenants (openapi:1016, RoleOwner) | N/A (CLI parity gap, issue #622) | N/A (tenant UI no access) | N/A (tenant UI no access) | N/A (managed via direct API) | DENIED — HTTP 403 (/internal/* blocked) |
| List Agents | GET /v1/agents (openapi:1410, header: X-GoClaw-User-Id :1418) | dewee agent list (agent.go:42) | Agents list (agents-page.tsx) | Workspace Agents (/agents.astro) | N/A (no dedicated ACP UI) | Relay Try-It (Bearer only; identity header stripped by proxy) |
| Create Agent | POST /v1/agents (openapi:1436, Scope: tenant admin) | dewee agent add (agent.go:21) | Create agent dialog | Create agent form (/agents.astro) | N/A (admins do not author tenant agents) | Relay Try-It (Prod mutation -> confirm modal) |
| Register MCP Server | POST /v1/mcp/servers (openapi:2482, Scope: tenant admin) | N/A (CLI parity gap, issue #622) | MCP settings (mcp-page.tsx) | MCP connections (/mcp.astro) | N/A (no dedicated ACP UI) | DENIED — HTTP 403 (operator surface) |
| Agent Memory Search | POST /v1/agents/{agentID}/memory/search (openapi:2611) | dewee memory search --agent <id> (memory_cmd.go:16) | Memory config section | Memory Explorer (/memory.astro) | N/A (tenant memory scope) | Relay Try-It (query search) |
| Knowledge Graph Traverse | POST /v1/agents/{agentID}/kg/traverse (openapi:2696) | dewee kg traverse --agent <id> (kg_cmd.go:16) | Sigma/Graphology viz | Knowledge Canvas (/knowledge.astro) | N/A (tenant KG scope) | Relay Try-It (traverse payload) |
| Zalo OA OAuth Consent | GET /v1/channels/instances/{id}/zalo-oa/consent (openapi:2837) | N/A (browser OAuth flow) | Channels settings | Channel settings (/channels.astro) | N/A (no dedicated ACP UI) | N/A (Browser OAuth flow only) |
| Poll Trace Changes | GET /v1/traces/follow (openapi:3028, stateless polling :3033) | dewee traces follow (traces_cmd.go:19) | Traces list (traces-page.tsx) | Observability (/traces.astro) | N/A (no dedicated ACP UI) | Relay Try-It (HTTP GET polling) |
| Costs Summary | GET /v1/costs/summary (openapi:3166) | N/A (CLI parity gap, issue #622) | Cost summary panel | Usage reporting (/usage.astro) | N/A (no dedicated ACP UI) | N/A (Operator analytics, use dewee usage) |
| Usage Analytics Summary | GET /v1/usage/summary (openapi:3207) | dewee usage summary (usage_cmd.go:14) | Usage analytics (usage-page.tsx) | Usage Workbench (/usage.astro) | N/A (no dedicated ACP UI) | Relay Try-It (query filter) |
| Execute Tenant Transfer | POST /v1/tenant/resource-transfers (openapi:3615) | dewee tenant-transfer copy|move (tenant_transfer.go:111-185) | N/A (no RGD UI) | N/A (no CCP UI) | N/A (no ACP UI in dewee-admin) | DENIED — HTTP 403 (operator surface) |
Transport Exception Rationale: /api-docs/proxy is a non-operable browser Try-It relay with zero business logic. For production automation, use canonical dewee CLI commands with --server and --token.