Git Sync via API
Pull the latest rules, workflows and other entities from your connected remote Git repository into a workspace branch. Use it to bring a branch up to date from a CI/CD pipeline or script, without opening the Nected UI.
Starts a pull from your remote source into the workspace branch. The pull runs in the background, so the response returns straight away with a taskId and the current taskState.
The request needs no body. Authenticate with Nected-API-Key, and send Nected-Branch to choose the branch to pull into.
Your Nected API key.
Name of the workspace branch to pull into, for example main.
The pull has started.
Standard API response wrapper.
Bad Request. The branch name is invalid or the branch doesn't exist in the workspace.
Unauthorized. The Nected-API-Key header is missing, empty or invalid.
Internal Server Error
POST /dev/v1/remote/pull HTTP/1.1
Host: api.nected.ai
Nected-API-Key: YOUR_API_KEY
Accept: */*
{
"code": "",
"message": "",
"data": {
"taskId": "<TASK_ID>",
"taskState": "pending"
}
}Good to know
The pull runs in the background. The response returns right away with a
taskIdand ataskState, and the pull keeps running after that. Save thetaskIdso you can identify the pull.Task states:
pending(queued),in-progress(running),completed(finished successfully) andfailed(stopped with an error).Choose the branch with the
Nected-Branchheader. The branch must already exist in your workspace, and you need permission to pull on it.
Last updated