---
title: "List queries"
method: GET
path: "/api/v1/query/history"
tags: ["query"]
---

# List queries

`GET /api/v1/query/history`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in header `Authorization`

Lists the query log, newest first. Callers without access:view only see their own queries.

## Query parameters

- `source` string
- `decision` string
- `status` string
- `mrn` string
- `principal_type` string
- `principal_id` string
- `mine` boolean
- `client` string
- `from` string
- `to` string
- `q` string
- `limit` integer
- `offset` integer

## Response `200`

OK

- QueryHistoryResponse
  - `limit` integer
  - `offset` integer
  - `queries` QueryRecord[]
    - `audit_subject` string
    - `client` string
    - `completed_at` string
    - `context` QueryAssetContext[]
      - `asset_id` string
      - `description` string
      - `last_sync_at` string
      - `mrn` string
      - `name` string
      - `providers` string[]
      - `tags` string[]
      - `type` string
    - `decision` string
    - `decision_detail` object
    - `error` string
    - `id` string
    - `principal_id` string
    - `principal_type` string
    - `referenced_mrns` string[]
    - `rows_returned` integer
    - `source_id` string
    - `source_name` string
    - `started_at` string
    - `statement` string
    - `status` string
    - `truncated` boolean
  - `total` integer

## Changes

> 65 revisions in range; 1 not diffed.

- **2026-10-23** `18c57b576cb6`: 3 info
  - added the new optional `query` request parameter `from`
  - added the new optional `query` request parameter `q`
  - added the new optional `query` request parameter `to`
- **2026-10-22** `b5eb291dd2fe`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/marmotdata/apis/marmot-api/changes/api/v1/query/history/get.md)

---

[API](https://skmtc.dev/marmotdata/apis/marmot-api.md) - [All operations](https://skmtc.dev/marmotdata/apis/marmot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/marmotdata/apis/marmot-api/revisions/18c57b576cb6?raw)
