Restore a deleted branch
Reverses a delete of a branch created after this update was deployed: the branch reappears in branch lists and the branch selector with its changes intact, and a Reopened entry joins its review history. Every eligible deleted ancestor it depends on is restored with it, in one transaction, exactly the chain the restore preview lists (a merged ancestor comes back as an open branch that can be merged again; the reviews and description its merge moved onto the baseline stay there). A member whose parent was rebased after the member was deleted is rebased onto its parent’s current history as part of the restore, the migration it missed while deleted; the preview names each such member and the restore performs them root-most first. Send the preview’s ids as expected_chain_ids and expected_rebase_ids to be refused with 409 if either changed since. Refuses with 400 for the synthetic master branch or a malformed id, 404 when no eligible deleted branch with this id exists in this project, and 400, naming the branch, when the chain cannot be rebuilt: an ancestor row is gone, an ancestor predates restore support, or a member is the copy an extraction undo archived.
Authorizations
Headers
Workspace identifier
Path Parameters
Project UUID, not a slug. Resolve a slug with GET /project/slug/{slug} using the same workspace and credentials, then pass the returned id.
Body
The ids of the chain a restore preview showed, in its order. When present, the restore refuses with 409 if the chain it would restore now differs, so what was confirmed is what happens. Omit to restore whatever the chain is now.
The ids of the chain members the preview said would be rebased as part of the restore. When present alongside expected_chain_ids, the restore refuses with 409 if a different set would be rebased now, so a rebase is never performed unseen.