Deployments
How your Bash is set up, in versions: apply a whole vestra.yaml, promote, roll back, and the interview that drafts the file.
POST/v1/deployments/{deployment_id}/versions/{version}/promoteMake it live.
Refused unless its latest test run passed.
Request3 fields
Path
deployment_idstringrequiredThe deployment's id (dep_...). The /v1/deployments routes also take its name.
- Type
string
versionstringrequiredThe version number: 1 is the first, and each save adds one.
- Type
string
Headers
Idempotency-KeystringSend the same key to retry this call safely for 24 hours.
- Type
string
Answers 2003 fields
deploymentobjectThe deployment, after the promotion.
idstringThe deployment's id.
- Example
dep_8f2k
object"deployment"Always deployment.
- Type
"deployment"
namestringIts name, as people read it.
- Type
string
slugstringIts name in URLs and refs: send it where a route takes {deployment_id}.
- Example
trip-rescue
descriptionstringWhat it is for; empty when none was given.
- Type
string
base"bash"What it is built on: always bash.
- Type
"bash"
status"active" | "archived"active, or archived (put away: no new conversation or version reaches it).
- Type
"active" | "archived"
draft_versionintegerThe version test keys run. A new save moves it there; a promote with a test key moves it to the version named, older ones included.
- Type
integer
live_versioninteger | nullThe version live keys run; null until one is promoted.
- Type
integer | null
created_atstringWhen it was made, as an ISO 8601 date and time in UTC.
- Type
string
updated_atstringWhen it last changed, as an ISO 8601 date and time in UTC.
- Type
string
promotionobject | nullWhat moved; null when the version was already live, so nothing did.
object"deployment_promotion"Always deployment_promotion.
- Type
"deployment_promotion"
deployment_idstringThe deployment's id.
- Example
dep_8f2k
action"promote" | "rollback"promote (a version went live) or rollback (an earlier one went back live).
- Type
"promote" | "rollback"
from_versioninteger | nullThe version live before; null when none was.
- Type
integer | null
to_versionintegerThe version live now.
- Type
integer
verdict"passed" | "failed" | "none" | "rollback"The version's tests when it went live: passed, none (there were none to run), or rollback.
- Type
"passed" | "failed" | "none" | "rollback"
created_atstringWhen it went live, as an ISO 8601 date and time in UTC.
- Type
string
became_defaultbooleanTrue when this made the deployment the company's default: an ask that names no deployment now reaches it.
- Type
boolean
No sample in your language for this route, so here it is over HTTP.
curl -X POST "$VESTRA_BASE_URL/v1/deployments/{deployment_id}/versions/{version}/promote" \ -H "Authorization: Bearer $VESTRA_API_KEY"