Git Full Sync

Contains APIs related to Git Full Sync

Create Configuration for Git Full Sync for the provided scope

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:

Details of the Git Full sync Configuration

branch
required
string

Name of the branch to which the entities will be pushed and from which pull request will be created.

repoIdentifier
required
string

Git Sync Config Id.

rootFolder
required
string

Path of the root folder inside which the entities will be pushed.

isNewBranch
boolean

Either true to create a new branch, or false to push entities to a existing branch.Default: false.

baseBranch
string

Name of the branch from which new branch will be forked out.

createPullRequest
boolean

If true a pull request will be created from branch to target branch.Default: false.

targetBranch
string

Name of the branch to which pull request will be merged.

prTitle
string

Title of the pull request.

newBranch
boolean
Responses
400

Bad Request

500

Internal Server Error

default

Returns the saved Configuration details for Git Full Sync.

post/ng/api/git-full-sync/config
Request samples
{
  • "branch": "string",
  • "repoIdentifier": "string",
  • "rootFolder": "string",
  • "isNewBranch": true,
  • "baseBranch": "string",
  • "createPullRequest": true,
  • "targetBranch": "string",
  • "prTitle": "string",
  • "newBranch": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Fetch Configuration for Git Full Sync for the provided scope

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

Returns the saved Git Full Sync Configuration for the provided scope.

get/ng/api/git-full-sync/config
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/git-full-sync/config?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List files in full sync along with their status

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

pageIndex
integer <int32>
Default: 0

Number of pages.

pageSize
integer <int32>
Default: 50

Number of Elements to fetch.

Array of objects (SortOrder)

Sort criteria for the elements.

searchTerm
string

Search Term.

Request Body schema:

Entity Type and Sync Status

entityTypes
Array of strings

List of entity Types to filter on the entities.

Items Enum: "Projects" "Pipelines" "PipelineSteps" "Http" "JiraCreate" "JiraUpdate" "JiraApproval" "HarnessApproval" "Barrier" "FlagConfiguration" "ShellScript" "K8sCanaryDeploy" "K8sApply" "K8sBlueGreenDeploy" "K8sRollingDeploy" "K8sRollingRollback" "K8sScale" "K8sDelete" "K8sBGSwapServices" "K8sCanaryDelete" "TerraformApply" "TerraformPlan" "TerraformDestroy" "TerraformRollback" "HelmDeploy" "HelmRollback" "Connectors" "Secrets" "Service" "Environment" "EnvironmentGroup" "InputSets" "CvConfig" "Verify" "Delegates" "DelegateConfigurations" "CvVerificationJob" "IntegrationStage" "IntegrationSteps" "SecurityStage" "SecuritySteps" "CvKubernetesActivitySource" "DeploymentSteps" "DeploymentStage" "ApprovalStage" "FeatureFlagStage" "Template" "Triggers" "MonitoredService" "GitRepositories" "FeatureFlags" "ServiceNowApproval" "ServiceNowCreate" "ServiceNowUpdate" "GovernancePolicies" "Policy" "Run" "RunTests" "Plugin" "RestoreCacheGCS" "RestoreCacheS3" "SaveCacheGCS" "SaveCacheS3" "Security" "ArtifactoryUpload" "GCSUpload" "S3Upload" "BuildAndPushGCR" "BuildAndPushECR" "BuildAndPushDockerRegistry"
syncStatus
string

Sync Status of the Entity that may be QUEUED, SUCCESS or FAILED.

Enum: "QUEUED" "SUCCESS" "FAILED" "OVERRIDDEN"
Responses
400

Bad Request

500

Internal Server Error

default

Returns the List of Files for Git Full sync.

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

Trigger Full Sync

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

Successfully Triggered Full Sync.

post/ng/api/git-full-sync
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/git-full-sync?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update Configuration for Git Full Sync for the provided scope

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:

Details of the Git Full sync Configuration

branch
required
string

Name of the branch to which the entities will be pushed and from which pull request will be created.

repoIdentifier
required
string

Git Sync Config Id.

rootFolder
required
string

Path of the root folder inside which the entities will be pushed.

isNewBranch
boolean

Either true to create a new branch, or false to push entities to a existing branch.Default: false.

baseBranch
string

Name of the branch from which new branch will be forked out.

createPullRequest
boolean

If true a pull request will be created from branch to target branch.Default: false.

targetBranch
string

Name of the branch to which pull request will be merged.

prTitle
string

Title of the pull request.

newBranch
boolean
Responses
400

Bad Request

500

Internal Server Error

default

Returns the updated Git Full Sync Configuration for the provided scope.

put/ng/api/git-full-sync/config
Request samples
{
  • "branch": "string",
  • "repoIdentifier": "string",
  • "rootFolder": "string",
  • "isNewBranch": true,
  • "baseBranch": "string",
  • "createPullRequest": true,
  • "targetBranch": "string",
  • "prTitle": "string",
  • "newBranch": true
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}