Sites

Publish a preview

Publishes a preview (deploy_site with preview: true) as a new version (cause promote). The same checks as for a deploy apply, including four-eyes approval. Promoting twice changes nothing the second time.

post/sites/{id}/versions/{versionId}/promote

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/sites/{id}/versions/{versionId}/promote
  • 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.

versionIdstring uuid required

The id of the version, from list_site_versions.

Request body

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.