---
title: "Get query detail by statement ID"
method: GET
path: "/api/v1/databricks/queries/{statement_id}"
tags: ["DATABRICKS", "Databricks", "Databricks Queries"]
---

# Get query detail by statement ID

`GET /api/v1/databricks/queries/{statement_id}`

Get detailed information for a specific query by statement ID.

## Path parameters

- `statement_id` string, required

## Query parameters

- `navigationSource` string, nullable

## Headers

- `x-tenant` string, required

## Response `200`

Successful Response

- QueryDetailResponse — Response for query detail.
  - `query` QueryDetail, required — Detailed query information.
    - `statement_id` string, required
    - `statement_text` string, nullable
    - `statement_type` string, nullable
    - `execution_status` string, nullable
    - `start_time` string, date-time, nullable
    - `end_time` string, date-time, nullable
    - `total_duration_ms` integer, nullable
    - `waiting_for_compute_duration_ms` integer, nullable
    - `waiting_at_capacity_duration_ms` integer, nullable
    - `execution_duration_ms` integer, nullable
    - `compilation_duration_ms` integer, nullable
    - `read_bytes` integer, nullable
    - `written_bytes` integer, nullable
    - `read_rows` integer, nullable
    - `produced_rows` integer, nullable
    - `read_partitions` integer, nullable
    - `total_partitions` integer, nullable
    - `read_files` integer, nullable
    - `spilled_local_bytes` integer, nullable
    - `spilled_remote_bytes` integer, nullable
    - `result_fetch_duration_ms` integer, nullable
    - `workspace_id` string, nullable
    - `workspace_name` string, nullable
    - `warehouse_id` string, nullable
    - `warehouse_name` string, nullable
    - `warehouse_size` string, nullable
    - `cluster_id` string, nullable
    - `cluster_name` string, nullable
    - `pipeline_id` string, nullable
    - `pipeline_name` string, nullable
    - `job_id` string, nullable
    - `compute_display` string, nullable — Resolved compute label for the detail-page Compute metric. Same composition rule as the unified queries list — see ``UnifiedQueryRecord.compute_display`` for details.
    - `dbus` number, nullable — DBUs consumed by this query
    - `estimated_cost_usd` number, nullable — Estimated cost in USD from dbx_query_cost table
    - `user_name` string, nullable
    - `error_message` string, nullable
    - `canUseResultCache` boolean, nullable
    - `resultFetchedFromCache` boolean, nullable
    - `insights` string[] — List of insight tags (slow_query, disk_spill, full_table_scan, failed)

## Other responses

- `403` — Not authorized
- `404` — Query not found
- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/versions/50769cbf05d5/schema)
