Reputation: 53
In Azure API Management, what is the difference between template parameters and query parameters when setting up an API operations?
Upvotes: 1
Views: 3616
Reputation: 29
A template parameter is always required and is matched when calling the API. If a template parameter is specified and is not mentioned when calling the API, it will result in a response of 404. Query params in APIM is probably just used for documentation
Upvotes: 1
Reputation: 1227
In Template Parameters, you can add Description, Type and default Values.
To retrieve the multiple template parameters of different context, you can use query parameters.
<set-query-parameter name="name" exists-action="override">
<value>@(context.Request.MatchedParameters["name"])</value>
</set-query-parameter>
Reference**:** https://www.linkedin.com/pulse/azure-api-management-use-template-parameters-set-query-anders-eide
Upvotes: 0