Harness Secrets API

This contains APIs related to Secrets as defined in Harness

GitHub OpenAPI
Business capability
Configuration & Secrets Management BC-4210.60

Operations 14

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/v2/secrets/count Count the secrets in a scope · Count secrets for scope #
Ask an LLM
“How many secrets exist under a given org or project?”
“Can I get just a secret count without listing them?”
Tell an agent
Count the secrets under scope {parent_id}.
Tell me how many secrets account {account} has in scope {parent_id}.
GET /ng/api/v2/secrets List secrets with query-string filters · Fetches the list of Secrets corresponding to the request's filter criteria #
Ask an LLM
“What secrets are stored in my Harness project?”
“Can I list secrets from every sub-scope under an org at once?”
Tell an agent
List the secrets in project {project} using a simple GET filter.
Show secrets of type {type} whose name matches {search}.
POST /ng/api/v2/secrets Create a secret · Creates a Secret at given Scope #
Ask an LLM
“How do I store a new text secret at the project level?”
“Can I create a secret that only I can see?”
Tell an agent
Create secret {secret} in project {project}.
Add a private secret {secret} for my use only.
POST /ng/api/v2/secrets/files Upload a file as a secret · Creates a Secret File #
Ask an LLM
“Can I upload a certificate or key file as a secret?”
“What's the way to store a whole file as an encrypted secret?”
Tell an agent
Upload {file} as a new secret file.
Create a secret file from {file} in project {project}.
POST /ng/api/v2/secrets/yaml Create a secret from YAML · Creates a secret via YAML #
Ask an LLM
“Can I define a new secret using a YAML document?”
“Is there a YAML-based way to create secrets for config-as-code?”
Tell an agent
Create a secret from this YAML definition {secret}.
Add the YAML-defined secret {secret} to project {project}.
GET /ng/api/v2/secrets/{identifier} Get a secret by its identifier · Get the Secret by ID and Scope #
Ask an LLM
“Can I look up the details of one secret by its ID?”
“What metadata is stored for a specific secret?”
Tell an agent
Get secret {identifier}.
Show the details of secret {identifier} in project {project}.
PUT /ng/api/v2/secrets/{identifier} Update a secret · Updates the Secret by ID and Scope #
Ask an LLM
“How do I rotate the value of an existing text secret?”
“Can I change an existing secret's settings with a JSON body?”
Tell an agent
Update secret {identifier} with {secret}.
Replace the stored definition of secret {identifier} in project {project}.
DELETE /ng/api/v2/secrets/{identifier} Delete a secret · Deletes Secret by ID and Scope #
Ask an LLM
“Can I force-delete a secret that is still referenced somewhere?”
“What's the way to permanently remove a secret?”
Tell an agent destructive · confirm first
Delete secret {identifier}.
Force delete secret {identifier} even if it's in use.
POST /ng/api/v2/secrets/list/secrets Search secrets by name, tags or description · Fetches the list of Secrets corresponding to the request's filter criteria #
Ask an LLM
“Can I find secrets by their tags or description?”
“Which secrets have a name that contains a given word?”
Tell an agent
Find secrets named {name}.
Search secrets tagged {tags} with description matching {description}.
POST /ng/api/v2/secrets/list List secrets with a filter body by ID or category · Fetches the list of Secrets corresponding to the request's filter criteria #
Ask an LLM
“Can I fetch a batch of secrets by a list of identifiers?”
“Which secrets belong to a given source category?”
Tell an agent
Fetch the secrets with identifiers {identifiers}.
List secrets in source category {category} via the filter body.
PUT /ng/api/v2/secrets/files/{identifier} Replace a secret file · Updates the Secret file by ID and Scope #
Ask an LLM
“Can I upload a new version of a file stored as a secret?”
“How would I swap out an expired certificate held in a secret file?”
Tell an agent
Replace secret file {identifier} with {file}.
Upload new contents for secret file {identifier}.
PUT /ng/api/v2/secrets/{identifier}/yaml Update a secret using YAML · Updates the Secret by ID and Scope via YAML #
Ask an LLM
“Can I edit an existing secret by sending YAML?”
“Is there a YAML update path for secrets I manage as code?”
Tell an agent
Update secret {identifier} from YAML {secret}.
Apply the YAML {secret} to existing secret {identifier}.
POST /ng/api/v2/secrets/validate Validate that a secret works · Validates Secret with the provided ID and Scope #
Ask an LLM
“Can I test whether a secret resolves correctly before using it?”
“Is there a check that a stored secret reference is valid?”
Tell an agent
Validate secret {identifier} of type {type}.
Check that secret {identifier} is usable.
GET /ng/api/v2/secrets/validateUniqueIdentifier/{identifier} Check a secret identifier is not taken · Checks whether the identifier is unique or not #
Ask an LLM
“Is a secret ID I want to use already taken?”
“Can I confirm an identifier is unique before creating a secret?”
Tell an agent
Check whether secret identifier {identifier} is available.
Confirm {identifier} is unique in project {project}.

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-secrets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

harness-secrets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Secrets 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 (211 KB total) ---
# Full source: https://artifacts.apis.io/harness/openapi/harness-secrets-api-openapi.yml