Azure API Management product subscription tracking - azure

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..

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

Send azure monitor alert to slack not working

I am sure this has been asked many times but am unable to find relevant answer. Is there any way to send Azure monitor alerts to slack via Logic apps or some other way. I have found this template - https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app and integrated it into my azure system but it is not working.
Have tried some work around mentioned at - https://github.com/Azure/azure-quickstart-templates/issues/3319 but all in vain
Direct Webhook from action group using slack incoming webhook is not supported , as azure sends alert using its own schema.
Any input is highly appreciated ...
Azure Logic Apps is definitely an option, but if you are not needing complicated workflows, just send the alert directly from Azure Monitor to a Slack channel. You can do this by generating a unique email for the Slack channel and using that email in your Azure Monitor alert action group settings. Another option would be to send the alert to your company alert email inbox and have it automatically forwarded to that Slack channel email address. With this approach you completely remove the dependency and complexity of Azure Logic Apps.
https://slack.com/help/articles/206819278-Send-emails-to-Slack#h_01F4WDZG8RTCTNAMR4KJ7D419V

Correct flow for Stripe payout in a higher level view

I have a scenario in that I will create a payout flow (based on Stripe's APIs) for 2 participants. One is the platform owner, the other is the customers who use the platform service. The platform owner creates a service that allows his customers to register to his platform service, and to provide services to customers' end users (customer's customers). The payout flow then will transfer money from the platform owner's bank account to the customers (a list of customers who registers to platform owner's service) manually when the platform owner confirms to pay by pressing a payout button.
I've done some research, but I am still not sure about the correct steps for processing this payout flow. The doc I found so far is [1], which looks like the one that fits my scenario. So my first question - Is the doc[1] the right direction to work on?
If that's correct, a few more questions. In the step 2.5's return_url[2] section, the doc mentions to listen to the account.updated event. I create a webhook e.g. https://example.com/return and listening to that event. And the webhook can receive the account.updated event without a problem. However, in the section 2.4[3], after creating an account link, Stripe returns an url like https://connect.stripe.com/setup/c/<random string>, which asks user to fill in info including
BUSINESS DETAILS
MANAGEMENT AND OWNERSHIP
After clicking the submit button, if the return_url is configured to reuse the webhook i.e. https://example.com/return. The service will return following error
{"code":405,"message":"method GET is not allowed, but [POST] are"}
Otherwise redirecting result will return
{"code":404,... }
I understand it's because the webhook /return I setup listening to POST operation. If return_url should be handled in GET, what parameters will passed to that return_url. I search online, but I do not see any explanation. Any docs or code that may provide some related info? I appreciate any suggestions. Thanks.
[1]. https://stripe.com/docs/connect/add-and-pay-out-guide
[2]. https://stripe.com/docs/connect/add-and-pay-out-guide?integration=with-code#return_url
[3]. https://stripe.com/docs/connect/add-and-pay-out-guide?integration=with-code#with-code-redirect-to-account-link

Accessing ms teams activity feed

Is there any way to send activities that are happening in external application to ms teams activity feed through any api.Now I have designed a blog where other users can like comment and follow my post in the blog.So I want to get all the activities that are happening in my blog to ms teams.
The Microsoft Graph REST API uses a webhook mechanism to deliver change notifications to clients. A client is a web service that configures its own URL to receive notifications. Client apps use notifications to update their state upon changes.
subscription operations require read permission to the resource. For example, to get notifications for messages, your app needs the Mail.Read permission.
Please look at change notification API

Purchase SendGrid Twilio Email Activity Feed API when using Azure Resource Groups

I want to be able to see the status and activity of an email through SendGrid API. There is a help page for getting started with the Email Activity Feed API however it says i need to purchase history. Purchasing is controlled through the Azure web portal which has completely different pricing tiers from the normal SendGrid portal. It also has no option for purchasing the Activity History as the documentation indicates i should do.
I've tried making the purchase through the SendGrid Portal, but it seems to be blocked for my account. It says "You don't have permissions to view this page. You can request access from your account administrator." even though I created this resource.
Is this API even available to Azure users?

Should my customers purchase an API plan if I am a partner?

I have a simple question. We are a CRM and are integrating with Docusign. So, whenever our customers want to send an envelope, they can send it from the CRM.
Do our customers have to purchase a separate API plan with Docusign?
From what I have read through, that is not the case but API limit of 1000 API calls per hour apply.
Can anyone confirm this?
You'll want to talk to your Account Manager for specific recommendations, or the Sales team if you don't have one.
As a general matter, you would need to own an API plan as the integration's owner but your customers could use your integration on any DocuSign account that has the appropriate level of features/functionality.

Resources