Read the branch head from GitHub now and build it if it is new.
POST
/api/v1/projects/{project}/environments/{environment}/apps/{app}/source/sync
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/source/sync';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/example/environments/example/apps/example/source/syncParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project
required
string
Project name
environment
required
string
Environment short name
app
required
string
App name
Responses
Section titled “Responses”Media typeapplication/json
object
installationId
required
The GitHub App installation; 0 when the source reads through a connection.
integer format: int64
repository
required
string
branch
required
string
strategy
required
string
context
required
string
dockerfile
string | null
imageRepository
required
string
head
The last head read from GitHub.
string | null
syncOperation
The sync this change or request queued, if any.
string | null
provider
required
github (a personal or fine-grained token; the GitHub App has its
installations), gitlab, or gitea (Gitea and Forgejo).
string
connection
The Git connection the source reads through; none for a GitHub App installation.
string | null
Example
{ "strategy": "auto", "provider": "github"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}