Log request/response body to external storage asynchronously to reprocess of failed transactions in api management

Shekhar Nadide 191 Reputation points
2024-02-27T16:09:55.0666667+00:00

How can we Log request/response body to external storage(service bus, Storage etc) asynchronously to reprocess of failed transactions in API Management?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,074 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,141 Reputation points
    2024-02-28T04:25:22.95+00:00

    @Shekhar Nadide Thanks for reaching out.

    You can leverage the log-to-eventhub policy (sync) to send messages in the specified format to the event hub. You can refer to this example here.

    In case if you don't want to send the events to event hub and want to use the any other service to store those events then you can leverage the send-one-way-request policy and call the respective service endpoint to save/send the data if you don't want to wait for the response from the endpoint (async). Alternatively, you can also use the send-request-policy that will wait for the response from your endpoint (sync).

    Feel free to get back to me if you have any queries or concerns.

    Please 'Accept Answer' if it helped so that it can help others in the community looking for help on similar topics.


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.