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.
View documentation for /project/services/patch-combined-service
Updates the version control source for a given build or combined service.
Required permission
Project > Services > General > Update
Path parameters
projectId
string requiredID of the projectserviceId
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\-._]|%[a-fA-F0-9]{2}){2,}))+?$projectType
stringThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azure, originprojectBranch
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-]+)|([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.
POST /v1/projects/{projectId}/services/{serviceId}/build-source
POST /v1/teams/{teamId}/projects/{projectId}/services/{serviceId}/build-source
Example request
Request body
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-sourceExample response
200 OK
The operation was performed successfully.
JSON
{
"data": {}
}