API Overview
Dinotty's external interfaces fall into three layers. This page helps you find the right API quickly.
Layers
| Layer | Channel | Use case | Doc |
|---|---|---|---|
| Tabs & Panes API | HTTP REST | Create / close / rename tabs, split panes, move panes across tabs | tabs-panes-api.md |
| Open API | HTTP + WebSocket | Read and write existing terminals: byte streams (screen/scrollback/input/resize) + command-level semantics (run/send/read) + event subscription | open-api.md |
| Mission Control API | WebSocket (/ws/sync) | Programmatically open / navigate / close the MC overview | mission-control-api.md |
Plus two standalone subsystem docs:
- Clipboard API - read the host's clipboard
- MCP Server - Model Context Protocol server
Find by scenario
I want to...
- Start a terminal tab from outside -> POST /api/tabs
- Connect to SSH and auto-open a tab -> POST /api/tabs/ssh/quick
- Split an existing terminal -> POST /api/tabs/:tab_id/pane
- Pull a pane into its own tab -> POST /api/tabs/extract
- Capture the current terminal screen -> GET /api/sessions/:pane_id/screen
- Inject characters into a terminal -> POST /api/sessions/:pane_id/input
- Run a command and get the exit code -> POST /api/sessions/:pane_id/run
- Subscribe to command-finished events -> WS /ws/events
- Open Mission Control remotely -> mission_control_op / toggle
- Jump to a specific workspace from MC -> mission_control_op / jump
- Read the host clipboard -> GET /api/clipboard
- Plug into Claude / LLM MCP clients -> MCP Server
Auth model
Dinotty's auth has two layers. Open API's run/send/read/WS /ws/events accept both credentials (dual-track auth):
┌─────────────────────────────────────────────────────────────────┐
│ Global Token / Session Cookie │
│ - Master token configured at startup, or the cookie obtained │
│ via POST /api/auth │
│ - Covers: Tabs API, Open API (all endpoints), Clipboard, │
│ Settings, Plugins - all /api/* endpoints │
└─────────────────────────────────────────────────────────────────┘
│
│ /api/sessions/{run,send,read} + /ws/events also accept
▼
┌─────────────────────────────────────────────────────────────────┐
│ Agent Token (dnt_*) │
│ - Fine-grained token created via /api/tokens │
│ - Carries capabilities: terminal:read / terminal:write / etc. │
│ - Covers: /api/sessions/{run,send,read}, /ws/events, │
│ /api/tokens/*, /mcp/* │
└─────────────────────────────────────────────────────────────────┘Mission Control flows through /ws/sync and uses the global token (query string ?token=<token>) or the session cookie.
Enable conditions
| API | Enable condition |
|---|---|
| Tabs & Panes API | Always enabled (auth only) |
| Open API | Requires open_api.enabled = true in settings; run/send/read also accept Agent Token (capability check) |
| Mission Control API | Always enabled (over /ws/sync) |
| Clipboard | Always enabled; requires token or session + same-origin proof |
| MCP Server | Requires open_api.enabled = true and an Agent Token |
Internals
For the "non-API" design layer - event system, permission model, audit logs:
- Event Bus - internal event bus
- Token Permission System - Agent Token capability model
- Audit Log & Webhook - operation audit log and external webhook delivery
