Services /
Start service build
Required permission
Project > Services > Deployment > Deploy Build
Path parameters
projectId
string requiredID of the project
serviceId
string requiredID of the service
Request body
- {object}
Start a build with the current settings
sha
stringCommit sha to build. If not provided, builds the most recent relevant commit.
branch
stringBranch to build from. If
sha
is not provided, the latest commit of this branch will be built. Only supported by build services. Build services require eitherbranch
orpullRequestId
field, but cannot be provided with both.pullRequestId
integerID of a pull request to build from. If
sha
is not provided, the latest commit of this pull request will be built. Only supported by build services. Build services require eitherbranch
orpullRequestId
field, but cannot be provided with both.
- {object}
Start a build with overrides for the current settings
sha
stringCommit sha to build. If not provided, builds the most recent relevant commit.
branch
stringBranch to build from. If
sha
is not provided, the latest commit of this branch will be built. Only supported by build services. Build services require eitherbranch
orpullRequestId
field, but cannot be provided with both.pullRequestId
integerID of a pull request to build from. If
sha
is not provided, the latest commit of this pull request will be built. Only supported by build services. Build services require eitherbranch
orpullRequestId
field, but cannot be provided with both.overrides
{object}An optional object that may specify several different overrides on the build level.
buildArguments
{object}Build arguments that will be set on this build only. In case of conflicts these values take precedence.
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredID of the build.
branch
stringName of the branch the built commit belongs to.
pullRequestId
numberID of the pull request the commit belongs to.
sha
stringThe sha of the built commit.
createdAt
stringTimestamp of the build initiation.
status
stringThe status of the build.
concluded
booleanWhether the build has finished.
POST /v1/projects/{projectId}/services/{serviceId}/build
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"sha":"262ed9817b3cad5142fbceabe0c9e371e390d616"}' \
http://api.northflank.com/v1/projects/{projectId}/services/{serviceId}/build
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"sha":"262ed9817b3cad5142fbceabe0c9e371e390d616","overrides":{"buildArguments":{"ARGUMENT_1":"abcdef","ARGUMENT_2":"12345"}}}' \
http://api.northflank.com/v1/projects/{projectId}/services/{serviceId}/build
Example response
200 OK
JSON
{
"data": {
"id": "joyous-view-6290",
"branch": "main",
"sha": "12c15e7ee25fd78f567ebf87f9178b8ad70025b3",
"createdAt": "2021-07-28T15:55:38.296Z",
"status": "PENDING",
"concluded": false
}
}