Put an earlier version of a page back at the same URL.
Swaps the chosen snapshot back into the live page. Same id, same link, same read history, so nothing needs re-sending. The CURRENT content is snapshotted FIRST, as a new version with source restore, so this is itself undoable and the new version id comes back as new_version. Script hashes and the page title and description are recomputed from the restored HTML, exactly as a normal update does. SINGLE-FILE ONLY: on a multi-file page this puts index.html back and leaves the other files unchanged, and the response carries partial: true saying so. Owner-authed, and only for a page that is currently serving: a retired page answers 409 site_deleted and has to be restored with POST /sites/{idOrSlug}/restore first.
Request
- Base URL: https://api.stacktr.ee
- URL: https://api.stacktr.ee/sites/{idOrSlug}/versions/{versionId}/restore
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.stacktr.ee/oauth/authorize, token URL https://api.stacktr.ee/oauth/token, scopes: sites:write)
Response
Restored; the link now serves that version.
Changes
No recorded changes to this operation across all 1 revision of this API.