How to get list of Developer Apps from particular Product.

Hi ,

Question is when an API proxy is going to get updated, how can we have a List of Developers who are associated with this API?

Every product has an API associated with it and Developer Apps, So for example I have a Product named "Product-ABC" which have 20 Developer App's associated with it.

How can I get List of all those 20 Apps on basis of this product mentioned above?

Following link by apigee has been deprecated and workaround mentioned in this link also is not helpful as this shows detail of particular APP by particular developer what we need is a list of developers on basis of API proxy or maybe Developers Apps list on basis of product.

Regards,

2 5 2,901
5 REPLIES 5

@Haider Imran ,

AFAIK , There is no single API to give you the results. You need to script it / program it using multtiple APIs.

See here for an example tool, implemented in nodejs.

https://github.com/DinoChiesa/apigee-edge-js/blob/master/examples/findAppForApiProduct.js

If you are for some reason against using node, then that tool won't be useful to you. But the logic of the tool is what's important. Here's how it works:

  1. query the apps (not developerapps) in the org.

    GET /v1/o/ORGNAME/apps?expand=true

    The result of that is a sequence of JSON objects shaped like this:

     {
        "accessType": "",
        "apiProducts": [],
        "appFamily": "default",
        "appId": "40ef9b16-33a9-4265-8f74-696117e60bee",
        "attributes": [],
        "callbackUrl": "thisisnotused://www.apigee.com",
        "createdAt": 1515110369899,
        "createdBy": "dchiesa@google.com",
        "credentials": [
          {
            "apiProducts": [],
            "attributes": [],
            "consumerKey": "FzR8Lb6gCMmwF0sq0RoMQ4O44EhAnwBz",
            "consumerSecret": "iDbmn9eYd3xiCwzi",
            "expiresAt": 1515110415273,
            "issuedAt": 1515110370273,
            "scopes": [],
            "status": "expired"
          }
        ],
        "developerId": "Pnqdri84cKF5el71",
        "lastModifiedAt": 1515110369899,
        "lastModifiedBy": "dchiesa@google.com",
        "name": "4mv4d-Field-Filtering-App99",
        "scopes": [],
        "status": "approved"
      },
    
  2. And now it's just a simple matter of filtering that list to find the apps that have credentials, which have an API Product matching the name of the API Product you want to find. In JavaScript, the filter looks like this:
        var filtered = apps.filter(function(app) {
              var creds = app.credentials.filter(function(cred) {
                    return cred.apiProducts.find( function (prod) {
                      return (prod.apiproduct == opt.options.apiproduct);
                    });
                  });
              return creds && (creds.length > 0);
            });
    

You can imagine something similar in Python (I don't speak python) or C# or powershell, or whatever. It's harder to do in bash (shell) because... JSON isn't well supported.

ps: there is another tool called findApiProductForProxy, which does what it's name says. You might want to combine the logic from these two tools to find all apps that use API Products that wrap a specific API Proxy.

Sorry this is a stale question now, but maybe this answer will help someone else.

As Anil says, by scripting the various Apigee Edge APIs together, you can get the information you want.

And here is an example of how to do that: findAppForApiProduct.js

This is a nodejs script that

  • inquires all the apps
  • filters those apps for the ones that are approved for a specific API Product
  • inquires the developer owners of those apps
  • prints the resulting list of developers and their apps

You need nodejs to run it.

The proposed solution will work fine if you have few applications. But in case of real production environment, the number of applications will grow and this approach of filtering the apiproducts from full list is not feasible.