Set HTTP Header

Template ID: setheader

Assigns a value to an existing response and/or request header or adds a new response and/or request header. This template is available in PowerApps and Flow.

In this article

Input Parameters

Name Key Required Type Description
Header name True String Specifies the name of the header to be set.
Header value x-ms-apimTemplateParameter.value True String Specifies the value of the header to be set.
Action if header exists x-ms-apimTemplateParameter.existsAction Enum Specifies what action to take when the header is already specified
- override : Replaces existing value with the value from policy template.
- skip : Existing value is not replaced with the value from policy template.
- append : Appends the value from policy template to existing value.
Run policy on x-ms-apimTemplate-policySection True Enum Specifies when to run this policy
- Request : Policy template will run before request is sent to the backend API.
- Response : Policy will run after receiving response from the backend API.
- Failure : Policy template will run only when call to the backend API fails.
Operations x-ms-apimTemplate-operationName Array List of actions and triggers to which the policy will apply to. If no operation is selected, this policy will apply to all operations.