/api/agent

POST /api/agent/v2/construct-query

Changed on

Construct an MBQL query from a portable MBQL 5 representations JSON payload.

The body is {"query": <external-query>} where <external-query> is a JSON object matching ::lib.schema/external-query — see the construct_notebook_query tool documentation for the format reference. Returns a base64-encoded MBQL query that can be executed via /v1/execute or paginated via /v2/query.

post/api/agent/v2/construct-query

Request

  • Base URL
    (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header X-API-Key

Request body

promptstring nullable
queryobject required

Value must be a map.

Response

Successful response

promptstring nullable

value must be a non-blank string.

querystring required

value must be a non-blank string.

Changes

    • breaking

      the request property type changed from no type to object

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      endpoint added