LOGIC APPS

  • Published
  • Posted in Azure
  • Updated
  • 2 mins read

Logic Apps is a part of Azure App Service, and it is basically used to automate the access and use of data across clouds without writing code. Azure Logic Apps enables customers to quickly build powerful integration solutions that connect applications and services on-premises and in the cloud. It provides a visual designer to model and automates your process as a series of steps known as a workflow. Logic Apps allow developers to design workflows. Logic Apps is a fully managed iPaaS (integration Platform as a Service) allowing developers not to have to worry about building hosting, scalability, availability, and management. Logic Apps will scale up automatically to meet demand. 

We have Created Demo Logic App to Demonstrate how to pull the data from API with pagination and store in Data Lake Storage. 

1.

We have Initialize Variable increment with value 1 which will be further use for pagination

Figure 1 Increment Variable 

2. We have use open API gorest for above logic app API end point:
https://gorest.co.in/public/v1/comments

3.

Text BoxGraphical user interface, text, application, email

Description automatically generated

We have use http logic app object to call data from API

4. We have used parse json to parse data returned from API.

Text BoxGraphical user interface, text, application

Description automatically generated

  1. Sample Json  

    “meta”: { 
    ”pagination”: {
    “total”: 1840, 
    ”pages”: 92, 
    “page”: 1, 
    “limit”: 20, 
    ”links”: { 
    ”previous”: null,
    “current”: ”https://gorest.co.in/public/v1/comments?page=1″, 
     “next”: ”https://gorest.co.in/public/v1/comments?page=2″ 


    }, 
    ”data”: [ 

    ”id”: 27, 
    “post_id”: 21, 
    “name”: ”Indira Desai”, 
    ”email”: ”desai_indira@pacocha.name”, 
    ”body”: ”Cumque aliquid consequuntur. Et et voluptas.” 

   } 

6. We use pages parse through json to know total number of pages and loop until all pages are called using until loop Activity

Text BoxGraphical user interface, text, application

Description automatically generated

7.

Text BoxGraphical user interface, text, application, email

Description automatically generated

Figure 5: Azure Blob Creation

8. We then Increment the variable by 1 until all pages are traversed.  

Text BoxA picture containing graphical user interface

Description automatically generated


9. We Can Set Limit On no of times Until loop to Run If we have estimation on total number of pages. I have set limit to 100 since total number of pages returned by API are

Text BoxGraphical user interface, text, application

Description automatically generated


Figure 8 Logic app execution

10.

Chart

Description automatically generated with medium confidence

Logic App Calls API HTTP request 92 times since number of pages.

11. 92 json file are generated named according to page number and are store storage account container test. 

Text Box

Graphical user interface, application

Description automatically generated

Text BoxTable

Description automatically generated

Aniket Ghodinde
Data Engineer
Addend Analytics

Addend Analytics is a Microsoft Gold Partner based in Mumbai, India, and a branch office in the U.S.

Addend has successfully implemented 100+ Microsoft Power BI and Business Central projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia.

Get a free consultation now by emailing us or contacting us.