BashBrainTeammatesPricingDevelopersGet a test key

Deployments

How your Bash is set up, in versions: apply a whole vestra.yaml, promote, roll back, and the interview that drafts the file.

Send Authorization: Bearer vk_test_... on every call. Every route of Deployments.

GET/v1/deployments/{deployment_id}One deployment, by its id or its name: the live version and the draft.

With format=yaml, its latest version as vestra.yaml.

Your API key, scope setup or all. On the card: deploy. Every call here is a checked sample.

Request2 fields

Path

deployment_idstringrequiredThe deployment's id (dep_...). The /v1/deployments routes also take its name.
Type
string

Query

format"json" | "yaml"json (the default): the deployment. yaml: its newest version, as vestra.yaml.
Type
"json" | "yaml"
Answers 20011 fields
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
HTTP
# Publish a change. Send the whole file as JSON, by its name. The first call creates the deployment, and a# file that changes nothing makes no new version. Its tests run, and when they pass the version goes live in# your key's mode: test traffic with a test key, real users with a live key. A test plays your own tools with# tool_results. The first deployment you promote becomes the default, and every ask that names no deployment# goes to it. became_default is true when this call made it the default. If the call waits for tests, that# happens when they pass.curl -X PUT "$VESTRA_BASE_URL/v1/deployments/trip-rescue?promote=after_tests" \  -H "Authorization: Bearer $VESTRA_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "trip-rescue",    "instructions": "You help Tripnest travellers fix broken trips. Always offer two options.",    "apps": ["gmail", "google-calendar"],    "tools": [{ "function": "get_booking", "description": "A booking by its PNR", "input": { "pnr": "string" }, "read_only": true }],    "approvals": ["payment", "booking", "cancellation"],    "tests": [{      "name": "Bag allowance",      "ask": "How many kilos can I take on booking TN-48213?",      "expect": "Says 7 kg of cabin baggage.",      "tool_results": { "get_booking": { "cabin_kg": 7 } }    }]  }' # Read the file and its versions. The file comes back as YAML.curl "$VESTRA_BASE_URL/v1/deployments/trip-rescue?format=yaml" \  -H "Authorization: Bearer $VESTRA_API_KEY" curl "$VESTRA_BASE_URL/v1/deployments/dep_4kq/versions" \  -H "Authorization: Bearer $VESTRA_API_KEY" # Roll back to the previous version. The version that was live before comes back at once. This needs a live key.curl -X POST "$VESTRA_BASE_URL/v1/deployments/dep_4kq/rollback" \  -H "Authorization: Bearer $VESTRA_LIVE_KEY"
HTTP

No sample in your language for this route, so here it is over HTTP.

# Publish a change. Send the whole file as JSON, by its name. The first call creates the deployment, and a# file that changes nothing makes no new version. Its tests run, and when they pass the version goes live in# your key's mode: test traffic with a test key, real users with a live key. A test plays your own tools with# tool_results. The first deployment you promote becomes the default, and every ask that names no deployment# goes to it. became_default is true when this call made it the default. If the call waits for tests, that# happens when they pass.curl -X PUT "$VESTRA_BASE_URL/v1/deployments/trip-rescue?promote=after_tests" \  -H "Authorization: Bearer $VESTRA_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "trip-rescue",    "instructions": "You help Tripnest travellers fix broken trips. Always offer two options.",    "apps": ["gmail", "google-calendar"],    "tools": [{ "function": "get_booking", "description": "A booking by its PNR", "input": { "pnr": "string" }, "read_only": true }],    "approvals": ["payment", "booking", "cancellation"],    "tests": [{      "name": "Bag allowance",      "ask": "How many kilos can I take on booking TN-48213?",      "expect": "Says 7 kg of cabin baggage.",      "tool_results": { "get_booking": { "cabin_kg": 7 } }    }]  }' # Read the file and its versions. The file comes back as YAML.curl "$VESTRA_BASE_URL/v1/deployments/trip-rescue?format=yaml" \  -H "Authorization: Bearer $VESTRA_API_KEY" curl "$VESTRA_BASE_URL/v1/deployments/dep_4kq/versions" \  -H "Authorization: Bearer $VESTRA_API_KEY" # Roll back to the previous version. The version that was live before comes back at once. This needs a live key.curl -X POST "$VESTRA_BASE_URL/v1/deployments/dep_4kq/rollback" \  -H "Authorization: Bearer $VESTRA_LIVE_KEY"