Connectors

This contains APIs related to Connectors as defined in Harness

Validate the Connector by Account Identifier and Connector Identifier

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

identifier
string

Connector ID

Responses
400

Bad Request

500

Internal server error

default

It returns true if the Identifier is unique and false if the Identifier is not unique

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

Get the list of connectors by FQN satisfying the criteria (if any) in the request

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

Account Identifier for the Entity

Request Body schema:

List of ConnectorsFQN as strings

Array
string
Responses
400

Bad Request

500

Internal server error

default

Returns the list of Connectors

post/ng/api/connectors/listbyfqn
Request samples
[
  • "string"
]
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get the Template URL of connectorDeprecated

Request
Security:
ApiKey (readwrite)
query Parameters
eventsEnabled
boolean

Specify whether or not to enable events

curEnabled
boolean

Specify whether or not to enable CUR

optimizationEnabled
boolean

Specify whether or not to enable optimization

Responses
400

Bad Request

500

Internal server error

default

Returns the cloud formation template URL to configure the Cloud Cost AWS Connector

post/ng/api/connectors/getceawstemplateurl
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/connectors/getceawstemplateurl?eventsEnabled=true&curEnabled=true&optimizationEnabled=true' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get the allowed field values by Connector Type

Request
Security:
ApiKey (readwrite)
query Parameters
connectorType
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"
Responses
400

Bad Request

500

Internal server error

default

Returns all settings for the Connector type

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

Tests the Git Repo connection

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

Connector ID

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

repoURL
string

URL of the repository, specify only in the case of Account Type Git Connector

Responses
400

Bad Request

500

Internal server error

default

Returns the Connector validation result

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

Gets the Connector catalogue by Account Identifier

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

Account Identifier for the Entity

Responses
400

Bad Request

500

Internal server error

default

Returns the Connector catalogue response

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

Gets the connector's statistics by Account Identifier, Project Identifier and Organization Identifier

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

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal server error

default

Returns the Connector's statistics

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

Tests the connection of the Connector by ID

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

Connector ID

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal server error

default

Returns the Connector validation result

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

Get the Connector by accountIdentifier and connectorIdentifier

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

Connector Identifier

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal server error

default

Returns the connector with the requested accountIdentifier and connectorIdentifier

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

Deletes Connector by ID

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

Connector ID

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

File Path

commitMsg
string

Commit Message

lastObjectId
string

Last Object Id

Responses
400

Bad Request

500

Internal server error

default

It returns true if the Connector is deleted successfully and false if the Connector is not deleted

delete/ng/api/connectors/{identifier}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/connectors/:identifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&branch=string&repoIdentifier=string&rootFolder=string&filePath=string&commitMsg=string&lastObjectId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Fetches the list of Connectors corresponding to the request's filter criteria.

Request
Security:
ApiKey (readwrite)
query Parameters
pageIndex
integer <int32>
Default: 0

Page number of navigation. The default value is 0

pageSize
integer <int32>
Default: 100

Number of entries per page. The default value is 100

accountIdentifier
required
string

Account Identifier for the Entity

orgIdentifier
string

Organization Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

searchTerm
string

This would be used to filter Connectors. Any Connector having the specified string in its Name, ID and Tag would be filtered.

type
string

Filter Connectors by 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"
category
string

Filter Connectors by category

Enum: "CLOUD_PROVIDER" "SECRET_MANAGER" "CLOUD_COST" "ARTIFACTORY" "CODE_REPO" "MONITORING" "TICKETING"
source_category
string

Filter Connectors by Source Category. Available Source Categories are CLOUD_PROVIDER, SECRET_MANAGER, CLOUD_COST, ARTIFACTORY, CODE_REPO, MONITORING and TICKETING

Enum: "CLOUD_PROVIDER" "SECRET_MANAGER" "CLOUD_COST" "ARTIFACTORY" "CODE_REPO" "MONITORING" "TICKETING"
branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

Responses
400

Bad Request

500

Internal server error

default

Returns the list of Connectors

get/ng/api/connectors
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/connectors?pageIndex=0&pageSize=100&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&searchTerm=string&type=K8sCluster&category=CLOUD_PROVIDER&source_category=CLOUD_PROVIDER&branch=string&repoIdentifier=string&getDefaultFromOtherRepo=true' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Updates the Connector

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

Account Identifier for the Entity

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

Default Folder Path

commitMsg
string

Commit Message

lastObjectId
string

Last Object Id

baseBranch
string

Default Branch

Request Body schema:

This is the updated Connector. Please provide values for all fields, not just the fields you are updating

object (ConnectorInfo)

This has the Connector details defined in Harness

Responses
400

Bad Request

500

Internal server error

default

Returns the updated Connector

put/ng/api/connectors
Request samples
{
  • "connector": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Creates a Connector

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

Account Identifier for the Entity

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

rootFolder
string

Default Folder Path

filePath
string

File Path

commitMsg
string

File Path

isNewBranch
boolean
Default: false

Checks the new branch

baseBranch
string

Default Branch

Request Body schema:

Details of the Connector to create

object (ConnectorInfo)

This has the Connector details defined in Harness

Responses
400

Bad Request

500

Internal server error

default

Returns created Connector

post/ng/api/connectors
Request samples
{
  • "connector": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Fetches the list of Connectors corresponding to the request's filter criteria.

Request
Security:
ApiKey (readwrite)
query Parameters
pageIndex
integer <int32>
Default: 0

Page number of navigation. The default value is 0

pageSize
integer <int32>
Default: 100

Number of entries per page. The default value is 100

accountIdentifier
required
string

Account Identifier for the Entity

searchTerm
string

This would be used to filter Connectors. Any Connector having the specified string in its Name, ID and Tag would be filtered.

orgIdentifier
string

Organization Identifier for the Entity

projectIdentifier
string

Project Identifier for the Entity

filterIdentifier
string
includeAllConnectorsAvailableAtScope
boolean

Specify whether or not to include all the Connectors accessible at the scope. For eg if set as true, at the Project scope we will get org and account Connector also in the response

branch
string

Branch Name

repoIdentifier
string

Git Sync Config Id

getDefaultFromOtherRepo
boolean

if true, return all the default entities

getDistinctFromBranches
boolean

This when set to true along with GitSync enabled for the Connector, you can to get other Connectors too which are not from same repo - branch but different repo's default branch

Request Body schema:

Details of the filters applied

connectorNames
Array of strings

This is the list of the Connector names on which the filter will be applied.

connectorIdentifiers
Array of strings

This is the list of the Connector identifiers on which the filter will be applied.

description
string

Description of filter created.

types
Array of strings

This is the list of the Connector types on which the filter will be applied.

Items 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"
categories
Array of strings

This is the list of the Connector category on which the filter will be applied.

Items Enum: "CLOUD_PROVIDER" "SECRET_MANAGER" "CLOUD_COST" "ARTIFACTORY" "CODE_REPO" "MONITORING" "TICKETING"
connectivityStatuses
Array of strings

This is the list of the Connector status on which the filter will be applied.

Items Enum: "SUCCESS" "FAILURE" "PARTIAL" "UNKNOWN"
inheritingCredentialsFromDelegate
boolean

Boolean value to indicate if the Connector is using credentials from the Delegate to connect.

object (CcmConnectorFilter)
object
filterType
string
Enum: "CONNECTOR" "DELEGATEPROFILE" "DELEGATE" "PIPELINESETUP" "PIPELINEEXECUTION" "DEPLOYMENT" "AUDIT" "TEMPLATE"
Responses
400

Bad Request

500

Internal server error

default

Returns the list of Connectors

post/ng/api/connectors/listV2
Request samples
{
  • "connectorNames": [
    ],
  • "connectorIdentifiers": [
    ],
  • "description": "string",
  • "types": [
    ],
  • "categories": [
    ],
  • "connectivityStatuses": [
    ],
  • "inheritingCredentialsFromDelegate": true,
  • "ccmConnectorFilter": {
    },
  • "tags": {
    },
  • "filterType": "CONNECTOR"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}