---
title: "Get Clickhouse Queries"
method: GET
path: "/api/langfuse/queries"
tags: ["langfuse"]
---

# Get Clickhouse Queries

`GET /api/langfuse/queries`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/api/langfuse/queries`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Get ClickHouse queries from Langfuse observations.

Fetches observations with name 'mcp__altimate__clickhouse_query' from Langfuse
within the specified date range. Returns paginated results.

## Query parameters

- `start_date` string, nullable: Start date in ISO format
- `end_date` string, nullable: End date in ISO format
- `page` integer: Page number
- `limit` integer: Results per page

## Response `200`

Successful Response

- LangfuseQueriesResponse: Response containing ClickHouse queries.
  - `queries` ClickHouseQueryDetail[]: List of queries
    - `id` string, required: Observation ID
    - `query` string, required: SQL query text
    - `tables` string[]: Tables referenced
    - `session_id` string, nullable: Session ID if available
    - `trace_id` string, required: Trace ID
    - `user_id` string, nullable: User ID
    - `tenant` string, required: Tenant name
    - `executed_at` string, date-time, required: Execution timestamp
    - `duration_ms` number, nullable: Execution duration in ms
    - `status` string, required: Execution status
    - `error_message` string, nullable: Error message if failed
    - `result_preview` object[], nullable: Preview of query results
  - `total_pages` integer, required: Total number of pages
  - `current_page` integer, required: Current page number
  - `has_more` boolean: Whether there are more pages
  - `langfuse_project_id` string, nullable: Langfuse project ID for constructing trace links

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
