---
title: "List Performance Opportunities"
method: GET
path: "/snapshots/{snapshot_id}/health/performance-opportunities"
tags: ["code-health"]
---

# List Performance Opportunities

`GET /snapshots/{snapshot_id}/health/performance-opportunities`

One bounded page over the causal read model, with its plan links.

``summary`` describes the selected context rather than the page, so a
headline never contradicts the queue under it, and ``repository_total``
keeps the census beside it. ``facets`` narrows further, cross-filtering
each dimension by the others but never by itself, so picking one value
never zeroes the alternatives to it.

## Path parameters

- `snapshot_id` string, required

## Query parameters

- `context` 'production_tooling' | 'production' | 'tooling' | 'test' | 'unknown' | 'all'
- `boundary` string, nullable
- `confidence` string, nullable
- `actionability` string, nullable
- `view` string
- `sort` string
- `file_paths` string, nullable — Comma-separated, capped at 50.
- `limit` integer
- `offset` integer

## Response `200`

Successful Response

- PerformanceOpportunityPage
  - `items` PerformanceOpportunity[]
    - `opportunity_id` string, required
    - `performance_model_version` integer
    - `biomarker_type` string, required
    - `biomarker_types` string[]
    - `boundary_kind` string, nullable
    - `execution_context` 'production' | 'tooling' | 'test' | 'unknown', required
    - `terminal_sink` string, nullable
    - `shared_path_suffix` string[]
    - `intervention_symbol` string, nullable
    - `file_path` string
    - `affected_call_sites_total` integer
    - `affected_files_total` integer
    - `observations_total` integer
    - `evidence` PerformanceOpportunityEvidence[]
      - `finding_id` string
      - `file_path` string
      - `biomarker_type` string
      - `function_name` string, nullable
      - `line_start` integer, nullable
      - `line_end` integer, nullable
      - `reason` string
      - `path` string[]
      - `provenance` string
    - `evidence_truncated` boolean
    - `evidence_total` integer
    - `evidence_emitted` integer
    - `reliable_entry_reachability` boolean, nullable
    - `provenance` string
    - `confidence` 'high' | 'medium' | 'low'
    - `resource_fingerprints` string[]
    - `facets` object
    - `actionability_state` 'plan_ready' | 'advisory' | 'investigate'
    - `actionability_reason` string
    - `prerequisites` string[]
    - `rank_score` integer
    - `rank_position` integer
    - `rank_factors` object
    - `why_ranked` PerformanceWhyRanked[]
      - `factor` string, required
      - `points` integer
      - `value` unknown
    - `fix` PerformanceFix — The supported intervention, when one is provable.
      - `strategy` string, required
      - `safety` 'proven' | 'advisory', required
      - `rationale` string, required
    - `plan_id` string, nullable
    - `plan_status` 'available' | 'no_safe_plan' | 'not_persisted'
    - `plan_reason` string
  - `total` integer
  - `has_more` boolean
  - `next_offset` integer, nullable
  - `summary` PerformanceOpportunitySummary — Counts over the selected context, not over the requested page. Two scopes live here and the split is deliberate. ``total`` and the actionability, boundary and plan counts describe the selected context, so a headline never states a number the queue beneath it contradicts. The census - ``repository_total``, the per-context map, and the three flat totals - stays whole, because that is what names how many causes exist at all and what a client without facet counts labels its context tabs with.
    - `total` integer
    - `production_total` integer
    - `tooling_total` integer
    - `test_total` integer
    - `context` object
    - `with_plan_total` integer
    - `without_plan_total` integer
    - `status` 'current' | 'stale_model' | 'unavailable'
    - `repository_total` integer
    - `performance_model_version` integer
    - `materialized_model_version` integer
    - `analyzed_commit` string, nullable
    - `actionability` object
    - `boundary` object
    - `reason` string, nullable
    - `detail` string, nullable
  - `facets` object
  - `ignored_arguments` object, nullable
  - `state` string
  - `reason` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/repowise/apis/repowise-hosted-api/revisions/8c05b8b9a5c4?raw)
