I’m currently building an app on Platform version 2.3 making use of Request Templates.
I have a requirement where I generate the key for Query Params dynamically.
I see that it is supported by the platform from the documentation that was available.
However, there seems to be no option to provide the key for the Query Params at run-time.
In the same document, the example only shows the definition of query inside requests.json.
This does not allow me to dynamically create query param keys.
Thanks for sharing, @cheld. Unfortunately this doesn’t work. The request template does not accept “query” as a context value. It has to be supported by the framework.
Request Templates is a feature focused to improvise the security involved in making an HTTP API invocation, that said, dynamic parameters would in a sense compromise on able to modify the endpoint URL so we don’t support dynamic parameters.
You can define the templates with parameters such as -
I don’t see any harm in allowing key and value pair substitution from iparams, even from a security standpoint.
Here’s what I think should be allowed in query params substitution:
Allow queryParam key substitution through secure/non-secure iparams.
Allow queryParam value substitution through secure/non-secure iparams as well as context.