Enable auto-deploy for a branch
POST
/deployments/{id}/auto-deploy/enable
const url = 'https://example.com/deployments/example/auto-deploy/enable';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"branch":"example","paths":["example"]}'};
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/deployments/example/auto-deploy/enable \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "example", "paths": [ "example" ] }'Auth: authenticated (scope: deploy)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
branch
required
string
paths
Glob patterns a push must touch to trigger a build. Empty deploys on every push. Prefix a pattern with ! to exclude. Omit to leave unchanged.
Array<string>
Example generated
{ "branch": "example", "paths": [ "example" ]}Responses
Section titled “Responses”OK
Media typeapplication/json
object
autoDeployBranch
string | null
autoDeployEnabled
boolean
autoDeployPaths
Array<string>
buildCommand
string | null
builderOverride
string | null
buildError
string | null
buildFromRoot
boolean
buildLogs
string | null
buildStatus
required
string
buildStep
string | null
buildStepTimestamps
object | null
buildType
string
buildWithDepot
boolean
composeServiceName
string | null
composeStackId
string | null
cpuRequestMilli
number | null
createdAt
required
string
createdBy
string | null
deployStrategy
string
detectedConfig
object | null
dockerfileHealthCheck
object
command
required
Array<string>
interval
number
retries
number
startPeriod
number
timeout
number
dockerfilePath
string | null
dockerfileTarget
string | null
effectiveImagePullPolicy
What the cluster is actually doing, after deriving. Render this.
string
environmentId
string | null
envVars
Array<object>
object
createdAt
required
string
deploymentId
required
string
id
required
string
key
required
string
secret
required
boolean
updatedAt
required
string
value
required
string | null
key
additional properties
framework
string | null
githubBranch
string | null
githubRepo
string | null
healthCheckCommand
string | null
healthCheckEnabled
boolean
healthCheckInterval
number
healthCheckOverride
boolean
healthCheckPath
string | null
healthCheckPort
number | null
healthCheckRetries
number
healthCheckTimeout
number
healthCheckType
string
icon
string | null
id
required
string
image
string | null
imagePullPolicy
The override. null means it is derived from the image tag.
string | null
ingresses
Array<object>
object
annotations
object | null
clusterIssuer
string | null
createdAt
string
deploymentId
string | null
entrypoints
Array<string>
environmentId
string | null
host
required
string
id
required
string
ingressClass
string | null
name
required
string
namespace
string
path
required
string
pathType
string
projectId
string
protectionBypassSecret
string | null
protectionMode
string
redirectTarget
string | null
routes
Array<object>
object
path
required
string
serviceName
required
string
servicePort
required
number
key
additional properties
service
object
createdAt
required
string
deploymentId
required
string
domain
string | null
externalIp
string | null
id
required
string
internalUrl
string
internalUrls
Array<string>
name
required
string
nodePort
number | null
port
required
number
ports
Array<object>
object
id
required
string
name
string | null
nodePort
number | null
port
required
number
protocol
required
string
publicAddress
string | null
publicEnabled
boolean
publicPort
number | null
publicStatus
object
addresses
required
Array<string>
reason
required
string | null
state
required
string
serviceId
required
string
targetPort
required
number
key
additional properties
protocol
required
string
targetPort
required
number
type
required
string
updatedAt
required
string
key
additional properties
serviceId
string | null
statusAddress
string | null
templateInstanceId
string | null
tlsEnabled
boolean
tlsHosts
Array<string>
tlsSecretName
string | null
updatedAt
string
url
string
key
additional properties
installCommand
string | null
livenessEnabled
boolean
name
required
string
namespace
required
string
outputDirectory
string | null
persistentBuildCache
boolean
pods
Array<object>
object
containers
Array<object>
object
image
string | null
init
boolean
lastTermination
object
exitCode
number | null
finishedAt
string | null
reason
required
string | null
key
additional properties
message
string | null
name
required
string
ready
boolean
reason
string | null
restartCount
number
startedAt
string | null
state
string
key
additional properties
cpuUsage
number | null
createdAt
string | null
deletingAt
string | null
disruption
string | null
graceSeconds
number | null
id
string
ip
string | null
memoryUsage
number | null
name
required
string
nodeName
string | null
notReadySince
string | null
phase
string | null
podIp
string | null
probes
object
liveness
required
boolean
readiness
required
boolean
startup
required
boolean
readySince
string | null
reason
string | null
restartCount
number
revision
string | null
scheduled
boolean
schedulingMessage
string | null
slot
string | null
startTime
string | null
status
required
string
unschedulableSince
string | null
key
additional properties
project
object
id
required
string
name
required
string
organizationId
string
slug
string
key
additional properties
projectId
required
string
readinessEnabled
boolean
replicas
required
number
rollout
object
available
required
number
currentRevision
required
string | null
desired
required
number
previous
object
createdAt
required
string | null
hash
required
string
image
required
string | null
number
required
number
ready
required
number
replicas
required
number
ready
required
number
reason
required
string | null
revisions
required
Array<object>
object
createdAt
required
string | null
hash
required
string
image
required
string | null
number
required
number
ready
required
number
replicas
required
number
state
required
string
updated
required
number
rootDirectory
string | null
services
Array<object>
object
createdAt
required
string
deploymentId
required
string
domain
string | null
externalIp
string | null
id
required
string
internalUrl
string
internalUrls
Array<string>
name
required
string
nodePort
number | null
port
required
number
ports
Array<object>
object
id
required
string
name
string | null
nodePort
number | null
port
required
number
protocol
required
string
publicAddress
string | null
publicEnabled
boolean
publicPort
number | null
publicStatus
object
addresses
required
Array<string>
reason
required
string | null
state
required
string
serviceId
required
string
targetPort
required
number
key
additional properties
protocol
required
string
targetPort
required
number
type
required
string
updatedAt
required
string
key
additional properties
startCommand
string | null
startupEnabled
boolean
startupFailureThreshold
number
status
required
string
stopped
required
boolean
tailscaleExposed
boolean
tailscaleHostname
string | null
templateInstanceId
string | null
updatedAt
required
string
volumes
Array<object>
object
createdAt
string
deploymentId
string
hostPath
string | null
id
required
string
mountPath
required
string
name
required
string
pvcName
string | null
readOnly
required
boolean
storageSize
string | null
type
required
string
updatedAt
string
key
additional properties
warnings
Array<object>
object
message
string
podName
string
timestamp
string
key
additional properties
key
additional properties
Example
{ "builderOverride": "firecracker", "buildType": "dockerfile", "deployStrategy": "rollingUpdate", "effectiveImagePullPolicy": "Always", "imagePullPolicy": "Always", "ingresses": [ { "protectionMode": "none", "redirectStatus": 301, "service": { "ports": [ { "publicStatus": { "state": "ready" } } ], "type": "internal" } } ], "pods": [ { "containers": [ { "state": "running" } ] } ], "rollout": { "state": "stable" }, "services": [ { "ports": [ { "publicStatus": { "state": "ready" } } ], "type": "internal" } ], "volumes": [ { "type": "pvc" } ]}