Say I have a resource like: /foo/{bar} in API Gateway. I want to transform the request path to /bing/baz/{bar} via an integration request template.
It is straight forward to set 'bar' into the request body via:
{ "bar": "$inputs.params('bar')" }
How do I rewrite the destination path at request time?
The solution is hinted at in 'Example Request Response' here:
but the docs don't outline exactly how 'With input template:' functions.
Resource: /things/{id}
With input template:
{
"id" : "$input.params('id')",
"count" : "$input.path(‘$.things').size()",
"things" : $input.json(‘$.things')
}