Clusters

This contains APIs related to Gitops Clusters

Delete a Cluster by identifier

SecurityApiKey
Request
path Parameters
identifier
required
string

Cluster Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

environmentIdentifier
required
string

environmentIdentifier

scope
string

Scope for the gitops cluster

Enum: "ACCOUNT" "ORGANIZATION" "PROJECT"
Responses
400

Bad Request

500

Internal Server Error

default

Returns true if the Cluster is deleted

delete/ng/api/gitops/clusters/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets a Cluster by identifier

SecurityApiKey
Request
path Parameters
identifier
required
string

Cluster Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

environmentIdentifier
required
string

environmentIdentifier

deleted
boolean
Default: false

Specify whether cluster is deleted or not

Responses
400

Bad Request

500

Internal Server Error

default

The saved Cluster

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

Gets cluster list

SecurityApiKey
Request
query Parameters
page
integer <int32>
Default: 0

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

size
integer <int32>
Default: 100

Results per page

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

environmentIdentifier
required
string

Environment Identifier of the clusters

searchTerm
string

The word to be searched and included in the list response

identifiers
Array of strings

List of cluster identifiers

sort
Array of strings

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

Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of cluster for a Project

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

link a Cluster

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:

Details of the createCluster to be linked

identifier
string

identifier of the cluster

orgIdentifier
string

organization identifier of the cluster

projectIdentifier
string

project identifier of the cluster

envRef
required
string

environment identifier of the cluster

scope
string

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

Enum: "ACCOUNT" "ORGANIZATION" "PROJECT"
Responses
400

Bad Request

500

Internal Server Error

default

Returns the linked Cluster

post/ng/api/gitops/clusters
Request samples
{
  • "identifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "envRef": "string",
  • "scope": "ACCOUNT"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Link Clusters

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:

Details of the createCluster to be created

orgIdentifier
string

organization identifier of the cluster

projectIdentifier
string

project identifier of the cluster

envRef
required
string

environment identifier of the cluster

linkAllClusters
boolean

link all clusters

searchTerm
string

search term if applicable. only valid if linking all clusters

Array of objects (ClusterBasicDTO)

list of cluster identifiers and names

Responses
400

Bad Request

500

Internal Server Error

default

Returns the linked Clusters

post/ng/api/gitops/clusters/batch
Request samples
{
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "envRef": "string",
  • "linkAllClusters": true,
  • "searchTerm": "string",
  • "clusters": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}