Sites

Label a version

Gives a version a name, like "before launch", unique per site. A labeled version is kept beyond the plan's retention period; the plan sets how many labels a site can have. label null removes it.

put/sites/{id}/versions/{versionId}/label

Request

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

labelstring nullable required

A name for this version, like "before launch" (1 to 60 characters, unique per site). null or an empty string removes it.

Response

The version with its label.

object'site_version' required
idstring uuid required

The id of the version: use it for get_site_diff, rollback_site, promote_site_version and label_site_version.

numberinteger required

The number of the version within the site: 1, 2, 3 and so on.

site_idstring uuid required
created_atstring required

When this version was made (ISO 8601).

cause'baseline' | 'deploy' | 'partial_deploy' | 'import' | 'approved_deploy' | 'rollback' | 'promote' | 'preview' | 'file_restore' required

What made it: a deploy, a partial deploy (keep_existing), an import, a deploy after four-eyes approval, a rollback, a promoted preview, a preview, a few files restored from an older version (file_restore), or baseline (how the site was when its history started).

messagestring nullable required

The message sent with the deploy, if any.

filesinteger required
bytesinteger required
currentboolean required

true for the version that is live now.

previewboolean required

true for a preview that never went live.

preview_urlstring nullable required

The secret address of a preview (not indexed). Share it only with people who should see it.

labelstring nullable required
labeled_atstring nullable required
restored_fromstring uuid nullable required

For a rollback or promote: the version it came from.

expires_atstring nullable required

When the retention of the plan removes it; null for the current version, labeled versions and checkpoints.

auto_label'before big change' | 'stable' | 'held by guardrail' | 'null' nullable required

A marker Hypamoon sets itself, apart from label: "before big change" is the version that was live when a deploy hit the guardrail (kept like a labeled version), "stable" a version that stayed live for at least 24 hours and was not rolled back (both good versions to go back to), and "held by guardrail" a preview the guardrail made instead of putting a deploy live.

Changes

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