Openclaw Api Contract
webweb/openclaw-api-contract.md
文件信息
查看来源与关联入口
来自当前 Web 文档集。
- `memory`: default development mode - `prisma`: target persistence mode after migrations and repository implementation Request:
阅读后可直接回到运行时、会话或网站页面继续操作。
文件内容
web/openclaw-api-contract.md
# OpenClaw Web API Contract
## Driver Modes
- `memory`: default development mode
- `prisma`: target persistence mode after migrations and repository implementation
## Bridge APIs
### `POST /api/bridge/link-challenges`
Request:
```json
{
"workspaceId": "ws_demo",
"label": "Lu MacBook Pro",
"platform": "macos"
}
```
### `POST /api/bridge/redeem`
Request:
```json
{
"challengeId": "chl_xxx",
"code": "ABCD-EFGH",
"runtimeVersion": "pi_agent_rust@0.1.8",
"capabilities": {
"rpcMode": true
}
}
```
### `POST /api/bridge/heartbeat`
Request:
```json
{
"deviceId": "dev_xxx",
"queueDepth": 0,
"activeRuns": 1,
"cpuPercent": 12,
"memoryMb": 284,
"lastRpcHealth": "ok"
}
```
## Task APIs
### `POST /api/workspaces/:workspaceId/dispatch-plan`
Returns the control-plane routing decision without creating a run.
### `POST /api/workspaces/:workspaceId/tasks`
Creates a task run and returns:
- `taskRun`
- `dispatchDecision`
### `POST /api/tasks/events`
Used by the bridge or cloud host to update run state from runtime events.
原始 Markdown
- `memory`: default development mode - `prisma`: target persistence mode after migrations and repository implementation Request: