Hello Team,
I am back with another challenge for me at least. Hopefully it has easy solution.
I am using one API endpoint to grab events list with various data inside the array. And now I need to show a single event page with different sets of data per each instance so I have to grab it from a different API endpoint. To pull up corresponding data set per event I need to use Raw parameters for the Request inside second endpoint settings. It looks something like this:
{ "action":"getAppMode", "args": "{\"id\" : \"a9761703-de61-4b10-9641-a9e85a5c6e4f\",\"typeID\":470\n}" }
The challenge I currently have is that instead of id and typeID I need to use URL parameters. And if instead of existing in the array id and typeID I put something like {{dc:url:param key="ID"}}
and {{dc:url:param key="typeID"}}
I get error 500 in the API Tester. I also tried Twig variants {{ url.param({"key":"ID"}) }}
and {{ url.param({"key":"typeID"}) }}
instead as it is active at my site.
In other words the following expression doesn’t pass the URL parameters dynamically and the tester check fails:
{ "action":"getAppMode", "args": "{\"id\" : \"{{dc:url:param key="ID"}}\",\"typeID\":{{dc:url:param key=\"typeID\"}}}" }
Is there a way to solve this problem?