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
| Parameter | Type | Required | Description |
|---|---|---|---|
queryId | string | Yes | The query id (the :queryId part of an /explore/... link) |
databaseId | string | No | The 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"
}
| Field | Description |
|---|---|
query | The saved query details |
query.type | raw (SQL) or builder (built in the Draxlr UI) |
query.rawQuery | The SQL, for raw queries (null for builder queries) |
query.tableId | The table a builder query is based on (null for raw queries) |
url | A link to view the query in Draxlr (builder links include the tableId and ?saved=true) |