Sites

Roll a site back to an earlier version

Puts the files of an earlier version back live immediately. The rollback is itself a new version (cause rollback), so the history never loses anything and you can roll forward again. The same checks as for a deploy apply (abuse scan, plan limits, four-eyes approval). If the site already has exactly these files, nothing changes and unchanged is true: safe to retry. Send if_match_version to make sure nobody deployed in between. To restore only a few files, use POST /sites/{id}/restore-files.

post/sites/{id}/rollback

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/sites/{id}/rollback
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:write)

Path parameters

idstring uuid required

The id of the site.

Request body

version_idstring uuid

The id of the version to go back to, from list_site_versions.

numberinteger

Instead of version_id: the number of the version.

if_match_versionstring

Optional. The version of the site you are changing (version from get_site); if the site changed since, you get 409 version_conflict and nothing changes.

messagestring

Optional. A short description for the version history, like "Back to the old menu".

Response

The site as it is now live, with the new version.

unchangedboolean required

true: the site already had exactly these files, so nothing changed (safe to retry).

Changes

No recorded changes to this operation across all 1 revision of this API.