Coelevate Documentation
API ReferenceContext Repository

Replace a release's tags

Sets the complete tag list of a published release.

PUT /context/v1/releases/{release}/tags

Sets the complete tag list of a published release. A tag names one release at a time, so setting a tag here moves it off whichever release held it, and every reader of that tag is then served this release. It changes no release number and no object version.

Requires the context:assets scope.

Parameters

ParameterLocationRequiredDescription
releasepathyesThe release number.

Request body

FieldTypeRequiredDescription
tagsarray of stringyesEvery tag the release should carry afterwards. It replaces the current list.

Responses

StatusMeaning
200The request succeeded.
401The token is missing, expired or invalid.
403The token does not carry the scope this operation requires.
404No such project, or the token belongs to a different project.
422The request was not valid: a parameter or the body failed validation.

The 200 response body:

FieldTypeRequiredDescription
changeset_idstringyesThe changeset whose publication made this release.
changeset_revisioninteger or nullnoThe revision the changeset was at when it was published.
created_atstringyesWhen the release was made.
created_byobjectyesWho published it and why.
deletedarray of stringyesThe ids of the objects this release retired.
namestring or nullnoThe release's canonical name, projects/{project}/releases/{release}. A request that takes a release in a query accepts this name in its place; a URL path takes the bare number. It is null when the id cannot be written in a canonical name.
object_versionsmap of integeryesThe version of every object as this release published it.
project_idstringyesThe project the release belongs to.
releaseintegeryesThe release number. Each published change makes the next.
tag_historyarray of objectyesEvery time a tag was added to or removed from this release, oldest first.
tagsarray of stringyesThe tags this release carries.

Example

A request body (ids and values are placeholders), saved as body.json:

{
  "tags": [
    "production"
  ]
}
curl -sS -X PUT "$API_URL/context/v1/releases/$RELEASE/tags" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d @body.json