question

AmyZ-5475 avatar image
0 Votes"
AmyZ-5475 asked ariyoshahry answered

Can we consolidate multiple logic apps into one API ?

Hi, we have several logic apps that will be hosted on APIM.
The user hope those logic apps could be treated as one API for API consumers.

Let's say, in logic app
logic app 1 : search contact (url1)
logic app 2 : create contact (url2)
logic app 3 : edit contact (url3)

Each of them has individual endpoint

In APIM, we can add logic API directly through UI, and each logic app will become individual API.

Is that possible to let the result like this ?
API : Contact API
operation 1 : search contact (url1)
operation 2 : create contact (url2)
operation 3 : edit contact (url3)

What comes into our mind is manually setting, not sure if there's any better way to achieve this ?

Need you advice, thank you

azure-api-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ChaitanyaNaykodiMSFT-9638 avatar image
0 Votes"
ChaitanyaNaykodiMSFT-9638 answered ChaitanyaNaykodiMSFT-9638 edited

Hello @AmyZ-5475, Thank you for reaching out. I think the requirement can be achieved by using Advanced policies and Transformation policies in APIM. You can use the Set backend service transformation policy to set a different backend URI based on conditions applied using the Control flow advanced policy. You can refer to this sample policy for implementation only the conditions will be different based on your requirements. Please let me know if there are any additional concerns. Thank you!


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ariyoshahry avatar image
0 Votes"
ariyoshahry answered

The easiest and most flexible way I've found to do this is to start with a HTTP (manually defined API) first. Then create an operation that correspond to the logic App method (POST,GET, etc). Once the operation is added, go to design tab and find the "Backend" section. click on the pencil edit button. From the new panel that appears, select the "Azure Logic App" radio button and browse to your logic app.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.