Jobs /
Update job build source
Deprecated
This endpoint is deprecated and will be removed in the future. Please avoid making requests to this endpoint.
Requests should instead use the relevant PATCH endpoint.
Updates the version control source for a given job.
Required permission
Project > Jobs > General > Update
Path parameters
projectId
string requiredID of the projectjobId
string requiredID of the job
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-hosted, azureprojectBranch
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-]+)|([0-9a-f]{24})$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.
API
CLI
JS Client
POST /v1/projects/{projectId}/jobs/{jobId}/build-source
Example request
Request body
curl
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}/jobs/{jobId}/build-sourceExample response
200 OK
The operation was performed successfully.
JSON
{
"data": {}
}