Chat

Execute Query For Context Agent

Execute a read-only SQL or native Malloy query for Context Agent as CSV.

This endpoint is designed for Context Agent to run ad-hoc analysis queries. The client saves the returned content inside its own sandbox, and a summary is provided for LLM context.

Security:

  • Admin-only SQL; modelers may query governed Malloy sources
  • SQL must be SELECT-only; Malloy must run the authorized catalog source
  • Row-level security automatically applied
  • Configurable row limit (default 10,000)

Returns: - csv_content: CSV text for the authenticated client to save locally - summary: Data summary for LLM (row count, columns, sample values) - row_count: Number of rows returned - column_count: Number of columns - execution_time_ms: Query execution time

post/api/context-agent/execute-query

Request

  • Base URL: https://app.getdot.ai (the document declares no server; this is the origin it was published from)
  • URL: https://app.getdot.ai/api/context-agent/execute-query
  • Auth: one of:
    • API key in header X-API-KEY
    • API key in cookie Authorization
    • OAuth 2 (password, token URL /api/auth/token)

Request body

querystring required
table_namestring required
max_rowsinteger

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.