Git Branches

Contains APIs related to Git Sync Branch

Sync the content of new Git Branch into harness with Git Sync Config Id

Securityx-api-key
Request
query Parameters
repoIdentifier
required
string

Git Sync Config Id. [Applicable for Old Git Sync only]

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

branch
string

Name of the branch.

Responses
400

Bad Request

500

Internal Server Error

default

Returns True if the new Git Branch is successfully synced into Harness

post/ng/api/git-sync-branch/sync
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Lists branches with their status(Synced, Unsynced) by Git Sync Config Id for the given scope

Securityx-api-key
Request
query Parameters
yamlGitConfigIdentifier
required
string

Git Sync Config Id. [Applicable for Old Git Sync only]

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

page
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

size
integer <int32> <= 100

Results per page

searchTerm
string
Default: ""

Search Term.

branchSyncStatus
string

Used to filter out Synced and Unsynced branches

Enum: "SYNCED" "SYNCING" "UNSYNCED"
Responses
400

Bad Request

500

Internal Server Error

default

Returns a list of branches along with their status within the given scope

get/ng/api/git-sync-branch/listBranchesWithStatus
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}