How to pass dynamic parameters to a route that I have in my backend

Hello, I`m kind of new to retool so sorry if my post is dumb.

I have a query that I want to manually trigger with some parameters (page_id and filters)
dynamicFiltering.trigger({
additionalScope: {
page_id: page_dropdown.selectedItem.pages.id,
filter: filter1.value }
});

I have a GET route that is linked to a custom backend and I don`t recieve these paremeters on my backend even though in the console I see that the parameters are being logged:

I`ve configured the parameters in the query settings:

what am I doin wrong?
I have a Django backend with rest_framework on it.

Thanks for the support.

Can you provide a screenshot of the executed API request? I don't see where the page_id URL parameter used in the URL (maybe under the yellow scribble?). It also seems to me that your API is setup to receive "filters" in the body and you are passing "filter" in the additional scope.

Also in case you haven't see it, there's a pretty good explainer of additional scope here with links to other topics related to it.

Hello @Sergiu_Manta!

I agree with @jg80's amazing advice and insight.

I would add on that you might want to try writing a query's URL string using {{ }} to insert the page_id URL into the proper spot of your query string. Definitely double check filter vs filters in the body vs in the additional scope.

I highly recommend the link to the forum post explaining additional scope as it is a complex tool.

Also in the resource you most likely want to take the data from the additional scope and pass in into the correctly corresponding areas for URL parameters/headers/body.

thank you for the link provided @jg80 I managed to make it work.

2 Likes