---
title: "Query run history"
method: GET
path: "/queries/history"
tags: ["Queries"]
---

# Query run history

`GET /queries/history`

## Request

- Base URL: `https://saturnsql.com/api`
- URL: `https://saturnsql.com/api/queries/history`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns the caller's recent query executions (SQL, connection, timing, status). Available to API keys with the `read` scope.

## Response `200`

History

- QueryHistoryEntry[]
  - `id` string
  - `sqlContent` string
  - `connectionId` string, nullable
  - `rowCount` integer
  - `executionTimeMs` integer
  - `errorMessage` string, nullable
  - `createdAt` string, date-time

## Other responses

- `401`: Bad or missing credentials

---

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