Passing parameters to Rest API URL


I have a service outside Retool that accepts Rest GET calls such as the following sample URL:

http://[IP Address]/myService/myFunction?parameter1=82&parameter2=90

The above works outside Retool and returns the expected value.

In Retool I created a Rest API resource whose URL is:
http://[IP Address]/myService/myFunction

For testing purpose I have hardcoded the two parameters above and given them values in the Retool UI.

Retool sent the following URL to my service:
http://[IP Address]/myService/myFunction/?parameter1=82&parameter2=90

Note the forward slash "/" added just before the question mark "?". That forward slash has caused the call to my service to fail.

My question is: is there a way I can pass the two parameters to my API in Retool without that trailing forward slash "/" added?

Thank you.

Retool doesn't add a "/" that I am aware of. Just update your base URL to not include it.

Thank you Vinnie,

My service does not add the backslash. However your example showed where I made a mistake: I should have kept the function of the service, the equivalent of your "items", in the next box.

Much appreciate the prompt feedback and very clear example.

Have a great day mate.


1 Like