---
title: "Resolve the last known-good version to roll back to"
method: GET
path: "/apps/{appRef}/rollback/last-good"
tags: ["Versions"]
---

# Resolve the last known-good version to roll back to

`GET /apps/{appRef}/rollback/last-good`

## Request

- Base URL: `https://api.percher.run`
- URL: `https://api.percher.run/apps/{appRef}/rollback/last-good`
- Auth: HTTP bearer

Returns the most recent PRIOR version that reached live and was not crash-looped or auto-suspended afterwards. The current live version is skipped (rolling back to itself is a no-op).

## Path parameters

- `appRef` string, required

## Response `200`

Last known-good version

- object
  - `commitSha` string
  - `deployId` string
  - `note` string, nullable
  - `finishedAt` string, date-time, nullable

## Other responses

- `404`: No qualifying prior version (code NO_LAST_GOOD)

---

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