Harness Templates API

This contains a list of APIs specific to the Templates Validations and Refresh

Operations 16

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 /template/api/refresh-template/refreshed-yaml Refresh template inputs inside a YAML · Get YAML with updated Template Inputs #
Ask an LLM
“My pipeline YAML has stale template inputs — can Harness give me a version with them refreshed?”
“What does a YAML look like after its template inputs are brought up to date?”
Tell an agent
Return this YAML with its template inputs refreshed: {yaml}.
Refresh the template inputs in {yaml} using branch {branch}.
GET /template/api/refresh-template/validate-template-inputs Validate the inputs of a template version · Validate Template Inputs in a YAML #
Ask an LLM
“Are the template inputs in my pipeline still valid for this template version?”
“Can I get an error summary when a template's inputs no longer line up?”
Tell an agent
Validate the template inputs for template {templateIdentifier} version {versionLabel}.
Check whether version {versionLabel} of template {templateIdentifier} has invalid inputs on branch {branch}.
POST /template/api/templates/v2/applyTemplates Resolve all template references in a YAML · Gets complete yaml with templateRefs resolved #
Ask an LLM
“How can I see a pipeline's full YAML with every template reference expanded?”
“Can I get the merged YAML of an entity with its templateRefs resolved inline?”
Tell an agent
Expand every template reference in this YAML: {originalEntityYaml}.
Resolve the templates in {originalEntityYaml} from branch {branch} and give me the complete YAML.
POST /template/api/templates Create a pipeline template · Create a Template #
Ask an LLM
“How do I create a new reusable template in Harness?”
“Can a new template be stored in a Git repo instead of inline?”
Tell an agent
Create a new template labelled {label} in project {projectIdentifier}.
Create a template stored remotely in repo {repoName} at {filePath} on branch {branch}.
DELETE /template/api/templates/{templateIdentifier}/{versionLabel} Delete a version of a template · Delete Template Version #
Ask an LLM
“Can I delete one version of a template while keeping the others?”
“Is there a force option when a template version is still referenced?”
Tell an agent destructive · confirm first
Delete version {versionLabel} of template {templateIdentifier}.
Force-delete template {templateIdentifier} version {versionLabel} even if it is in use ({forceDelete}).
GET /template/api/templates/{templateIdentifier} Get a template · Get Template #
Ask an LLM
“Where can I view the YAML of a template and its current stable version?”
“Can I retrieve a specific version of a template by its label?”
Tell an agent
Get template {templateIdentifier}.
Show version {versionLabel} of template {templateIdentifier}.
GET /template/api/templates/templateInputs/{templateIdentifier} Get the runtime inputs YAML of a template · Gets Template Input Set YAML #
Ask an LLM
“Which runtime inputs does a template expect when I use it?”
“What input set YAML does a given template version generate?”
Tell an agent
Show the input set YAML for template {templateIdentifier}.
Get the runtime inputs of template {templateIdentifier} at version {versionLabel}.
GET /template/api/templates/{templateIdentifier}/labels List custom labels on template versions · Get custom labels per template version #
Ask an LLM
“What custom labels are attached to each version of a template?”
“Can I see the labels on just one template version?”
Tell an agent
List the custom labels on every version of template {templateIdentifier}.
Show the labels on template {templateIdentifier} version {versionLabel}.
GET /template/api/templates/entitySetupUsage/{templateIdentifier} Find entities that use a template · Get Entities referring this template #
Ask an LLM
“Which pipelines and other entities reference this template?”
“Before changing a template, how can I check where it's being used?”
Tell an agent
List everything that references template {templateIdentifier}.
Show which entities use version {versionLabel} of template {templateIdentifier}.
POST /template/api/templates/list-metadata Browse and filter the template list · Gets all metadata of template list #
Ask an LLM
“What templates are available in my project, and can I filter them by type or tag?”
“Can I list only the stable versions of templates at this scope?”
Tell an agent
List {templateListType} templates matching {searchTerm}, using filter type {filterType}.
Show {templateListType} templates of entity types {templateEntityTypes} with filter type {filterType}.
POST /template/api/templates/move-config/{templateIdentifier} Move a template between inline and Git · Move Template YAML from inline to remote #
Ask an LLM
“Can I move a template stored inline in Harness into a Git repository?”
“What details are needed to convert an inline template to remote storage?”
Tell an agent
Move template {templateIdentifier} version {versionLabel} to repo {repoName} at {filePath}.
Change the storage of template {templateIdentifier} {versionLabel} using move type {moveConfigType}.
GET /template/api/templates/refresh-and-get/{templateIdentifier} Refetch a remote template from Git · Refresh cache and fetch a Template #
Ask an LLM
“My remote template changed in Git — how do I bypass the cache and fetch it fresh?”
“Does refreshing a remote template require naming the branch?”
Tell an agent
Refresh the Git cache and fetch template {templateIdentifier} from branch {branch}.
Pull the latest copy of remote template {templateIdentifier} version {versionLabel} from {branch}.
POST /template/api/templates/{templateIdentifier}/labels/replace Replace labels on a template version · Replace custom labels for one template version #
Ask an LLM
“Can I overwrite the custom labels on a single template version?”
“What happens if I send an invalid label to a template version?”
Tell an agent
Replace the labels on template {templateIdentifier} version {versionLabel} with {labels}.
Set labels {labels} on version {versionLabel} of {templateIdentifier}, removing any others.
PUT /template/api/templates/update/{templateIdentifier}/{versionLabel} Update an existing template version · Update Template Version #
Ask an LLM
“How do I save changes to a version of a template I already created?”
“Can I commit a template version update to a new Git branch?”
Tell an agent
Update template {templateIdentifier} version {versionLabel} with my changes.
Save edits to {templateIdentifier} {versionLabel} with commit message {commitMsg} on branch {branch}.
POST /template/api/templates/update/git-metadata/{templateIdentifier}/{versionLabel} Change Git location of a remote template · Update git metadata details for a remote template #
Ask an LLM
“The Git repo for my remote template moved — can I update where Harness looks for it?”
“Can I change the file path or connector a remote template is read from?”
Tell an agent
Point template {templateIdentifier} version {versionLabel} at file {filePath} in repo {repoName}.
Update the Git connector for remote template {templateIdentifier} {versionLabel} to {connectorRef}.
PUT /template/api/templates/updateStableTemplate/{templateIdentifier}/{versionLabel} Mark a template version as stable · Update Stable Template Version #
Ask an LLM
“Which template version do pipelines get by default, and can I change it?”
“How can I promote a newer template version to be the stable one?”
Tell an agent
Make version {versionLabel} the stable version of template {templateIdentifier}.
Promote {templateIdentifier} {versionLabel} to stable with comment {comments}.

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