# Clusters

This contains APIs related to Gitops Clusters

## Get a Cluster linked to an environment by identifier

 - [GET /ng/api/gitops/clusters/{identifier}](https://apidocs.harness.io/clusters/getcluster.md)

## Unlink a cluster by identifier

 - [DELETE /ng/api/gitops/clusters/{identifier}](https://apidocs.harness.io/clusters/deletecluster.md): Unlink a cluster from an environment by identifier

## Gets cluster list

 - [GET /ng/api/gitops/clusters](https://apidocs.harness.io/clusters/getclusterlist.md): Gets a list of GitOps clusters linked to an environment

## Link a Cluster

 - [POST /ng/api/gitops/clusters](https://apidocs.harness.io/clusters/linkcluster.md): Link a GitOps cluster to an environment by identifier

## Link Clusters

 - [POST /ng/api/gitops/clusters/batch](https://apidocs.harness.io/clusters/linkclusters.md)

## Unlink Clusters

 - [POST /ng/api/gitops/clusters/batchunlink](https://apidocs.harness.io/clusters/unlinkclustersinbatch.md)

## Get a cluster managed by an agent by name

 - [GET /gitops/api/v1/agents/{agentIdentifier}/cluster_byname](https://apidocs.harness.io/clusters/agentclusterservice_getbyname.md): Get a cluster managed by agent using name

## Get a cluster managed by an agent by URL

 - [GET /gitops/api/v1/agents/{agentIdentifier}/cluster_byurl](https://apidocs.harness.io/clusters/agentclusterservice_getbyurl.md): Get a cluster managed by agent using URL

## List returns list of clusters

 - [GET /gitops/api/v1/agents/{agentIdentifier}/clusters](https://apidocs.harness.io/clusters/agentclusterservice_list.md): List clusters.

## Create creates a cluster

 - [POST /gitops/api/v1/agents/{agentIdentifier}/clusters](https://apidocs.harness.io/clusters/agentclusterservice_create.md): Create cluster.

## Get returns a cluster by identifier

 - [GET /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier}](https://apidocs.harness.io/clusters/agentclusterservice_get.md): Get cluster.

## Delete deletes a cluster

 - [DELETE /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier}](https://apidocs.harness.io/clusters/agentclusterservice_delete.md): Delete cluster.

## Update updates a cluster

 - [PUT /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier}](https://apidocs.harness.io/clusters/agentclusterservice_update.md): Update cluster.

## List all available repository certificates

 - [GET /gitops/api/v1/agents/{agentIdentifier}/gpgkeys](https://apidocs.harness.io/clusters/agentgpgkeyservice_list.md): List all available repository certificates.

## CreateHosted creates a harness hosted cluster

 - [POST /gitops/api/v1/agents/{agentIdentifier}/hosted/cluster](https://apidocs.harness.io/clusters/agentclusterservice_createhosted.md): Creates Harness hosted cluster.

## List clusters

 - [POST /gitops/api/v1/clusters](https://apidocs.harness.io/clusters/clusterservice_listclusters.md): ListClusters returns a list of clusters.

## Check if a cluster exists

 - [GET /gitops/api/v1/clusters/exists](https://apidocs.harness.io/clusters/clusterservice_exists.md): Exists checks whether a cluster with the given identifier exists.

