#Setting the datasource dynamically when doing an api request

1 messages · Page 1 of 1 (latest)

wide palm
#

Hi appsmith!

I would like to set the datasource part of an api request dynamically. Is there a way to do that?

So let's assume I create an api query and make it use a datasource called 'source A'. But in my page, at some point I would like to make the same api request against another datasource 'source B'.
One way would be to declare 2 api queries. But that in my particular case that would be a headache (I would have tens of queries in some pages)

Before 1.9.21 I would put the datasource url as an appsmith.store.variable, inside the query url. Worked fine.

Any idea?

elder rainBOT
#

Hey There,

We've registered your query, and our team will get back to you soon.

Regards,
Pranav