Skip to content

REST API ​

Claw Insights provides REST endpoints for health checks and snapshot generation.

AI Agents

If you're building an AI agent integration, consider using the snapshot skill for automatic discovery — or use the REST endpoints below for direct programmatic access.

GET /health ​

Health check endpoint. No authentication required.

bash
curl http://127.0.0.1:41041/health

Returns 200 OK with server status.

POST /api/snapshot ​

Generate a dashboard snapshot image or data export.

Authentication ​

Requires a valid Bearer token (Authorization: Bearer <token>) unless running in no-auth mode.

Security: No-Auth Mode

When noAuth is enabled, the snapshot endpoint is protected by localOnlyMiddleware — only requests from 127.0.0.1 / ::1 (localhost) are accepted. Remote requests receive 403 Forbidden. This prevents unauthenticated access from the network.

Parameters ​

ParameterTypeDefaultValuesDescription
detailstringstandardcompact, standard, fullDetail level
formatstringpngpng, svg, jsonOutput format
rangestring24h30m, 1h, 6h, 12h, 24hTime range
themestringdarkdark, lightColor theme
langstringenen, zhLanguage

Note: The REST API defaults range to 24h. The CLI snapshot command defaults to 6h.

Example ​

bash
curl -X POST http://127.0.0.1:41041/api/snapshot \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"format": "png", "detail": "full", "range": "24h", "theme": "dark"}' \
  -o snapshot.png

Response Headers ​

HeaderDescription
Content-TypeMIME type of the response (image/png, image/svg+xml, application/json)
Content-DispositionSuggested filename with timestamp and parameters
X-Snapshot-DurationRender time in milliseconds
X-Snapshot-Degraded-SourcesComma-separated list of data sources that failed gracefully
X-Snapshot-DegradedPresent when detail level was auto-downgraded to fit the 2MB size limit

Error Codes ​

CodeHTTP StatusDescription
INVALID_PARAM400Invalid or unsupported parameter value
RATE_LIMITED429Too many snapshot requests — try again later
QUEUE_FULL503Render queue is full
QUEUE_TIMEOUT503Queue wait timed out
COLLECT_TIMEOUT504Data collection timed out for one or more sources
TOTAL_TIMEOUT504Total snapshot timeout exceeded
PAYLOAD_TOO_LARGE413Snapshot exceeds 2MB at all detail levels
GATEWAY_UNREACHABLE502OpenClaw Gateway is not reachable
RENDER_FAILED500Snapshot rendering failed

Released under the MIT License.