What is API Management Context Request MatchedParameters?
The API Management public documentation for the request context variable usable in policy expressions at /en-us/azure/api-management/api-management-policy-expressions#ContextVariables declares a property MatchedParameters: IReadOnlyDictionary<string, string> which is a bit ambiguous. Here is some insight learned from Vitalli Kurokhtin.
MatchedParameters collection captures (and only captures) parameters that were present in operation UrlTemplate. Those are path and/or query parameters, but only those query parameters that are in template. So if you have template as:
And make request as:
MatchedParameters will have:
Url.Query on the other hand will have:
See the operation contract's UrlTemplate parameter at /en-us/rest/api/apimanagement/apioperation/get#operationcontract