---
title: "Refactoring Opportunities"
method: GET
path: "/snapshots/{snapshot_id}/refactoring/opportunities"
tags: ["code-health"]
---

# Refactoring Opportunities

`GET /snapshots/{snapshot_id}/refactoring/opportunities`

## Request

- Base URL: `https://api.repowise.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.repowise.dev/snapshots/{snapshot_id}/refactoring/opportunities`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/repowise/apis/repowise-hosted-api/docs/snapshots/:snapshot_id/refactoring/opportunities/get.ts> (a function with typed inputs; its response is checked against the schema)

One page of the ranked queue, with its facets and rollup.

`facets` count the whole set at the requested status rather than the page,
because they are the chips a person clicks to widen the filter. An
unrecognized filter value is reported in `ignored_arguments` rather than
rejected, so a stale bookmark degrades to the default view.

## Path parameters

- `snapshot_id` string, required

## Query parameters

- `refactoring_type` string, nullable: Lead refactoring type, or several comma-separated.
- `status` string: open | acknowledged | resolved | false_positive
- `confidence` string, nullable: low | medium | high
- `effort` string, nullable: S | M | L | XL
- `file_path` string, nullable: One repo-relative path.
- `search` string, nullable: Substring of a file path.
- `mechanical` boolean: Only sets with a mechanical step.
- `view` string: canonical | file_spread | diversified
- `order` string, nullable: queue | rank | health | effort | file
- `step_preview` integer: Steps inlined per row.
- `limit` integer
- `offset` integer

## Response `200`

Successful Response

- object

## 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/3037f631a606?raw)
