Search QueryLog

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/querylog
API call form
Examples

Query logs record the data queries made by charts, dashboards and AI agents, whether in the Luzmo application or embedded in your own application, as well as any other data query whose context contains a chart_id or a query_source . A direct call to the Data service without either is not logged. A direct call that includes one is logged under the same conditions.

Only queries against a connected data source or a Warp-accelerated dataset are logged. Queries against data stored in Luzmo (e.g. uploaded or API-pushed datasets, and the Google Drive and Google Analytics connectors) are not logged, and neither are results served from the query cache. Failed queries are logged too, including queries rejected for an invalid query format.

Each log contains the timing, the outcome, the generated source query, and the dashboard, chart, datasets and connection involved. They are the API counterpart of the Query Logs page in the Luzmo application (more info in this Academy article ).

Query logs are read-only: they cannot be created, updated or deleted through the API, and they cannot be included in other resources.

Things to keep in mind:

  • Logs are kept for a 30-day retention period. Only logs started within the last 30 days are returned. A created_at filter in your request is replaced by this retention window, so use started_at to narrow down a time range.

  • Results are always scoped to your organization. Organization owners see the query logs of all users in the organization. Other users only see the queries they triggered themselves.

  • Only the filters, order fields and properties listed below are supported. Unknown properties (including attributes and include ) result in a validation error.

  • Results are not sorted by default. Specify an order (e.g. [["started_at", "desc"]] ) to get a consistent order when paginating.

The dashboard , datasets and connection properties of each log only contain the id of the entity if you no longer have access to it, or if it was deleted.

Request parametersResponse schema
count NUMBER

The number of records returned

rows ARRAY[OBJECT]
id UUID
organization_id UUID
started_at DATETIME
provider STRING
user_id UUID
duration_ms NUMBER
chart_id UUID
trace_id STRING
query_id UUID
generated_query STRING
failure_reason STRING
success BOOLEAN
source_query_id UUID
query_source STRING
warp_usage STRING
dashboard OBJECT
datasets ARRAY[OBJECT]
connection OBJECT
Can be executed by:
Organization Owner
Organization Member
Can be associated to:
Did this page help you?
Yes No
Language
Shell
Node
Java
.NET
Python
PHP
Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "count": 1,
  "rows": [
    {
      "id": "0c3f5a2e-7b1d-4e8a-9f62-3d5b8c1a7e40",
      "organization_id": "4a2b6c1d-8e3f-4a5b-9c7d-2e1f0a3b5c6d",
      "started_at": "2026-10-12T09:41:27.000Z",
      "provider": "postgresql",
      "user_id": "fde42af0-57f8-40e3-880c-3464d9a525ce",
      "duration_ms": 412,
      "chart_id": "9b8c7d6e-5f4a-4b3c-8d2e-1f0a9b8c7d6e",
      "trace_id": "6f1d2c3b4a5e4f6a8b7c9d0e1f2a3b4c",
      "query_id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
      "generated_query": "SELECT \"t1\".\"region\", SUM(\"t1\".\"amount\") FROM \"public\".\"orders\" AS \"t1\" GROUP BY \"t1\".\"region\"",
      "failure_reason": null,
      "success": true,
      "source_query_id": "c3d4e5f6-a7b8-4c9d-8e1f-2a3b4c5d6e7f",
      "query_source": null,
      "warp_usage": "none",
      "dashboard": {
        "id": "fb7bbb18-587f-494d-bd00-ff8b8f519941",
        "name": {
          "en": "Sales overview"
        },
        "thumbnails": [
          {
            "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
            "url": "https://cdn.luzmo.com/thumbnails/fb7bbb18-587f-494d-bd00-ff8b8f519941_128px.png",
            "size": "128px"
          }
        ]
      },
      "datasets": [
        {
          "id": "24aa02fe-d54d-4217-bd9d-dcdba45c83b3",
          "name": {
            "en": "Orders"
          },
          "subtype": "postgresql"
        }
      ],
      "connection": {
        "id": "7e0899a5-acd5-4235-8017-ff7ae208c88a",
        "name": "Production database"
      }
    }
  ]
}