git-sync-branch

Gets list of branches with their status by Git Config Identifier

Request
Security:
ApiKey (readwrite)
query Parameters
yamlGitConfigIdentifier
string
accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
page
integer <int32>
Default: 0
size
integer <int32> <= 100
searchTerm
string
branchSyncStatus
string
Enum: "SYNCED" "SYNCING" "UNSYNCED"
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/ng/api/git-sync-branch/listBranchesWithStatus
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/git-sync-branch/listBranchesWithStatus?yamlGitConfigIdentifier=string&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&page=0&size=100&searchTerm=string&branchSyncStatus=SYNCED' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Sync the new branch into harness

Request
Security:
ApiKey (readwrite)
query Parameters
repoIdentifier
string
accountIdentifier
string
orgIdentifier
string
projectIdentifier
string
branch
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

post/ng/api/git-sync-branch/sync
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/git-sync-branch/sync?repoIdentifier=string&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&branch=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": true,
  • "metaData": { },
  • "correlationId": "string"
}