---
title: "List a policy version's backtests"
method: GET
path: "/api/policy_version/{version}/backtest"
tags: ["Policy Backtests"]
---

# List a policy version's backtests

`GET /api/policy_version/{version}/backtest`

## Request

- Base URL: `https://app.herondata.io`
- URL: `https://app.herondata.io/api/policy_version/{version}/backtest`
- Auth: API key in header `x-api-key`

Every backtest run against this version, newest first, with its result counts.

## Path parameters

- `version` integer, required

## Response `200`

OK

- object
  - `backtests` BacktestListingSchema[]
    - `baseline_mode` 'active' | 'as_evaluated'
    - `baseline_version` integer: Version number the run compared against
    - `candidate_version` integer: Version number the run tested
    - `created` string, date-time
    - `deal_count` integer, nullable: Deals the run claimed at setup
    - `deal_set_params` DealSetParams
      - `check_filter` DealSetCheckFilter
        - `check_identity` string
        - `result` string
        - `section_heron_id` string
      - `end_user_heron_ids` string[]
      - `limit` integer
      - `source_filter` DealSetSourceFilter
        - `names` string[]
        - `sender_addresses` string[]
        - `sender_domains` string[]
      - `window_end` string: ISO 8601, exclusive
      - `window_start` string: ISO 8601, inclusive
      - `with_policy_result` string[], nullable
    - `description` string, nullable
    - `error` string, nullable: Why the run failed, null unless it did
    - `finished_at` string, date-time, nullable
    - `heron_id` string
    - `result_counts` object: Deals per evaluation_result, every bucket present even at zero
    - `skipped_end_user_heron_ids` SkippedDeal[]
      - `end_user_heron_id` string
      - `reason` 'not_found' | 'not_backtestable_status'
    - `stale` boolean: The version has been edited since this run was asked for
    - `started_at` string, date-time, nullable
    - `status` 'pending' | 'running' | 'complete' | 'failed'
    - `triggered_by` string

## Other responses

- `404`: Policy version not found

## Changes

- **2026-11-03** `bd8008e49534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/herondata/apis/heron-data-api/changes/api/policy_version/:version/backtest/get.md)

---

[API](https://skmtc.dev/herondata/apis/heron-data-api.md) - [All operations](https://skmtc.dev/herondata/apis/heron-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/herondata/apis/heron-data-api/revisions/1ec936e17fef?raw)
