Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Clusters

This contains APIs related to Gitops Clusters

Get a Cluster linked to an environment by identifier

get
Path parameters
identifierstringRequired

Cluster Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

environmentIdentifierstring · min: 1Required

environmentIdentifier

agentIdentifierstringOptional

agentIdentifier

deletedbooleanOptional

Specify whether cluster is deleted or not

Default: false
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/gitops/clusters/{identifier}
GET /gateway/ng/api/gitops/clusters/{identifier}?accountIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Unlink a cluster by identifier

delete

Unlink a cluster from an environment by identifier

Path parameters
identifierstringRequired

Cluster Identifier for the entity

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

environmentIdentifierstring · min: 1Required

environmentIdentifier

agentIdentifierstringOptional

agentIdentifier

scopestring · enumOptional

Scope for the gitops cluster

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
delete/gitops/clusters/{identifier}
DELETE /gateway/ng/api/gitops/clusters/{identifier}?accountIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Gets cluster list

get

Gets a list of GitOps clusters linked to an environment

Query parameters
pageinteger · int32Optional

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

Default: 0
sizeinteger · int32Optional

Results per page

Default: 100
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

environmentIdentifierstringRequired

Environment Identifier of the clusters

searchTermstringOptional

The word to be searched and included in the list response

identifiersstring[]Optional

List of cluster identifiers

sortstring[]Optional

Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order

scopestring · enumOptional

Scope of linked clusters to be returned, ACCOUNT/ORGANIZATION/PROJECT. Returns all by default if this is not specified

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
get/gitops/clusters
GET /gateway/ng/api/gitops/clusters?accountIdentifier=text&environmentIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Accept: */*
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Link a Cluster

post

Link a GitOps cluster to an environment by identifier

Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

This is the ClusterRequest entity defined in Harness

identifierstringOptional

identifier of the cluster

orgIdentifierstringOptional

organization identifier of the cluster

agentIdentifierstringOptional

agent identifier of the cluster

projectIdentifierstringOptional

project identifier of the cluster

envRefstring · min: 1Required

environment identifier of the cluster

scopestring · enumOptional

scope at which the cluster exists in harness gitops, project vs org vs account

Possible values:
Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/gitops/clusters
POST /gateway/ng/api/gitops/clusters?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 130

{
  "identifier": "text",
  "orgIdentifier": "text",
  "agentIdentifier": "text",
  "projectIdentifier": "text",
  "envRef": "text",
  "scope": "ACCOUNT"
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Link Clusters

post
Query parameters
accountIdentifierstringRequired

Account Identifier of the environment.

Body

Batch Request to link clusters to the environment in a batch

orgIdentifierstringOptional

Organization identifier of the environment

projectIdentifierstringOptional

Project identifier of the environment

envRefstring · min: 1Required

Environment identifier for the cluster

linkAllClustersbooleanOptional

Link all clusters to the environment. When true, links all clusters matching the searchTerm.

searchTermstringOptional

Search term to filter clusters when linkAllClusters is true. Only used with linkAllClusters=true.

skipClusterValidationbooleanOptional

Skip cluster existence validation in GitOps service. When true, allows linking clusters without verifying they exist in GitOps. Useful for pre-provisioning scenarios or when clusters are being created asynchronously.

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/gitops/clusters/batch
POST /gateway/ng/api/gitops/clusters/batch?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "orgIdentifier": "text",
  "projectIdentifier": "text",
  "envRef": "text",
  "clusters": [
    {
      "identifier": "text",
      "agentIdentifier": "text",
      "name": "text",
      "scope": "ACCOUNT"
    }
  ],
  "linkAllClusters": true,
  "searchTerm": "text",
  "skipClusterValidation": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Unlink Clusters

post
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

Body

Batch Request to unlink clusters to the environment in a batch

orgIdentifierstringOptional

Organization identifier of the environment

projectIdentifierstringOptional

Project identifier of the environment

envRefstring · min: 1Required

Environment identifier for the cluster

unlinkAllClustersbooleanOptional

Unlink all clusters from the environment. Warning: Setting this to true will unlink ALL clusters linked to provided environment

Responses
400

Bad Request

This is Failure entity as defied in Harness

statusstring · enumOptionalPossible values:
codestring · enumOptionalPossible values:
messagestringOptional
correlationIdstringOptional
post/gitops/clusters/batchunlink
POST /gateway/ng/api/gitops/clusters/batchunlink?accountIdentifier=text HTTP/1.1
Host: ng-manager-7b6bb5bdbc-5jxjn
Content-Type: application/json
Accept: */*
Content-Length: 184

{
  "orgIdentifier": "text",
  "projectIdentifier": "text",
  "envRef": "text",
  "clusters": [
    {
      "identifier": "text",
      "agentIdentifier": "text",
      "name": "text",
      "scope": "ACCOUNT"
    }
  ],
  "unlinkAllClusters": true
}
{
  "status": "SUCCESS",
  "code": "DEFAULT_ERROR_CODE",
  "message": "text",
  "correlationId": "text",
  "errors": [
    {
      "fieldId": "text",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?