Azure API Management product subscription tracking

Viewed 186

I am using Azure API Management for managing our APIs. Its containing product and all. Now I also want to catch some of the customer information into my database.

So my question is : "Is there anyway such that whenever someone is subscribing any product, my API will trigger?"

What I want to do is I will create an API which will fetch the details from Azure via REST API for all subscriptions and I want to call (auto trigger) that API whenever someone subscribe any product successfully. I know we can set the Approval workflow, we can send notification email also to any specific email id, but can we call any HTTP request?

Also if anyone have more idea about Developer portal then please share. (can we customize it, till what level, how, etc.)

Thanks in Advance..

1 Answers

One way is to put an Event Grid system topic on the resource group containing API Management service with

  • filter for Resource Write Success
  • subject filter / Subject begins with /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ApiManagement/service/{apiManagementService}/subscriptions

and forward to Azure Function or WebHook - basically filter for activities logged as Subscribe to product or Update subscription on the resource.

Related