AI Insights REST API Reference - Docs, SDK & Webhooks

· Last updated

REST API reference

Every operation in the portal is backed by a documented REST endpoint. Use them to build integrations, automate workflows, or embed AI Insights into your own product.

Authentication

All endpoints accept either:

  • Bearer JWT — Authorization: Bearer {token} (issued by /api/auth/login)
  • Session cookie — for browser callers

JWTs expire after 24 hours. Refresh by re-calling /api/auth/login.

Key endpoints

Method Path Purpose
POST /api/auth/login Exchange credentials for a JWT
GET /api/workspaces/{guid} Workspace with agents, datasources, dashboards, reports
POST /api/datasources Create a datasource
POST /api/datasources/test-connection Test a connection without saving
GET /api/datasources/{id}/tables List tables (gateway-aware)
GET /api/datasources/{id}/schema List columns by table
POST /api/data/execute Run a read-only query
POST /api/chat/send Stream an AI agent response (SSE)
GET /api/reports List reports
POST /api/reports Create a report (from canvas JSON)
POST /api/workspaces/{wsId}/subscriptions Create a subscription
POST /api/workspaces/{wsId}/subscriptions/{id}/send-now Send a subscription immediately

Rate limits

  • Trial: 60 requests/min
  • Premium: 300 requests/min

Error format

All non-2xx responses are JSON:

{ "error": "Friendly message", "code": "optional-machine-code" }