Wednesday, January 12, 2022

Import Logic Apps (Standard) into Azure API Management

API Management (APIM) is a way to create consistent and modern API gateways for existing back-end services. API Management helps organizations publish APIs to external, partner, and internal developers to unlock the potential of their data and services.

 

Azure Logic Apps is a cloud-based platform for creating and running automated logic app workflows that integrate your apps, data, services, and systems. With this platform, you can quickly develop highly scalable integration solutions for your enterprise and business-to-business (B2B) scenarios. To create a logic app, you use either the Logic App (Consumption) resource type or the Logic App (Standard) resource type. The Consumption resource type runs in the multi-tenant Azure Logic Apps or integration service environment, while the Standard resource type runs in single-tenant Azure Logic Apps environment.

 

This blog walks you through step by step on how to import Logic App (Standard) into Azure API Management. For how to import a Logic App (Consumption) into APIM, please refer to our public doc

 

Prerequisites—

 

The functionality to directly import from “Create from Azure Resource” is not available for workflows in Logic App (Standard) yet. We will demonstrate how to overcome this limitation in the followings.

 

Steps to import Logic App (Standard) into Azure API Management:

========================================================

 

As an alternative, to import the Logic App (Standard) we can manually register the Request trigger URL from workflows as a blank API in APIM service.

 

  1. We will need to divide the Request URL(i.e., Logic Apps Workflow URL) into two parts to put into the backend and frontend.

For example – this request URL can be broken into 2 segments—


https://stdla1.azurewebsites.net:443/api/TESTWF1/triggers/manual/invoke?api-version=2020-05-01-pre...>

 

  

  1. We need to place the part 1 URL into either Webservice URL Or Backend HTTP(s) endpoint by clicking on highlighted part as portrayed below

 

Sravani_Masapalli_0-1641759772367.png

 Or

  • Place the part 1 URL of Workflow URL into the backend HTTP(s) endpoint by clicking on highlighted part as portrayed below

Sravani_Masapalli_1-1641759772372.png

 

  • Then select target as HTTP(s) endpoint and click on override and provide the first part of your request URL as shown in the screenshot.

Sravani_Masapalli_0-1641760267339.png

 

  1. Next add part 2 URL into the frontend section as depicted in the screenshot below.

Sravani_Masapalli_3-1641759772380.png

 

Sravani_Masapalli_4-1641759772384.png

 

  1. On testing, it gives 200 OK response.

Sravani_Masapalli_5-1641759772386.png

 

Similarly, you can add various workflows as different operations in the same API. This method is useful for Logic App (Standard) Workflows.

Happy Learning!! :)

 

Posted at https://sl.advdat.com/3nlUqd0