dotnetavalanche
dotnetavalanche

Reputation: 890

Pull data fro API using Azure Logic Apps

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.

Upvotes: 1

Views: 3108

Answers (1)

Md Farid Uddin Kiron
Md Farid Uddin Kiron

Reputation: 22515

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:

enter image description here

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:

enter image description here

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

enter image description here

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

enter image description here

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 URL of your API for example: https://dotnetavalanche.azurewebsites.net/api/PartnerBotRequest

See the screen shot:

enter image description here

Response:

Here click on Add default response and add Json of your expected response from API

enter image description here

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:

enter image description here

Then finally add new Step as Response

Configure the response as below screen shot:

enter image description here

If you still have any query feel free to share. Thanks and happy coding!

Upvotes: 3

Related Questions