Git Sync

Contains APIs for CRUD on Git Sync

Update existing Git Sync Config default root folder by Identifier

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Git Sync Config Id

folderIdentifier
required
string

Folder Id

query Parameters
projectId
string

Project Identifier for the Entity

organizationId
string

Organization Identifier for the Entity

accountId
string

Account Identifier for the Entity

Responses
400

Bad Request

500

Internal Server Error

default

Updated Git Sync Config default root folder

put/ng/api/git-sync/{identifier}/folder/{folderIdentifier}/default
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/ng/api/git-sync/:identifier/folder/:folderIdentifier/default?projectId=string&organizationId=string&accountId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Check whether Git Sync is enabled for given scope or not

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
string

Account Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

Responses
400

Bad Request

500

Internal Server Error

default

Result of whether Git Sync is enabled for the scope

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

Lists Git Sync Config for the given scope

Request
Security:
ApiKey (readwrite)
query Parameters
projectIdentifier
string

Project Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

accountIdentifier
string

Account Identifier for the Entity

Responses
400

Bad Request

500

Internal Server Error

default

List of Git Sync Config for the given scope

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

Update existing Git Sync Config by Identifier

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
string

Account Identifier for the Entity

Request Body schema:

Details of Git Sync Config

identifier
string

Git Sync Config Id

name
string

Repo Name

projectIdentifier
string

Project Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

gitConnectorRef
string

Referenced Connector Identifier

repo
string

Repo Url

branch
string

Branch Name

gitConnectorType
required
string

Connector Type

Enum: "K8sCluster" "Git" "Splunk" "AppDynamics" "Prometheus" "Dynatrace" "Vault" "AzureKeyVault" "DockerRegistry" "Local" "AwsKms" "GcpKms" "AwsSecretManager" "Gcp" "Aws" "Artifactory" "Jira" "Nexus" "Github" "Gitlab" "Bitbucket" "Codecommit" "CEAws" "CEAzure" "GcpCloudCost" "CEK8sCluster" "HttpHelmRepo" "NewRelic" "Datadog" "SumoLogic" "PagerDuty" "CustomHealth" "ServiceNow"
Array of objects (GitSyncFolderConfig)

List of all Root Folder Details

Responses
400

Bad Request

500

Internal Server Error

default

Updated Git Sync Config

put/ng/api/git-sync
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string",
  • "gitConnectorRef": "string",
  • "repo": "string",
  • "branch": "string",
  • "gitConnectorType": "K8sCluster",
  • "gitSyncFolderConfigDTOs": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Creates Git Sync Config in given scope

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
string

Account Identifier for the Entity

Request Body schema:

Details of Git Sync Config

identifier
string

Git Sync Config Id

name
string

Repo Name

projectIdentifier
string

Project Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

gitConnectorRef
string

Referenced Connector Identifier

repo
string

Repo Url

branch
string

Branch Name

gitConnectorType
required
string

Connector Type

Enum: "K8sCluster" "Git" "Splunk" "AppDynamics" "Prometheus" "Dynatrace" "Vault" "AzureKeyVault" "DockerRegistry" "Local" "AwsKms" "GcpKms" "AwsSecretManager" "Gcp" "Aws" "Artifactory" "Jira" "Nexus" "Github" "Gitlab" "Bitbucket" "Codecommit" "CEAws" "CEAzure" "GcpCloudCost" "CEK8sCluster" "HttpHelmRepo" "NewRelic" "Datadog" "SumoLogic" "PagerDuty" "CustomHealth" "ServiceNow"
Array of objects (GitSyncFolderConfig)

List of all Root Folder Details

Responses
400

Bad Request

500

Internal Server Error

default

Successfully created Git Sync Config

post/ng/api/git-sync
Request samples
{
  • "identifier": "string",
  • "name": "string",
  • "projectIdentifier": "string",
  • "orgIdentifier": "string",
  • "gitConnectorRef": "string",
  • "repo": "string",
  • "branch": "string",
  • "gitConnectorType": "K8sCluster",
  • "gitSyncFolderConfigDTOs": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}