Skip to content

Batch start a new deployment for each stack in a list of stacks

POST
/v1/deployments/{org_uuid}/{deployment_uuid}/stacks

Create a new deployment for each stack in a list of stacks with the status of pending.
Stacks that are not yet known in the database identified by (repository, meta_id) will be created.

A list of Stack IDs will be returned with the status created.

If new stacks are created, they will be assigned the status unknown if no status is available in the payload.

Access

  • Members of the organization with member role.
  • Trusted GitHub Owner.

Authorizations

apiKey

API key as username in Basic Authorization with
empty password.

TypeAPI Key (header: Authorization)
or
jwtToken
TypeHTTP (bearer)

Parameters

Path Parameters

org_uuid*

UUID of the organization

Typestring
Required
format"uuid"
deployment_uuid*

UUID of the deployment

Typestring
Required
format"uuid"

Request Body

application/json
JSON
{
"review_request": {
"platform": "github",
"repository": "github.com/terramate-io/iac-gcloud",
"commit_sha": "deadc0decafebabecafed00ddeadbeeff00dface",
"branch": "some-branch-name",
"base_branch": "main",
"number": 23,
"title": "feat: Add feature X",
"description": "My Change Description with a lot of details. ",
"url": "https://github.com/terramate-io/iac-gcloud/pull/666",
"created_at": "string",
"updated_at": "string",
"pushed_at": "string",
"author": {
"login": "hacker",
"avatar_url": "https://avatar.url/hacker",
"id": "id"
},
"reviewers": [
{
"login": "hacker",
"avatar_url": "https://avatar.url/hacker",
"id": "id"
}
],
"labels": [
{
"name": "label1",
"color": "#000000",
"description": "label description"
}
],
"status": "open",
"draft": true,
"review_decision": "approved",
"changes_requested_count": 1,
"approved_count": 1,
"checks_total_count": 1,
"checks_failure_count": 1,
"checks_success_count": 1
},
"stacks": [
{
"commit_sha": "deadc0decafebabecafed00ddeadbeeff00dface",
"repository": "github.com/terramate-io/iac-gcloud",
"target": "staging",
"from_target": "staging",
"path": "/stacks/organizations/terramate.io/landing-zone/iam",
"default_branch": "main",
"meta_id": "deadbeef-babe-d00d-face-badc0de11111",
"meta_name": "My Stack Name",
"meta_description": "My Stack Description",
"meta_tags": [
[
"tagA",
"tagB"
]
],
"deployment_url": "https://github.com/terramate-io/iac-gcloud/actions/runs/5146438941",
"deployment_cmd": "terraform apply"
}
],
"workdir": "/users/terraform/checkouts/terramate",
"metadata": {
"additionalProperties": "string"
}
}

Responses

Created

application/json
JSON
[
{
"meta_id": "deadbeef-babe-d00d-face-badc0de11111",
"stack_id": 42,
"target": "staging",
"status": "string"
}
]

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI