How can I call my Logic App from API app in Azure? - azure

Here is my task and may looks very simple. I've two APIs named API-A and API-B. I need to create a Logic App in between these two APIs. API-A should call my Logic App and Logic App should call API-B.
Please help me the steps to do it.
Thanks,
Siva

Yes.
1) Create API App/Web API
2) Deploy API app to Azure or somewhere
3) Get the address of that. For example, http://example.com/api/values is the default.
4) Create Logic App
5) Add HTTP action, with the GET verb, and paste http://example.com/api/values to the URI.
6) Click + below your action and select POST, paste URI and in the BODY field click on the Body button to insert the content from the previous action - it should be there automatically.
Here, in the default API app, the first HTTP action will invoke the GET action of the controller which should return "value1", "value2". Then it send that content to the POST action of the second HTTP action.

Related

Using Azure Logic App HTTP Action with many endpoints

I'm using an HTTP Action inside an Azure Logic App. I want to send requests to an adress www.example.com with many endpoints (\1, \2 ..).
I don't want to create an HTTP Action for every endpoint, so is there any way to specify all those endpoints in a file and use a kind of lood in that action?
Thank you
Multiples end points
mydomain dot com /Java, /Csharp, / Js
You follow blew steps.
Create array object.
[
{"language":"Java","Book":"P.K Sharma"},
{"language":"CSharp","Book":"S.K Sharma"},
{"language":"JS","Book":"J.K Sharma"}
]
Initialize variable.
Create variable.
For each loop
Add action in for each loop.
Http action
More information on Call, trigger, or nest logic apps by using HTTPS endpoints in Azure Logic Apps by Microsoft Documents.

What is the "Resource" when setting up a call to REST API from ADF with Managed Indentity

I have created an Azure Function App and I can call it from browser with a URL similar to this:
https://myfunctionblahblh.appserviceenvironment.net/api/names/Peter/TGIF?code=my_function_app_key_Goes_Here
Now I want to call it from my ADF pipeline: So I dropped a Web activity and set it up like this so far:
So my question is what is the "Resource" that it is asking for? Also in the URL that for company reasons I have blacked out, imagine I have copied the URL of the function I pasted above, is that correct ?
The Resource field is where you specify the uri for the service that you want to send the token to. In the case of authenticating with managed identities, you will want to send it to "https://management.azure.com/". However, if your function is already authenticating with the "code" query string parameter, you may be able to set the Authentication field to "None".

Enter a valid URI error in Azure Logic Apps

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.
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.
With this way the GET method will run correctly.

Pass extra parameters in ADAL return URL

I am using ADAL to authenticate a web app registered in Azure. Basically I am following this link
Is there any way I can pass additional parameters to CatchCode function. For example, lets say I need to provide CatchCode with ID of the currently selected item in database.
Any idea?
In your sign-in request URL, there's a state querystring parameter which gets returned along with the response. You can use this to pass the information your application needs when a user is returned back to your application after signing in. You can read more about this here: https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx.

Azure Mobile Services : GET operation from table

I'm trying to get data from a table I created in Azure Mobile Services.
When I setup the service, I created a new database to go along with it.
I've added a row of data to my table called TODOITEM and can query this row of data fine from the db admin tool on Azure.
Now what I'm trying to do is run a GET request on this table, as documented here...
https://msdn.microsoft.com/en-us/library/azure/jj677199.aspx
I am using Fiddler and trying to send the following request with HTTP 1.1...
https://mobilemeshtest.azure-mobile.net/tables/todoitem
X-ZUMO-APPLICATION: my azure mobile services key
X-ZUMO-AUTH: my facebook authentication key
Host: mobilemeshtest.azure-mobile.net
No matter what I try, all I get back is a 404 not found.
I'm even copying what the guy did in a PluralSight video tutorial on Azure Mobile Services, and he gets a correct 200 response.
I can't see what I'm doing wrong.
404 is pretty simple. The url is wrong.
Propably you have not set your Controller right.
If your Controller is named SomethingController then the route is /tables/Something assuming you havent customized the default Routing methods
Application Key and Authorization Key is not needed if you haven't specified the corresponding authorization attribute
for example : [AuthorizeLevel(AuthorizationLevel.User)]
RESOLVED : I was using a .NET backend, it seems one has to publish their data objects and controllers first using Visual Studio.
This blog post has a good example on how to achieve this.
If I was using the Javascript backend option, the controllers are automatically setup for you.

Resources