Alert all consumers of a product

Using Edge

Looking for a way to automatically alert/email all consumers of a product.  Has anyone done this before?

0 1 93
1 REPLY 1

Looking for a way to automatically alert/email all consumers of a product. Has anyone done this before?

Hmm. Well there is no built-in way, no pushbutton way, to email all consumers of a product. And by "consumers" I guess you mean registered developers who have apps that are authorized on an API product.

But there is a pretty straightforward way to automate what you want, if you are able to write some scripting logic, or a headless app.

Basically, your logic is

  1. retrieve all developers registered in Apigee
  2. for each developer
    1. retrieve all apps registered for that developer
    2. for each app
      1. iterate through all "credentials" (key pairs) for that app, and find those that are registered for your target product.
      2. if found, add the current developer to the "found" list.
  3. With the found list, email each one with your notice.

For steps 1 and 2 (find the list of developers), there's an example nodejs script that will do this for you. https://github.com/DinoChiesa/apigee-edge-js-examples/blob/main/findAppForApiProduct.js

But I've seen customers do this in C#, and other languages too.  You could do it in a bash script (using curl) or a powershell script (using Invoke-RestMethod) pretty easily also.