Changing end point

Hi,

Is there somekind of possibilty to change rest api data source end point.

Example:

I have a button which should call some data source by checking user personal data.

Something like:

method1 = "http://page1.com/api"
method2 = "http://page2.com/api"

If(user.id == 0 )
{
invoke data source method (method1)
}
else
{
invoke data source method (method2)
}

Hope You can understand my question.

Thanks!

Hi @Veljko_Dudukovic,

There are two ways to do that at the moment:

  1. The first doesn't require custom code - you need to have two identical data sources that differ by URL. Then use two similar Invoke Data Source Method actions and set the Condition to determine which one will execute.
  2. The second method requires custom code. Something like step 3 from this tutorial (shows how to make HTTP request via custom method in the Angular component).
1 Like

Hi @korchev,

Thank you again !
I duplicate scheme of first one, but changed url.

I put condition for first end point and the second end point, so code decided which condition is good one.

Thanks !