You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-log-event-hubs.md
+3-54Lines changed: 3 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,60 +26,9 @@ This article is a companion to the [Integrate Azure API Management with Event Hu
26
26
For detailed steps on how to create an event hub and get connection strings that you need to send and receive events to and from the Event Hub, see [Create an Event Hubs namespace and an event hub using the Azure portal](https://docs.microsoft.com/azure/event-hubs/event-hubs-create).
27
27
28
28
## Create an API Management logger
29
-
Now that you have an Event Hub, the next step is to configure a [Logger](https://docs.microsoft.com/rest/api/apimanagement/apimanagementrest/azure-api-management-rest-api-logger-entity) in your API Management service so that it can log events to the Event Hub.
29
+
Now that you have an Event Hub, the next step is to configure a [Logger](https://docs.microsoft.com/rest/api/apimanagement/2019-01-01/logger) in your API Management service so that it can log events to the Event Hub.
30
30
31
-
API Management loggers are configured using the [API Management REST API](https://aka.ms/smapi). Before using the REST API for the first time, review the [prerequisites](https://docs.microsoft.com/rest/api/apimanagement/apimanagementrest/api-management-rest) and ensure that you have [enabled access to the REST API](https://docs.microsoft.com/rest/api/apimanagement/apimanagementrest/api-management-rest#EnableRESTAPI).
32
-
33
-
To create a logger, make an HTTP PUT request using the following URL template:
* Replace `{your service}` with the name of your API Management service instance.
38
-
* Replace `{new logger name}` with the desired name for your new logger. You reference this name when you configure the [log-to-eventhub](/azure/api-management/api-management-advanced-policies#log-to-eventhub) policy
39
-
40
-
Add the following headers to the request:
41
-
42
-
* Content-Type : application/json
43
-
* Authorization : SharedAccessSignature 58...
44
-
* For instructions on generating the `SharedAccessSignature` see [Azure API Management REST API Authentication](https://docs.microsoft.com/rest/api/apimanagement/apimanagementrest/azure-api-management-rest-api-authentication).
45
-
46
-
Specify the request body using the following template:
*`description` provides an optional description of the logger and can be a zero length string if desired.
61
-
*`credentials` contains the `name` and `connectionString` of your Azure Event Hub.
62
-
63
-
When you make the request, if the logger is created, a status code of `201 Created` is returned. A sample response based on the above sample request is shown below.
> For other possible return codes and their reasons, see [Create a Logger](https://docs.microsoft.com/rest/api/apimanagement/apimanagementrest/azure-api-management-rest-api-logger-entity#PUT). To see how to perform other operations such as list, update, and delete, see the [Logger](https://docs.microsoft.com/rest/api/apimanagement/apimanagementrest/azure-api-management-rest-api-logger-entity) entity documentation.
81
-
>
82
-
>
31
+
API Management loggers are configured using the [API Management REST API](https://aka.ms/apimapi). For detailed request examples, see [how to create Loggers](https://docs.microsoft.com/rest/api/apimanagement/2019-01-01/logger/createorupdate).
83
32
84
33
## Configure log-to-eventhubs policies
85
34
@@ -112,7 +61,7 @@ Click **Save** to save the updated policy configuration. As soon as it is saved
112
61
*[Receive messages with EventProcessorHost](../event-hubs/event-hubs-dotnet-standard-getstarted-receive-eph.md)
0 commit comments