How to use Azure Function App to perform advanced property mapping with API Management Service?

RichPro 20 Reputation points
2023-11-10T13:38:21.2433333+00:00

Currently I am searching for the best way to accomplish the following. I have an API Management instance which contains an API with lots of endpoints. Basically all endpoints are just passthrough endpoints and forwarded to an external service. All resources are deployed via Bicep and that works great. Now, my next goal is to experiment with Azure Function Apps to perform some advanced property mapping, on only a few endpoints, and then forward the mapping results to the external service. I have red a lot of documents and threads describing this feature. However, I am a bit off track on the absolute best practise and best way to accomplish this. Should I define a back-end service in API Management to attach my Function App or should I just call the azure Function App in my end-points policy with the send-request policy? What should be the best approach for my situation?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,130 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,003 questions
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 27,181 Reputation points
    2023-11-10T16:15:31.54+00:00

    @RichPro Thanks for reaching out. You can define your Function App as a backend service in APIM. This allows you to manage and monitor your Function App like any other API in APIM. You can apply policies, use APIM's built-in analytics, and take advantage of other APIM features. This approach is useful if you want to manage your Function App in the same way as your other APIs.

    You can use the send-request policy in APIM to call your Function App from within an API operation. This allows you to call the Function App as part of the API's processing pipeline. This approach is useful if you want to use the Function App for processing requests or responses, such as transforming data or performing calculations.

    In your case, since you want to use the Function App for "advanced property mapping" on a few endpoints, the send-request policy might be a good fit. You can call the Function App from the endpoints that need the property mapping, perform the mapping in the Function App, and then continue processing the request in APIM.

    However, the best approach depends on your specific needs and constraints. I would recommend experimenting with both methods to see which one works best for you.

    let me know if you have any questions, I would be happy to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.