问题
I need to Pull data from a 3rd party API and minor process that data and then send it to DB. Is there any connector to pull API data using Logic App? Any connector or Action? How to start.
回答1:
It seems you wants to fetch data from any API
using logic App right?
Yes you can do it using Logic Apps Custom Connector
on azure portal
see the screen shot below:
How to connect any API with Custom Connector:
Step 1: Create New Custom Connector
To create a Custom Connector
go to azure portal and in All services
search for Logic Apps Custom Connector
click on it and Add New Connector. see the screen shot:
Step 2: Edit Custom Connector
Once you have created new custom connector then to add your API
with it you have to Edit
it to configure your API
request and response with the new custom connector
Step 3: Configure Custom Connector
There are 3 part of custom Connector
1. General
Here you would see Host
enter your API
main domain name like dotnetavalanche.azurewebsites.net
Leave base URL blank
2. Security
For test propose no authentication required just leave it blank
3. Definition
enter a Summary
note , description
but surely enter a Operation ID
which should unique like TestAPI
Request
Then in Request
selection click on Import from sample
and enter your API method type Like POST
or GET
Full UR
L of your API
for example: https://dotnetavalanche.azurewebsites.net/api/PartnerBotRequest
See the screen shot:
Response:
Here click on Add default response
and add Json
of your expected response from API
Call Your custom Connector On Azure Logic App
Go to azure logic App
and click on Http Request
on Request Body JSON Schema
paste below JSON
{
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
Then click on Next Step
and add your custom connector like below:
Then finally add new Step
as Response
Configure the response as below screen shot:
If you still have any query feel free to share. Thanks and happy coding!
来源:https://stackoverflow.com/questions/56218290/pull-data-fro-api-using-azure-logic-apps