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:
Is this possible, and if so how?
Thanks,
Christian
Using RestAPI with dynamic endpoint URL
-
- Posts: 6336
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using RestAPI with dynamic endpoint URL
Hello,
You can use a variable and use in it path to JSON file.
Thank you.
You can use a variable and use in it path to JSON file.
Thank you.
- Attachments
-
- Screenshot 2024-03-12 092532.png (25.15 KiB) Viewed 1306 times
Re: Using RestAPI with dynamic endpoint URL
Hi Lech,
very cool - I like your system more every day!
Thanks,
Christian
very cool - I like your system more every day!
Thanks,
Christian
-
- Posts: 800
- Joined: Tue Sep 07, 2021 10:11 am
Re: Using RestAPI with dynamic endpoint URL
Hello,
You are Welcome!
You are Welcome!
Re: Using RestAPI with dynamic endpoint URL
Hi again,
we just noticed that variables in the URL work like a charm, but not in the Headers like so:
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
we just noticed that variables in the URL work like a charm, but not in the Headers like so:
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
-
- Posts: 6336
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using RestAPI with dynamic endpoint URL
Hello,
Unfortunately, in the Headers it is not possible to use variables.
Thank you.
Unfortunately, in the Headers it is not possible to use variables.
Thank you.