latestOpenAPI 3.1.02026-08-20118232229.3 KB

0e42b0fb26d9

Deploy app

Deploy a new version of an app. Accepts either a TAR file upload (application/tar) or a JSON body with source_uri (application/json) for deploying from a GitHub repository.

post/apps/{name}/deploy

Path parameters

namestring required

The name of the app to deploy.

The name of the app to deploy.

Query parameters

environmentstring

The environment to deploy to.

The environment to deploy to.

all_environmentsboolean

Whether to deploy to all environments for this app. If true, the 'environment' query parameter is ignored.

Whether to deploy to all environments for this app. If true, the 'environment' query parameter is ignored.

Headers

X-Tower-Checksum-SHA256string

The SHA256 hash of the content, used to verify integrity.

The SHA256 hash of the content, used to verify integrity.

X-Tower-Idempotency-Keystring

Optional opaque key (typically a git commit SHA or CI build ID). If a prior deploy for this app supplied the same value, the server reuses that AppVersion instead of creating a new one — letting consecutive deploys to different environments share a single version when the source hasn't changed.

Optional opaque key (typically a git commit SHA or CI build ID). If a prior deploy for this app supplied the same value, the server reuses that AppVersion instead of creating a new one — letting consecutive deploys to different environments share a single version when the source hasn't changed.

X-Tower-Request-Numberinteger

Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.

Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.

Content-Lengthinteger

Size of the uploaded bundle in bytes.

Size of the uploaded bundle in bytes.

Request body

source_uristring uri required

GitHub repository URL for deploying from source

Example request

{
  "source_uri": "https://github.com/tower/tower-examples/tree/main/01-hello-world"
}

Response

Created

$schemastring uri

A URL to the JSON Schema for this object.

Example response

{
  "$schema": "https://api.tower.dev/v1/schemas/DeployAppResponse.json"
}