# Templates

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

## Get the status of a bulk reconciliation run

 - [GET /template/api/refresh-template/bulk-reconcile/{uuid}](https://apidocs.harness.io/templates/getbulkreconcileeventdata.md): Returns the current status of a bulk reconciliation run, along with the reconciliation status of every referenced entity, identified by its bulk reconciliation UUID.

## Get YAML with updated Template Inputs

 - [POST /template/api/refresh-template/refreshed-yaml](https://apidocs.harness.io/templates/getrefreshedyaml.md): Returns YAML with updated Template Inputs for a given YAML

## Start a bulk reconciliation for all entities referring a Template

 - [POST /template/api/refresh-template/bulk-reconcile/{templateIdentifier}/version/{versionLabel}](https://apidocs.harness.io/templates/bulkreconciliation.md): Starts a bulk reconciliation run that refreshes the Template Inputs in every Pipeline and Template referring the given Template version. The list of referenced entities to reconcile is obtained from the listBulkReconciliationTemplateEntityUsage API.

## Validate Template Inputs in a YAML

 - [GET /template/api/refresh-template/validate-template-inputs](https://apidocs.harness.io/templates/templatevalidatetemplateinputs.md): Validates the Template Inputs in a pipeline's YAML specification. If the Template Inputs are invalid, the operation returns an error summary.

## Gets complete yaml with templateRefs resolved

 - [POST /template/api/templates/v2/applyTemplates](https://apidocs.harness.io/templates/getyamlwithtemplaterefsresolvedv2.md)

## Create a Template

 - [POST /template/api/templates](https://apidocs.harness.io/templates/createtemplate.md)

## Delete Template Version

 - [DELETE /template/api/templates/{templateIdentifier}/{versionLabel}](https://apidocs.harness.io/templates/deletetemplateversion.md)

## Get Template

 - [GET /template/api/templates/{templateIdentifier}](https://apidocs.harness.io/templates/gettemplate.md)

## Batch fetch multiple templates

 - [POST /template/api/templates/batch](https://apidocs.harness.io/templates/getbatchtemplates.md): Fetches multiple templates in a single HTTP request. Supports up to 100 templates per batch. Returns partial success if some templates succeed and others fail. Supports remote templates via Git Entity parameters.

## Gets Template Input Set YAML

 - [GET /template/api/templates/templateInputs/{templateIdentifier}](https://apidocs.harness.io/templates/gettemplateinputsetyaml.md)

## Get custom labels per template version

 - [GET /template/api/templates/{templateIdentifier}/labels](https://apidocs.harness.io/templates/gettemplatelabelsmap.md): Per-version labels; optional version filter.

## Get Entities referring this template, for use as bulk reconciliation input

 - [POST /template/api/templates/reconciliation-entity/{templateIdentifier}](https://apidocs.harness.io/templates/listbulkreconciliationtemplateentityusage.md): Returns a paginated list of Pipelines and Templates referring the given Template version, along with their current reconciliation status. The result can be used to build the request payload for the bulkReconciliation API.

## Get Entities referring this template

 - [GET /template/api/templates/entitySetupUsage/{templateIdentifier}](https://apidocs.harness.io/templates/listtemplateusage.md)

## Gets all metadata of template list

 - [POST /template/api/templates/list-metadata](https://apidocs.harness.io/templates/gettemplatemetadatalist.md)

## Move Template YAML from inline to remote

 - [POST /template/api/templates/move-config/{templateIdentifier}](https://apidocs.harness.io/templates/movetemplateconfigs.md)

## Refresh cache and fetch a Template

 - [GET /template/api/templates/refresh-and-get/{templateIdentifier}](https://apidocs.harness.io/templates/refreshandgettemplate.md): Force-refreshes the git file cache for a remote Template and returns the freshly fetched entity. Requires the git branch query parameter — repo default branch is not inferred when branch is omitted. Behind the PIPE_GITX_FORCE_REFRESH feature flag.

## Replace custom labels for one template version

 - [POST /template/api/templates/{templateIdentifier}/labels/replace](https://apidocs.harness.io/templates/replacelabelsfortemplate.md): Replace labels for one version. Invalid label tokens or other errors throw 4xx.

## Update Template Version

 - [PUT /template/api/templates/update/{templateIdentifier}/{versionLabel}](https://apidocs.harness.io/templates/updateexistingtemplateversion.md)

## Update git metadata details for a remote template

 - [POST /template/api/templates/update/git-metadata/{templateIdentifier}/{versionLabel}](https://apidocs.harness.io/templates/updategitdetails.md)

## Update Stable Template Version

 - [PUT /template/api/templates/updateStableTemplate/{templateIdentifier}/{versionLabel}](https://apidocs.harness.io/templates/updatestabletemplate.md)

