Connectors

This contains APIs related to Connectors as defined in Harness

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

Securityx-api-key
Request
query Parameters
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

Name of the branch.

repoIdentifier
string

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

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 get one connector entity from each identifier. The connector entity can belong to any branch

pageIndex
integer <int32>
Default: 0

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

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

pageToken
string

Page Token of the next results to fetch.Default Value: ''

Request Body schema:
required

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" "Azure" "Artifactory" "Jira" "Nexus" "Github" "Gitlab" "Bitbucket" "Codecommit" "CEAws" "CEAzure" "GcpCloudCost" "CEK8sCluster" "HttpHelmRepo" "NewRelic" "Datadog" "SumoLogic" "PagerDuty" "CustomHealth" "ServiceNow" "ErrorTracking" "Pdc" "AzureRepo" "Jenkins" "OciHelmRepo" "CustomSecretManager" "ElasticSearch" "GcpSecretManager" "AzureArtifacts" "Tas" "Spot" "Bamboo" "TerraformCloud" "SignalFX" "Harness" "Rancher" "JDBC"
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" "DATABASE"
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" "PENDING"
inheritingCredentialsFromDelegate
boolean

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

connectorConnectivityModes
Array of strings

Connector connectivity mode on which the filter is applied

Items Enum: "DELEGATE" "MANAGER"
object

Filter tags as a key-value pair.

filterType
string
Value: "Connector"
Responses
400

Bad Request

500

Internal server error

default

Returns the list of Connectors

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

List all Connectors using filtersDeprecated

Lists all the Connectors matching the specified filters.

Securityx-api-key
Request
query Parameters
pageIndex
integer <int32>
Default: 0

Page number of navigation. By default, it is set to 0.

pageSize
integer <int32> <= 1000
Default: 100

Number of entries per page.The default number of entries per page is 100, while the maximum number allowed is 1000.

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" "Azure" "Artifactory" "Jira" "Nexus" "Github" "Gitlab" "Bitbucket" "Codecommit" "CEAws" "CEAzure" "GcpCloudCost" "CEK8sCluster" "HttpHelmRepo" "NewRelic" "Datadog" "SumoLogic" "PagerDuty" "CustomHealth" "ServiceNow" "ErrorTracking" "Pdc" "AzureRepo" "Jenkins" "OciHelmRepo" "CustomSecretManager" "ElasticSearch" "GcpSecretManager" "AzureArtifacts" "Tas" "Spot" "Bamboo" "TerraformCloud" "SignalFX" "Harness" "Rancher" "JDBC"
category
string

Filter Connectors by category

Enum: "CLOUD_PROVIDER" "SECRET_MANAGER" "CLOUD_COST" "ARTIFACTORY" "CODE_REPO" "MONITORING" "TICKETING" "DATABASE"
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" "DATABASE"
version
string
branch
string

Name of the branch.

repoIdentifier
string

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

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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a Connector

Updates a Connector for the given ID.

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Its required field during update call request. It can be fetched from the response of GET API call for the entity

resolvedConflictCommitId
string

If the entity is git-synced, this parameter represents the commit id against which file conflicts are resolved

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

lastCommitId
string

last commit id of the file

isNewBranch
boolean
Default: false

Checks the new branch

isHarnessCodeRepo
boolean

Is Harness code repo enabled

Request Body schema:
required

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": [
    ]
}

Create a Connector

Creates a new Harness Connector.

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePath
string

File Path of the Entity.

commitMsg
string

File Path of the Entity.

isNewBranch
boolean
Default: false

Checks the new branch

baseBranch
string

Name of the default branch.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

storeType
string

Tells whether the Entity is to be saved on Git or not

Enum: "INLINE" "REMOTE"
repoName
string

Name of the repository.

isHarnessCodeRepo
boolean

Is Harness code repo enabled

Request Body schema:
required

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": [
    ]
}

Return Connector details

Returns the Connector's details for the given Account and Connector ID.

Securityx-api-key
Request
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

Name of the branch.

repoIdentifier
string

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

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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a Connector

Deletes a Connector for the given ID.

Securityx-api-key
Request
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

Name of the branch.

repoIdentifier
string

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

rootFolder
string

Path to the root folder of the Entity. [Applicable for Old Git Sync only]

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Last Object Id

forceDelete
boolean
Default: false

If true, the Entity will be forced delete, without checking any references/usages

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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List all the configured field values for the given Connector type.

Returns all the configured field values for the given Connector type, which can be used during connector creation.

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

connectorType
required
string

Connector type

Enum: "K8sCluster" "Git" "Splunk" "AppDynamics" "Prometheus" "Dynatrace" "Vault" "AzureKeyVault" "DockerRegistry" "Local" "AwsKms" "GcpKms" "AwsSecretManager" "Gcp" "Aws" "Azure" "Artifactory" "Jira" "Nexus" "Github" "Gitlab" "Bitbucket" "Codecommit" "CEAws" "CEAzure" "GcpCloudCost" "CEK8sCluster" "HttpHelmRepo" "NewRelic" "Datadog" "SumoLogic" "PagerDuty" "CustomHealth" "ServiceNow" "ErrorTracking" "Pdc" "AzureRepo" "Jenkins" "OciHelmRepo" "CustomSecretManager" "ElasticSearch" "GcpSecretManager" "AzureArtifacts" "Tas" "Spot" "Bamboo" "TerraformCloud" "SignalFX" "Harness" "Rancher" "JDBC"
Responses
400

Bad Request

500

Internal server error

default

Returns all the configured field values for the given Connector type, which can be used during connector creation.

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

Get the Template URL of connectorDeprecated

Securityx-api-key
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Lists all Connectors for an account

Lists all the Connectors for the given Account ID.

Securityx-api-key
Request
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
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

Securityx-api-key
Request
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

Name of the branch.

repoIdentifier
string

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

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
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.

Securityx-api-key
Request
query Parameters
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

Name of the branch.

repoIdentifier
string

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

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 get one connector entity from each identifier. The connector entity can belong to any branch

version
string
onlyFavorites
boolean
Default: false
pageIndex
integer <int32>
Default: 0

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

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

pageToken
string

Page Token of the next results to fetch.Default Value: ''

Request Body schema:
required

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" "Azure" "Artifactory" "Jira" "Nexus" "Github" "Gitlab" "Bitbucket" "Codecommit" "CEAws" "CEAzure" "GcpCloudCost" "CEK8sCluster" "HttpHelmRepo" "NewRelic" "Datadog" "SumoLogic" "PagerDuty" "CustomHealth" "ServiceNow" "ErrorTracking" "Pdc" "AzureRepo" "Jenkins" "OciHelmRepo" "CustomSecretManager" "ElasticSearch" "GcpSecretManager" "AzureArtifacts" "Tas" "Spot" "Bamboo" "TerraformCloud" "SignalFX" "Harness" "Rancher" "JDBC"
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" "DATABASE"
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" "PENDING"
inheritingCredentialsFromDelegate
boolean

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

connectorConnectivityModes
Array of strings

Connector connectivity mode on which the filter is applied

Items Enum: "DELEGATE" "MANAGER"
object

Filter tags as a key-value pair.

filterType
string
Value: "Connector"
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,
  • "connectorConnectivityModes": [
    ],
  • "tags": {
    },
  • "filterType": "Connector"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Get list of Connectors by FQN

Lists all Connectors for an Account by Fully Qualified Name (FQN) with a limit of max 1000 FQNs per request.

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:
required

A list of connectors' FQNs as strings. A maximum of 1000 FQNs are allowed.

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": [
    ]
}

Test Harness Connector connection with third-party tool

Tests if a Harness Connector can successfully connect Harness to a third-party tool.

Securityx-api-key
Request
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

Name of the branch.

repoIdentifier
string

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

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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Test Git Connector sync with repo

Tests if a Git Repo Connector can successfully connect Harness to a Git provider.

Securityx-api-key
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Test a Harness Connector

Tests if a Connector can successfully connect Harness to a third-party tool using the an Account and Connector ID.

Securityx-api-key
Request
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
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}