Azure API Management and Azure Event Hubs integration
Share
Services
We are excited to announce the new Azure Event Hubs integration features of API Management. Azure API Management provides a turn-key, cloud-based solution that helps API publishers create consistent modern API facades for existing backend services, protect APIs from misuse and overuse, productize the APIs, on-board developers, and gain insight into API usage and health. These challenges are common for all API providers, and Azure API Management handles these management and operational challenges and lets you focus on building APIs and deriving value from them.API Management provides a number of analytics reports out-of-the-box, but for deeper customized analysis, monitoring, or troubleshooting, you can now configure your API Management service to log data in the form of events to Azure Event Hubs. Azure Event Hubs is a highly scalable data ingress service that can ingest millions of events per second. These events can then be consumed by Azure Stream analytics, or by any number of custom consumers. Using API Management and Event Hubs you can easily enable scenarios such as the following examples.
* Collect selected request data for online analysis using [Azure Stream Analytics](https://azure.microsoft.com/documentation/services/stream-analytics/) and [Power BI](https://powerbi.microsoft.com/documentation/powerbi-service-get-started/)
* Collect selected request data for offline analysis using [Azure HDInsight](https://azure.microsoft.com/documentation/services/hdinsight/) and [Machine Learning](https://azure.microsoft.com/documentation/services/machine-learning/)
* Keep an audit trail by storing data in [Azure Storage](https://azure.microsoft.com/documentation/services/storage/)
* Relay HTTP messages to a custom rules engine for performing FXCop style analysis on API traffic
* Log exception context for troubleshooting and simplified customer support
* Capture HTTP request and response messages and relay them to a 3rd party service that provides HTTP logging and monitoring services
* 3rd party integration with other services such as billing providers
API Management and Event Hubs integration is enabled by two new API Management artifacts: the [Logger](https://msdn.microsoft.com/library/azure/mt592020.aspx) entity and the [Log to Event Hub](https://msdn.microsoft.com/library/azure/dn894085.aspx#log-to-eventhub) policy. To log API Management events to an event hub simply link your API Management service to the event hub using the [Logger](https://msdn.microsoft.com/library/azure/mt592020.aspx) entity, and then log the desired events using the [Log to Event Hub](https://msdn.microsoft.com/library/azure/dn894085.aspx#log-to-eventhub) policy. By using [policy expressions](https://msdn.microsoft.com/library/azure/dn910913.aspx) and the [context variable](https://msdn.microsoft.com/library/azure/dn910913.aspx#ContextVariables), you can log rich and context aware event data to your event hub.
## Get started
To get started, follow the step-by-step guidance from the [How to log events to Azure Event Hubs in Azure API Management](https://azure.microsoft.com/documentation/articles/api-management-howto-log-event-hubs/) article.
* [Create an Azure Event Hub](https://azure.microsoft.com/documentation/articles/api-management-howto-log-event-hubs/#create-an-azure-event-hub)
* [Create an API Management logger](https://azure.microsoft.com/documentation/articles/api-management-howto-log-event-hubs/#create-an-api-management-logger)
* [Configure Log to Event Hub policies](https://azure.microsoft.com/documentation/articles/api-management-howto-log-event-hubs/#configure-log-to-eventhubs-policies)
## Next steps
* Watch the [Integrate Azure API Management with Event Hubs](https://azure.microsoft.com/documentation/videos/integrate-azure-api-management-with-event-hubs/) companion video walkthrough.
* For a more complex scenario, see [Monitor your APIs with Azure API Management, Event Hubs and Runscope](https://azure.microsoft.com/en-us/documentation/articles/api-management-log-to-eventhub-sample/).
## Learn more about API Management
* [What is API Management](https://azure.microsoft.com/documentation/articles/api-management-key-concepts/)
* [Manage your first API](https://azure.microsoft.com/documentation/articles/api-management-get-started/)
## Learn more about Azure Event Hubs
* [Get started with Azure Event Hubs](https://azure.microsoft.com/en-us/documentation/articles/event-hubs-csharp-ephcs-getstarted/)
* [Receive messages with EventProcessorHost](https://azure.microsoft.com/en-us/documentation/articles/event-hubs-csharp-ephcs-getstarted/#receive-messages-with-eventprocessorhost)
* [Event Hubs programming guide](https://azure.microsoft.com/en-us/documentation/articles/event-hubs-programming-guide/)
* API Management
* Event Hubs
* Features
* [ API Management](https://azure.microsoft.com/en-gb/products/api-management/)
* [ Event Hubs](https://azure.microsoft.com/en-gb/products/event-hubs/)
What else is happening at Microsoft Azure?
Read update
Services
Share
Read update
Services
Share
We’re retiring Azure Time Series Insights on 7 July 2024 – transition to Azure Data Explorer
May 31st, 2024
Services
Share