API ReferenceContext Repository
Add a tag to a release
Adds one tag to a published release, moving it off whichever release held it before.
POST /context/v1/releases/{release}/tags/{tag}
Adds one tag to a published release, moving it off whichever release held it before. Safe to repeat. It changes no release number and no object version.
Requires the context:assets scope.
Parameters
| Parameter | Location | Required | Description |
|---|---|---|---|
release | path | yes | The release number. |
tag | path | yes | The tag to add. |
Responses
| Status | Meaning |
|---|---|
200 | The request succeeded. |
401 | The token is missing, expired or invalid. |
403 | The token does not carry the scope this operation requires. |
404 | No such project, or the token belongs to a different project. |
422 | The request was not valid: a parameter or the body failed validation. |
The 200 response body:
| Field | Type | Required | Description |
|---|---|---|---|
changeset_id | string | yes | The changeset whose publication made this release. |
changeset_revision | integer or null | no | The revision the changeset was at when it was published. |
created_at | string | yes | When the release was made. |
created_by | object | yes | Who published it and why. |
deleted | array of string | yes | The ids of the objects this release retired. |
name | string or null | no | The 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_versions | map of integer | yes | The version of every object as this release published it. |
project_id | string | yes | The project the release belongs to. |
release | integer | yes | The release number. Each published change makes the next. |
tag_history | array of object | yes | Every time a tag was added to or removed from this release, oldest first. |
tags | array of string | yes | The tags this release carries. |
Example
curl -sS -X POST "$API_URL/context/v1/releases/$RELEASE/tags/$TAG" \
-H "Authorization: Bearer $TOKEN"