How to get list of app id's for specific api product,Get list of App Id's for an Api Product

We are looking for a way to get the list of all developers for our api products.

From apigee docs, we found a way to achieve developer id/email by fetching the corresponding app id form api products. As of now we are using below request url: https://api.enterprise.apigee.com/v1/organizations/{org_name}/apiproducts/{apiproduct_name} which we found in apigee docs at https://apidocs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/apiproducts/%7Bapiproduc...

Blocker: With the above request url provided in apigee docs, we are able to get maximum of 100 app ids' for the given api product.

Query:How can we overcome the restriction on count of app id's or could you please provide us a way to get the list of app id's associated for an api product.

,

We are looking for a way to get the list of all developers for our api products. From apigee docs, we found a way to achieve developer id/email by fetching the corresponding app id form api products. As of now we are using below request url:

https://api.enterprise.apigee.com/v1/organizations/{org_name}/apiproducts/{apiproduct_name} which we found in apigee docs at https://apidocs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/apiproducts/%7Bapiproduc...

Blocker: with the above request url provided in apigee docs, we are able to get maximum of 100 app ids' for the given api product.

Query:How can we overcome the restriction on count of app id's or could you please provide us a way to get the list of app id's associated for an api product.

0 1 720
1 REPLY 1

In order to get the list of all developers, use /developers api [1] instead:

curl "https://api.enterprise.apigee.com/v1/organizations/{org_name}/developers?expand=true&count=10"

If you want to find out which developers are for specific product, there is no direct API to filter that for you but you could use a combination of /apps API [2] and `jq` [3] to process the JSON returned from API.

curl "https://api.enterprise.apigee.com/v1/organizations/{org_name}/apps?expand=true&rows=100&startKey={your_last_app_id}" -s | jq '.app[] | {name, developerId, product: .credentials[].apiProducts } | select( .product[0].apiproduct=="{product_name}")' 

Query parameter "rows" specifies how many records to return, "startKey" specifies the anchor for pagination. For eg.

curl "https://api.enterprise.apigee.com/v1/o/{org_name}/apps?startKey=d03fe537-5e83&rows=200"

will give you the next 200 records after appid "d03fe537-5e83" .

References

[1] Developers api: https://apidocs.apigee.com/docs/management/apis/get/organizations/%7Borg_name%7D/management/apis/get...

[2] Apps api: https://apidocs.apigee.com/docs/management/apis/get/organizations/%7Borg_name%7D/management/apis/get...

[3] JQ: https://stedolan.github.io/jq/