Insights
Query workspace data, explore schema metadata, and get health digests through the platform insights endpoints.
Insights supports interactive, read-only exploration of workspace data. It sits alongside Workspace Data Queries, which are registered agent tools, and the MCP Server, which exposes SQL tools to external MCP clients.
Insights operations require viewer+ (Data:View) except raw SQL execution, which requires Data:Query at the admin tier or above.
Execute SQL
Runs a read-only statement against the workspace-scoped analytics surface.
Execute a read-only SQL query against Databricks.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Read-only SQL query against Databricks.
Successful Response
Validation Error
POST /v1/{workspace_id}/insights/sql HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"sql": "text"
}{
"results": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"count": 1,
"error": "text"
}List Query Schema
List available tables, columns, and functions.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
GET /v1/{workspace_id}/insights/schema HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful Response
{
"lakebase_tables": {
"ANY_ADDITIONAL_PROPERTY": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"databricks_catalogs": [
"text"
],
"uc_functions": [
{
"ANY_ADDITIONAL_PROPERTY": "text"
}
],
"ai_functions": [
"text"
]
}Get Health Digest
Returns a workspace health snapshot. Analytical values can lag recent workspace changes.
Proactive workspace health digest. Cached 5 minutes.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
GET /v1/{workspace_id}/insights/digest HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful Response
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Get Suggestions
Get contextual starter questions for the insights agent.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
GET /v1/{workspace_id}/insights/suggestions HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful Response
{
"suggestions": [
"text"
]
}Chat Sessions
Create a Session
Create a new insights chat session.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
POST /v1/{workspace_id}/insights/sessions HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful Response
{
"id": "text",
"created_at": "text"
}Get a Session
An unknown or expired session returns an empty message history with an error field rather than 404.
Get insights session history.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Session ID
Successful Response
Validation Error
GET /v1/{workspace_id}/insights/sessions/{session_id} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Chat
Chat returns a Server-Sent Events stream of response blocks.
Chat with the insights agent. Returns SSE stream of visual blocks.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Session ID
Insights chat user message.
Successful Response
Validation Error
POST /v1/{workspace_id}/insights/sessions/{session_id}/chat HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"message": "text"
}No content
Last updated
Was this helpful?

