Harness Clusters API

This contains APIs related to Gitops Clusters

Operations 17

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /ng/api/gitops/clusters/{identifier} Get a GitOps cluster linked to an environment · Get a Cluster linked to an environment by identifier #
Ask an LLM
“Which cluster is linked to a given Harness environment under a specific identifier?”
“Can I see an environment-linked cluster link even if it was deleted?”
Tell an agent
Get the cluster link {identifier} on environment {environment}.
Show environment {environment}'s linked cluster {identifier} in account {account}.
DELETE /ng/api/gitops/clusters/{identifier} Unlink a cluster from an environment · Unlink a cluster by identifier #
Ask an LLM
“How do I detach one GitOps cluster from a Harness environment?”
“Does unlinking a cluster from an environment delete the cluster itself?”
Tell an agent destructive · confirm first
Unlink cluster {identifier} from environment {environment}.
Detach cluster {identifier} from environment {environment} in account {account}.
GET /ng/api/gitops/clusters List clusters linked to an environment · Gets cluster list #
Ask an LLM
“Which GitOps clusters are linked to my staging environment?”
“Can I search the clusters attached to an environment by name?”
Tell an agent
List clusters linked to environment {environment}.
Search clusters linked to environment {environment} for {searchTerm}.
POST /ng/api/gitops/clusters Link one GitOps cluster to an environment · Link a Cluster #
Ask an LLM
“How do I attach a single GitOps cluster to a Harness environment?”
“Can I link a cluster managed by a particular GitOps agent to an environment?”
Tell an agent
Link cluster {identifier} to environment {envRef}.
Attach cluster {identifier} from agent {agent} to environment {envRef}.
POST /ng/api/gitops/clusters/batch Link several clusters to an environment at once · Link Clusters #
Ask an LLM
“Can I link many GitOps clusters to one environment in a single call?”
“Is there a way to link every available cluster to an environment at once?”
Tell an agent
Link clusters {clusters} to environment {envRef} in one batch.
Link all available clusters to environment {envRef}.
POST /ng/api/gitops/clusters/batchunlink Unlink several clusters from an environment · Unlink Clusters #
Ask an LLM
“How do I detach many clusters from an environment at once?”
“Can I unlink every cluster from an environment in one request?”
Tell an agent destructive · confirm first
Unlink clusters {clusters} from environment {envRef} in one batch.
Unlink all clusters from environment {envRef}.
GET /gitops/api/v1/agents/{agentIdentifier}/cluster_byname Find an agent's cluster by name · Get a cluster managed by an agent by name #
Ask an LLM
“Can I look up a cluster a GitOps agent manages using its cluster name?”
“What is registered on my GitOps agent under a particular cluster name?”
Tell an agent
Find the cluster named {name} on GitOps agent {agent}.
Look up agent {agent}'s cluster by name {name} in project {project}.
GET /gitops/api/v1/agents/{agentIdentifier}/cluster_byurl Find an agent's cluster by server URL · Get a cluster managed by an agent by URL #
Ask an LLM
“Which cluster on my GitOps agent points at a given Kubernetes API server URL?”
“Can I resolve a cluster from its server address instead of its identifier?”
Tell an agent
Find the cluster with server URL {server} on GitOps agent {agent}.
Look up agent {agent}'s cluster at {server}.
GET /gitops/api/v1/agents/{agentIdentifier}/clusters List clusters managed by a GitOps agent · List returns list of clusters #
Ask an LLM
“Which clusters does a specific GitOps agent manage?”
“Can I narrow an agent's cluster list to one Argo project?”
Tell an agent
List clusters managed by GitOps agent {agent}.
List agent {agent}'s clusters in Argo project {argoProject}.
POST /gitops/api/v1/agents/{agentIdentifier}/clusters Register a cluster on a GitOps agent · Create creates a cluster #
Ask an LLM
“How do I add a new Kubernetes cluster to a Harness GitOps agent?”
“Can I upsert a cluster on an agent if it already exists?”
Tell an agent
Create cluster {identifier} on GitOps agent {agent} with config {cluster}.
Add cluster {cluster} on agent {agent}, overwriting it if it exists (upsert {upsert}).
GET /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier} Get a GitOps agent cluster by identifier · Get returns a cluster by identifier #
Ask an LLM
“What is the configuration of a cluster registered on my GitOps agent?”
“Can I fetch a single agent cluster by its Harness identifier?”
Tell an agent
Get cluster {identifier} on GitOps agent {agent}.
Show agent {agent}'s cluster {identifier} in project {project}.
DELETE /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier} Delete a cluster from a GitOps agent · Delete deletes a cluster #
Ask an LLM
“How do I remove a cluster from a GitOps agent entirely?”
“Can I force-delete an agent cluster that is still in use?”
Tell an agent destructive · confirm first
Delete cluster {identifier} from GitOps agent {agent}.
Delete agent {agent}'s cluster {identifier} with force delete set to {forceDelete}.
PUT /gitops/api/v1/agents/{agentIdentifier}/clusters/{identifier} Update a cluster on a GitOps agent · Update updates a cluster #
Ask an LLM
“How do I change the configuration of a cluster registered on a GitOps agent?”
“Can I force an update to an agent cluster or only touch specific fields?”
Tell an agent
Update cluster {identifier} on agent {agent} with {cluster}.
Change only fields {updatedFields} on agent {agent}'s cluster {identifier}.
GET /gitops/api/v1/agents/{agentIdentifier}/gpgkeys List GPG keys on a GitOps agent · List all available repository certificates #
Ask an LLM
“Which GPG keys are configured on my GitOps agent for verifying commits?”
“Can I check whether a specific GPG key ID is present on an agent?”
Tell an agent
List the GPG keys on GitOps agent {agent}.
Check agent {agent} for GPG key {keyID}.
POST /gitops/api/v1/agents/{agentIdentifier}/hosted/cluster Create a Harness-hosted cluster for an agent · CreateHosted creates a harness hosted cluster #
Ask an LLM
“Can Harness host a cluster for my GitOps agent instead of me bringing one?”
“How do I spin up a Harness-hosted cluster for a GitOps agent?”
Tell an agent
Create a Harness-hosted cluster for GitOps agent {agent}.
Provision a hosted cluster on agent {agent}.
POST /gitops/api/v1/clusters Search GitOps clusters across agents · List clusters #
Ask an LLM
“Which GitOps clusters exist across all agents in my project?”
“Can I search clusters and include child org and project scopes?”
Tell an agent
Search all GitOps clusters in project {project} for {searchTerm}.
List GitOps clusters across every agent in account {account}, sorted by {sortBy}.
GET /gitops/api/v1/clusters/exists Check whether a GitOps cluster exists · Check if a cluster exists #
Ask an LLM
“Is a cluster with this server URL already registered in GitOps?”
“Can I check for an existing cluster before adding it to an agent?”
Tell an agent
Check whether a cluster with server {server} exists.
Check if agent {agent} already has a cluster at {server}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/harness:harness-clusters-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

harness-clusters-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Clusters API
  version: '1.0'
  description: The Harness Software Delivery Platform uses OpenAPI Specification v3.0.
  contact:
    name: API Support
    email: contact@harness.io
    url: https://harness.io/
  x-logo:
    url: https://mma.prnewswire.com/media/779232/Harnes_logo_horizontal.jpg?p=facebook
    altText: Harness
  termsOfService: https://harness.io/terms-of-use/
servers:
- url: https://app.harness.io
  description: Harness host URL
- url: https://{vanity}
  description: Vanity URL
  variables:
    vanity:
      default: app.harness.io
security:
- x-api-key: []
tags:


# --- truncated at 32 KB (123 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-clusters-api-openapi.yml