Build the app from a Git repository and branch, or change how.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/source';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"installationId":1,"connection":"example","repository":"acme/shop","branch":"main","strategy":"auto","context":"apps/web","dockerfile":"example","imageRepository":"registry.example.com/acme/shop"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/projects/example/environments/example/apps/example/source \ --header 'Content-Type: application/json' \ --data '{ "installationId": 1, "connection": "example", "repository": "acme/shop", "branch": "main", "strategy": "auto", "context": "apps/web", "dockerfile": "example", "imageRepository": "registry.example.com/acme/shop" }'A change stops earlier builds from deploying themselves and builds the branch head again.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
App name
Request Bodyrequired
Section titled “Request Bodyrequired”object
A GitHub App installation linked to this organization. Required
unless connection is given.
A Git connection of this organization (its id), instead of an installation: GitLab, Gitea or a GitHub token.
Example
acme/shopExample
mainBuild context inside the repository; the root when empty.
Example
apps/webDockerfile relative to the context; Dockerfile when unset.
Where builds push, without tag or digest.
Example
registry.example.com/acme/shopResponses
Section titled “Responses”object
The GitHub App installation; 0 when the source reads through a connection.
The last head read from GitHub.
The sync this change or request queued, if any.
github (a personal or fine-grained token; the GitHub App has its
installations), gitlab, or gitea (Gitea and Forgejo).
The Git connection the source reads through; none for a GitHub App installation.
Example
{ "strategy": "auto", "provider": "github"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}