---
title: "Get managed warehouse Trino monitoring snapshot"
method: GET
path: "/api/projects/{project_id}/data_warehouse/managed-warehouse-trino-monitoring/"
tags: ["data_warehouse"]
---

# Get managed warehouse Trino monitoring snapshot

`GET /api/projects/{project_id}/data_warehouse/managed-warehouse-trino-monitoring/`

## Request

- Base URL: `https://us.posthog.com`
- URL: `https://us.posthog.com/api/projects/{project_id}/data_warehouse/managed-warehouse-trino-monitoring/`
- Auth: HTTP bearer

Get tenant-safe live Trino query totals, limits, and in-flight queries for the current organization.

## Path parameters

- `project_id` string, required

## Response `200`

Current organization-scoped Trino query activity.

- ManagedWarehouseTrinoMonitoringSnapshotResponse
  - `schema_version` integer, required: Version of the Trino monitoring response schema.
  - `org_id` string, required: Organization whose managed warehouse is represented.
  - `as_of` string, date-time, required: UTC timestamp when this snapshot was assembled.
  - `trino` ManagedWarehouseTrinoMonitoringState, required
    - `state` string, required: Trino lifecycle state for the organization: not_enabled, pending, provisioning, ready, or failed.
    - `ready_at` string, date-time, nullable, required: UTC timestamp when Trino became ready for the organization, or null.
    - `failed_at` string, date-time, nullable, required: UTC timestamp when Trino setup last failed for the organization, or null.
  - `available` boolean, required: Whether live query data could be read. When false, totals are zero and do not mean the warehouse is idle.
  - `limits` ManagedWarehouseTrinoMonitoringLimits, required
    - `max_running_queries` integer, required: Maximum number of the organization's queries that run at the same time. Zero when Trino is not enabled.
    - `max_queued_queries` integer, required: Maximum number of the organization's queries that can wait in the queue. Zero when Trino is not enabled.
  - `totals` ManagedWarehouseTrinoMonitoringTotals, required
    - `in_flight` integer, required: Queries submitted and not yet finished. Equals running plus queued.
    - `running` integer, required: In-flight queries past the queue. This is the count the concurrency limit applies to.
    - `queued` integer, required: Queries waiting for a running slot.
    - `blocked` integer, required: Running queries whose work is all waiting on data or metadata. A subset of running.
    - `longest_running_ms` integer, required: Elapsed milliseconds of the longest in-flight query, or zero when there is none.
    - `physical_input_bytes` integer, required: Bytes read so far by all in-flight queries.
  - `queries` ManagedWarehouseTrinoMonitoringQuery[], required: In-flight queries, longest-running first, capped at 200 rows.
    - `query_id` string, required: Trino query identifier.
    - `state` string, required: Trino query state in lower case, such as queued, planning, starting, running, or finishing.
    - `user` string, required: Warehouse username that ran the query. Blank when it cannot be resolved.
    - `source` string, required: Client-reported source of the query, such as a tool name. Blank when not set.
    - `query` string, required: SQL text with literal values replaced by ? and comments removed. A placeholder when unavailable.
    - `created_at` string, date-time, nullable, required: UTC timestamp when the query was submitted, or null when Trino does not report it.
    - `elapsed_ms` integer, required: Milliseconds since the query was submitted.
    - `queued_ms` integer, required: Milliseconds the query spent queued.
    - `cpu_ms` integer, required: CPU milliseconds the query has used.
    - `physical_input_bytes` integer, required: Bytes the query has read from storage.
    - `peak_memory_bytes` integer, required: Peak memory the query has reserved, in bytes.
    - `processed_input_rows` integer, required: Rows the query has read.
    - `progress_percentage` number, double, nullable, required: Best-effort progress percentage, or null when Trino cannot estimate it.
    - `blocked` boolean, required: Whether all of the query's work is waiting on data or metadata.
  - `queries_truncated` boolean, required: Whether the query list was capped. Totals always cover every in-flight query.

## Other responses

- `400`: The monitoring query parameters are invalid.
- `403`: Managed warehouse monitoring is not available to the caller.
- `404`: The organization does not have a managed warehouse, or this endpoint does not match its query engine.
- `501`: Managed warehouse monitoring is not configured.
- `502`: The managed warehouse monitoring service returned an invalid response or was unreachable.
- `504`: The managed warehouse monitoring service timed out.

## Changes

> 52 revisions in range; 1 not diffed.

- **2026-10-14** `43c0d2b00ce0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/posthog/apis/posthog-api/changes/api/projects/:project_id/data_warehouse/managed-warehouse-trino-monitoring/get.md)

---

[API](https://skmtc.dev/posthog/apis/posthog-api.md) · [All operations](https://skmtc.dev/posthog/apis/posthog-api/llms.txt) · [OpenAPI document](https://skmtc.dev/posthog/apis/posthog-api/revisions/71e64193672d?raw)
