Page 1 of 1

Using RestAPI with dynamic endpoint URL

Posted: Mon Mar 11, 2024 1:30 pm
by notme
Hi,

we are just testing Stimulsoft, so probably my question is really newbee like ;-)

In our reports we want to get the data from a backend via RestAPI. The response is JSON formatted data.
So I thought that the "JSON Data" source is the right one. But the endpoint URL can vary, e.g. in development the backend runs on localhost, in production on a "real" server.
We would like to use a parameter/variable instead of the fixed URL:
json.png
json.png (23.36 KiB) Viewed 1383 times
Is this possible, and if so how?

Thanks,
Christian

Re: Using RestAPI with dynamic endpoint URL

Posted: Tue Mar 12, 2024 8:27 am
by Lech Kulikowski
Hello,

You can use a variable and use in it path to JSON file.

Thank you.

Re: Using RestAPI with dynamic endpoint URL

Posted: Wed Mar 13, 2024 7:12 am
by notme
Hi Lech,
very cool :D - I like your system more every day!

Thanks,
Christian

Re: Using RestAPI with dynamic endpoint URL

Posted: Wed Mar 13, 2024 7:13 am
by Max Shamanov
Hello,

You are Welcome!

Re: Using RestAPI with dynamic endpoint URL

Posted: Wed Apr 03, 2024 1:26 pm
by notme
Hi again,

we just noticed that variables in the URL work like a charm, but not in the Headers like so:
header.png
header.png (29.34 KiB) Viewed 1240 times
We pass the AuthToken as variable to the report, so that it can call the rest endpoint.
Is there any other way to get this working? Or could this be implemented?

Thanks!
Christian

Re: Using RestAPI with dynamic endpoint URL

Posted: Thu Apr 04, 2024 7:08 am
by Lech Kulikowski
Hello,

Unfortunately, in the Headers it is not possible to use variables.

Thank you.