Harness Variables API

This contains APIs related to Variables as defined in Harness.

Operations 12

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/variables List platform variables in a scope · Fetches the list of Variables #
Ask an LLM
“What account, org or project variables have we defined in Harness?”
“Can I include variables from every sub-scope when listing them?”
Tell an agent
List the platform variables in project {projectIdentifier}.
Search platform variables for {searchTerm}, including those from every sub-scope.
PUT /ng/api/variables Update a platform variable · Updates the Variable #
Ask an LLM
“How do I change the value of an existing platform variable?”
“Can I edit a variable's type or description after it's created?”
Tell an agent
Update the platform variable with these details: {variable}.
Save the edited platform variable definition {variable}.
POST /ng/api/variables Create a platform variable · Creates a Variable #
Ask an LLM
“Can I define a reusable variable at the account or project level?”
“What goes into creating a new platform variable?”
Tell an agent
Create a new platform variable: {variable}.
Add platform variable {variable} so pipelines can reference it.
GET /ng/api/variables/{identifier} Get a platform variable by identifier · Get the Variable by scope identifiers and variable identifier #
Ask an LLM
“Where can I look up one platform variable's value and type?”
“Which scope does a given platform variable live in?”
Tell an agent
Get the platform variable {identifier}.
Show variable {identifier} in project {projectIdentifier}.
DELETE /ng/api/variables/{identifier} Delete a platform variable · Deletes Variable by ID #
Ask an LLM
“Is it possible to delete a platform variable we no longer use?”
“What happens to a scoped variable when I remove it?”
Tell an agent destructive · confirm first
Delete the platform variable {identifier}.
Remove variable {identifier} from org {orgIdentifier}.
POST /ng/api/variables/list Fetch several platform variables by identifier · Get list of Variable by scope identifiers and variable identifiers #
Ask an LLM
“Can I look up a specific set of platform variables in one call by their identifiers?”
“Which of these named variables exist in my project?”
Tell an agent
Fetch the platform variables with identifiers {identifiers}.
Get variables {identifiers} from project {projectIdentifier}.
GET /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables List variables on an IaC workspace · List workspace variables #
Ask an LLM
“What Terraform and environment variables are set on an infrastructure workspace?”
“Which variables does my IaCM workspace pass to its runs?”
Tell an agent
List the variables on workspace {workspace} in project {project} of org {org}.
Show workspace {workspace}'s variables under {org}/{project}.
POST /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables Add a variable to an IaC workspace · Create workspace variable #
Ask an LLM
“How do I add a Terraform variable to an infrastructure workspace?”
“Can a workspace variable be an environment variable instead of a Terraform input?”
Tell an agent
Add {kind} variable {key} = {value} of type {value_type} to workspace {workspace} in {org}/{project}.
Create workspace variable {key} with value {value} ({value_type}, {kind}) on {workspace}.
DELETE /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key} Delete a variable from an IaC workspace · Destroy workspace variable #
Ask an LLM
“Can I remove a variable from an infrastructure workspace?”
“Will deleting a workspace variable affect the next plan or apply?”
Tell an agent destructive · confirm first
Delete the {kind} variable {key} from workspace {workspace} in {org}/{project}.
Remove variable {key} ({kind}) from workspace {workspace}.
GET /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key} Show one IaC workspace variable · Show workspace variable #
Ask an LLM
“What value is a particular variable set to on my workspace?”
“Is this workspace variable a secret or plain text?”
Tell an agent
Show the {kind} variable {key} on workspace {workspace} in {org}/{project}.
Get workspace {workspace}'s {kind} variable named {key}.
PUT /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/{kind}/{key} Change an IaC workspace variable's value · Update workspace variable #
Ask an LLM
“How can I change a variable's value on an existing infrastructure workspace?”
“Can I switch a workspace variable from plain text to secret?”
Tell an agent
Set {kind} variable {key} on workspace {workspace} in {org}/{project} to {value} as {value_type}.
Update workspace {workspace} {kind} variable {key} to value {value}.
GET /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/variables/merged Get a workspace's merged variables and connectors · Get variables, provider connectors, and variable files #
Ask an LLM
“What is the full effective set of variables, variable files and provider connectors on a workspace?”
“Which provider connectors and var files does my workspace run with?”
Tell an agent
Show the merged variables, provider connectors and variable files for workspace {workspace} in {org}/{project}.
Give me everything workspace {workspace} will run with: variables, var files and connectors.

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