Dynamic API Resource URL

Hi
I need to set an API Resource URL dynamically via user’s input. To understand:
User write the url (like siteA.com or siteB.com)
I save this into a AppVariable (like VarResource)
When user triggers collection event button I get data (on Data Api integrations somtething like https://{VarResourge}/Key=Lorem/list=Ipsum )

Is it possible?
How can I bind the url to a variable?

Hi, you can do that using URL placeholders in the Data configurator:

Then when you are making the request, just bind the app variable to the parameter :slight_smile:

Hi Mari,
Ok I set the parameter but it doesn’t bind my PageVariable…
In the test tab it give me ok status but when I try to invoke, it look like haven’t a value iputed.
(I say this because I’ve putted my PageVariable “pageVarPercorso” in an Alert and it fit right, after this it show me the dataVariable result always into an Alert but it give me back a null object…)

I don’t know if the problem could be that I use a button to set my “pageVarPercorso” value…

Hi, you cannot reference a page variable in the “Value” field of the URL placeholder. This is how you bind your page variable to the URL:

Make sure “Is static” is unticked:

Bind the page variable to the parameter in the node that you have after button click:

2 Likes