Asynchronous Logic App in APIM

Jonas Karlsson 6 Reputation points
2022-11-30T15:19:15.4+00:00

When exposing a Logic App in APIM, is there any out of the box functionality to handle asynchronous responses?
The Logic app returns location in the header that is used for polling the status/response. The problem is that the endpoint points directly to the Logic App.
What is the best scenario to route that endpoint through APIM as well. Rewrite policies might work if the endpoint is always the same, https://prod-18.westeurope..... for example.
Anyone got any better solution?

Best regards,
Jonas

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,930 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,970 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sonny Gillissen 3,351 Reputation points
    2022-12-01T19:34:49.303+00:00

    What you could do is create an endpoint on your APIM that connects to the Azure Logic Apps REST API (link). This needs the following data which can be found in the accompanied response headers of the Logic App when called:

    • Workflow Name = x-ms-workflow-name
    • Run Name = x-ms-workflow-run-id

    Only thing you need, next to above two headers, for calling the rest api, is the Resource Group and Subscription ID. These parameters can be filled using:

    • The logic responsible for polling the Logic App
    • Named values from the APIM (where possible)

    Please let me know if this helps, and if I can assist you further.

    0 comments No comments