Services /
Update service build source
Required permission
Project > Services > General > Update
Path parameters
projectId
string requiredID of the project
serviceId
string requiredID of the service
Request body
- {object}
projectUrl
stringURL of the Git repo to build.
pattern^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$projectType
stringThe VCS provider to use.
one ofbitbucket, gitlab, github, self-hostedprojectBranch
stringThe name of the branch to use.
selfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.
pattern^[A-Za-z0-9-]+\/[A-Za-z0-9-]+$accountLogin
stringBy default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If
accountLogin
is provided, Northflank will instead use your linked account with that login name.
Response body
- {object}
Response object.
data
{object} requiredResult data.
POST /v1/projects/{projectId}/services/{serviceId}/build-source
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"projectUrl":"https://github.com/northflank/gatsby-with-northflank","projectType":"github","projectBranch":"master","accountLogin":"github-user"}' \
https://api.northflank.com/v1/projects/{projectId}/services/{serviceId}/build-source
Example response
200 OK
JSON
{
"data": {}
}