Harness Environments API

This contains APIs related to Environments

Operations 15

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

POST /ng/api/environmentsV2/check-allowed-values Check allowed-values usage in environments · Check for allowed-values in the Environments #
Ask an LLM
“Do any of my Harness environments use allowed-values restrictions on their variables?”
“Can I scan environments for allowed-values expressions in one call?”
Tell an agent
Check the environments in account {account} for allowed-values usage.
Scan my environments for allowed-values restrictions.
GET /ng/api/environmentsV2 List environments in a project · Gets Environment list for a project #
Ask an LLM
“Which deployment environments are defined in my Harness project?”
“Can I search a project's environments by name or filter to specific identifiers?”
Tell an agent
List the environments in project {project}.
Search environments in project {project} for {searchTerm}.
PUT /ng/api/environmentsV2 Update an existing environment · Update an Environment by identifier #
Ask an LLM
“How do I rename or re-describe an environment that already exists?”
“Can I switch an existing environment between production and pre-production?”
Tell an agent
Update environment {identifier} to type {type} with name {name}.
Replace existing environment {identifier}'s YAML with {yaml}.
POST /ng/api/environmentsV2 Create a new environment · Create an Environment #
Ask an LLM
“How do I add a new production or pre-production environment in Harness?”
“Can I give a brand-new environment tags and a color when creating it?”
Tell an agent
Create a new {type} environment named {name} in project {project}.
Create environment {identifier} of type {type} with description {description}.
POST /ng/api/environmentsV2/batch Create many environments in one batch · Create Environments in batch with partial success support #
Ask an LLM
“Can I create several environments at once and keep the ones that succeed?”
“What happens in a batch environment create if some entries fail?”
Tell an agent
Batch-create environments in account {account} with partial success allowed.
Create a batch of environments at once.
GET /ng/api/environmentsV2/{environmentIdentifier} Get one environment by identifier · Gets an Environment by identifier #
Ask an LLM
“What is the configuration of a specific environment?”
“Can I still retrieve an environment that has been deleted?”
Tell an agent
Get environment {environment}.
Show environment {environment} in project {project}.
DELETE /ng/api/environmentsV2/{environmentIdentifier} Delete an environment · Delete an Environment by identifier #
Ask an LLM
“How do I delete an environment I no longer deploy to?”
“Can I force-delete an environment that is still referenced elsewhere?”
Tell an agent destructive · confirm first
Delete environment {environment}.
Delete environment {environment} with force delete {forceDelete}.
GET /ng/api/environmentsV2/serviceOverrides List service overrides for an environment · Gets Service Overrides list #
Ask an LLM
“Which service overrides are configured on a given environment?”
“Can I see only the overrides for one service in an environment?”
Tell an agent
List service overrides on environment {environment}.
Show overrides for service {service} in environment {environment}.
POST /ng/api/environmentsV2/serviceOverrides Create or update a service override · upsert a Service Override for an Environment #
Ask an LLM
“How do I override a service's variables or manifests for one environment?”
“Can I create a service override or replace the existing one in a single call?”
Tell an agent
Set the override for service {service} in environment {environment} to {yaml}.
Upsert a service override for {service} on environment {environment}.
DELETE /ng/api/environmentsV2/serviceOverrides Delete a service override · Delete a ServiceOverride entity #
Ask an LLM
“How do I remove a service override so the environment uses service defaults?”
“Can I delete the override for just one service in an environment?”
Tell an agent destructive · confirm first
Delete the override for service {service} in environment {environment}.
Remove service {service}'s override from environment {environment}.
POST /ng/api/environmentsV2/import Import an environment from a Git repository · Import and Create Environment from Git Repository #
Ask an LLM
“Can I create an environment from a YAML file already stored in Git?”
“Is it possible to force-import an environment definition from a repo branch?”
Tell an agent
Import an environment from {filePath} on branch {branch} of repo {repoName}.
Import environment {environment} from repo {repoName}, branch {branch}, file {filePath} via connector {connectorRef}.
GET /ng/api/environmentsV2/list/access List environments I have access to · Gets Environment Access list #
Ask an LLM
“Which environments am I allowed to access in this project?”
“Can I list accessible environments inside one environment group?”
Tell an agent
List the environments I can access in project {project}.
Show accessible environments in environment group {envGroup}.
POST /ng/api/environmentsV2/move-config/{environmentIdentifier} Move an environment's YAML into Git · Move environment YAML from inline to remote #
Ask an LLM
“How do I move an inline environment definition into a Git repository?”
“Can I commit a moved environment YAML to a new branch?”
Tell an agent
Move environment {environment} config using move type {moveConfigType}.
Move environment {environment} to {filePath} in repo {repoName} on branch {branch} with move type {moveConfigType}.
PUT /ng/api/environmentsV2/{environmentIdentifier}/update-git-metadata Update Git metadata on a remote environment · Update git-metadata in remote environment Entity #
Ask an LLM
“How do I point a remote environment at a different Git file path or repo?”
“Can I change the connector used by a Git-stored environment?”
Tell an agent
Update environment {environment}'s Git file path to {filePath}.
Point remote environment {environment} at repo {repoName} via connector {connectorRef}.
PUT /ng/api/environmentsV2/upsert Create or update an environment in one call · Upsert an Environment by identifier #
Ask an LLM
“Can I create an environment if it doesn't exist and update it if it does?”
“Is there an idempotent way to save an environment definition?”
Tell an agent
Upsert environment {identifier} as type {type}.
Create or update environment {identifier} from YAML {yaml}.

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-environments-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-environments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Environments 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 (229 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-environments-api-openapi.yml