Connectors

This contains APIs related to Connectors as defined in Harness

Create a Connector

Creates a new Harness Connector.

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

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.

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

Delete a Connector

Deletes a Connector for the given ID.

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

rootFolder
string

Path to the root folder of the Entity.

filePath
string

File Path of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

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

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

SecurityApiKey
Request
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

Name of the branch.

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

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

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

SecurityApiKey
Request
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

Name of the branch.

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

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

SecurityApiKey
Request
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

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

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

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

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

List all Connectors using filtersDeprecated

Lists all the Connectors matching the specified filters.

SecurityApiKey
Request
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" "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" "ELK"
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

Name of the branch.

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

List all settings for a Connector type

Returns the list of Connector settings for the given Connector type.

SecurityApiKey
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" "ELK"
Responses
400

Bad Request

500

Internal server error

default

Returns all settings for the Connector type

get/ng/api/connectors/fieldValues
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.

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

Return Connector details

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

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

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

Test a Harness Connector

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

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

Test Git Connector sync with repo

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

SecurityApiKey
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 Harness Connector connection with third-party tool

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

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

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

Update a Connector

Updates a Connector for the given ID.

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

branch
string

Name of the branch.

repoIdentifier
string

Git Sync Config Id.

rootFolder
string

Path to the root folder of the Entity.

filePath
string

Path to the root folder of the Entity.

commitMsg
string

Commit Message to use for the merge commit.

lastObjectId
string

Last Object Id

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

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