---
title: "Search the run history"
method: GET
path: "/v1/runs/run-history"
tags: ["runs"]
---

# Search the run history

`GET /v1/runs/run-history`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/runs/run-history`
- Auth: HTTP bearer

Read-only run-history view backed by a SearchQuery (QueryProxy).

## Query parameters

- `q` string, nullable: ANTLR filter expression
- `limit` integer, nullable: Page size
- `sort_by` string, nullable: Sort expression (e.g. created_at:desc)
- `fields` string, nullable: Field projection (e.g. id,name)
- `pq` string, nullable: Pagination cursor query
- `from_prev` boolean: Backward pagination flag

## Headers

- `X-Tenant-Id` string, nullable

## Response `200`

Successful Response

- QueriesRunHistoryRunHistoryQuerySearchValidator: Typed cursor-paginated response envelope for the run history.
  - `items` RunHistoryRow[], required
    - `id` string, uuid, nullable
    - `trigger_code` string, nullable
    - `status_code` string, nullable
    - `model` string, nullable
    - `credits` integer, nullable: Credits fixed at the rate used when this run finished. Uses the current rate if no saved amount exists.
    - `total_tokens` integer, nullable
    - `created_at` string, date-time, nullable
    - `completed_at` string, date-time, nullable
    - `activity_title` string, nullable
    - `actor_id` string, uuid, nullable
    - `actor_label` string, nullable
  - `first` string, nullable
  - `next` string, nullable
  - `previous` string, nullable

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `422`: Validation error

---

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