1
votes

I am currently trying out Azure Logic Apps and am now trying to create a first simple flow that acquires data from an external REST API.

I'm using FRED, a hosted Node-Red instance, to create an REST API end-point. In FRED you use https://x_y.fred.sensetecnic.com/api/hello to access my mock API (where x_y is my user name).

Accessing "https://x_y.fred.sensetecnic.com/api/hello" in a browser returns the intended data as specified in the Node-Red flow. Same thing goes when accessing "https://x_y.fred.sensetecnic.com/api/hello" using GET in Postman (then adding two required Headers, required by FRED).

The strange thing is that in my Azure Logic App, I am not able to even save the flow with my URI stated as "https://x_y.fred.sensetecnic.com/api/hello". It states "Enter a valid URI". I enter the headers as was required.

So I can get to the REST API directly from a browser or using Postman, but are not able to access it from within an Azure Logic App.

1

1 Answers

3
votes

I test the problem is there is a special characters _ in your URI. You could have a try if you delete _ then it won't state error.

So you coudl Initialize a variable to store your name x_y, then insert the variable in the URI. The flow would be like this. If you don't find the name in Dynamic content, you could use variables('name') this expression to insert it.

enter image description here

With this way the GET method will run correctly.

enter image description here