Jobs /
Update job deployment
Required permission
Project > Services > Deployment > Update Deployment
Path parameters
projectId
string requiredID of the project
jobId
string requiredID of the job
Request body
- {object}
An external deployment
external
{object} requiredimagePath
string requiredImage to be deployed. When not deploying from Dockerhub the URL must be specified.
pattern^(?:(?:https?:\/\/)?([a-zA-Z0-9\-]+\.[a-zA-Z0-9\.\-]+)(\/v1)?)?(?:\/)?([a-zA-Z/-9\.\-_]+)(?:\:([a-zA-Z/-9\.\-_\:]+)|\@([a-zA-Z/-9\.\-_\:]+))$credentials
stringID of the saved credentials to use to access this external image.
pattern^[A-Za-z0-9-]+$
- {object}
An internal deployment
internal
{object} requiredid
stringID of the build service to deploy
pattern^[A-Za-z0-9-]+$branch
stringBranch to deploy
buildSHA
Commit SHA to deploy, or 'latest' to deploy the most recent commit
buildId
stringID of the build that should be deployed
POST /v1/projects/{projectId}/jobs/{jobId}/deployment
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"external":{"imagePath":"nginx:latest","credentials":"example-credentials"}}' \
http://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/deployment
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"internal":{"id":"example-build-service","branch":"master","buildSHA":"latest","buildId":"premium-guide-6393"}}' \
http://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/deployment
Example response
200 OK