Get Query

Get a saved query (and its link) by id.

Tool: draxlr_get_query

Gets the details of a saved query by its id — useful for resolving a query link into its name, description, and definition. The response includes the query type and a url to view it in Draxlr.

Draxlr has two query types, with different link shapes:

  • Raw (SQL): app.draxlr.com/explore/:databaseId/:queryId
  • Builder (built in the UI): app.draxlr.com/explore/:databaseId/:tableId/:queryId?saved=true

Parameters

ParameterTypeRequiredDescription
queryIdstringYesThe query id (the :queryId part of an /explore/... link)
databaseIdstringNoThe database id (the :databaseId part of the link), used to build the view url

Example

"What is this query? app.draxlr.com/explore/665f1c2a9b1e4a0012ab34cd/6690aa11bc2e4a0012cd77ee"

Arguments:

{
  "databaseId": "665f1c2a9b1e4a0012ab34cd",
  "queryId": "6690aa11bc2e4a0012cd77ee"
}

Response

{
  "query": {
    "id": "6690aa11bc2e4a0012cd77ee",
    "name": "Orders by status",
    "description": "Order counts grouped by status",
    "type": "raw",
    "rawQuery": "SELECT status, COUNT(*) AS orders FROM orders GROUP BY status",
    "databaseId": "665f1c2a9b1e4a0012ab34cd",
    "tableId": null,
    "tags": ["orders"],
    "createdAt": "2026-07-31T09:12:00.000Z",
    "updatedAt": "2026-07-31T09:12:00.000Z"
  },
  "url": "https://app.draxlr.com/explore/665f1c2a9b1e4a0012ab34cd/6690aa11bc2e4a0012cd77ee"
}
FieldDescription
queryThe saved query details
query.typeraw (SQL) or builder (built in the Draxlr UI)
query.rawQueryThe SQL, for raw queries (null for builder queries)
query.tableIdThe table a builder query is based on (null for raw queries)
urlA link to view the query in Draxlr (builder links include the tableId and ?saved=true)