Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

List of API Products of a particular API proxy

Hi @dchiesa1 ,

Is there a API to retrieve the list of API Products of a particular API?

If we use

 https://api.enterprise.apigee.com/v1/organizations/{org_name}/apiproducts/{apiproduct_name} 

...we will receive the API proxies list inside that particular API Product. Instead I want to get the list Products that have authorization for a particular API.

I am in search of something like this 

https://api.enterprise.apigee.com/v1/organizations/{org_name}/apis/{apiproxy_name}  

Output:

{
"apiproxy" : "TestProxy",
"products" : ["TestProduct1","TestProduct2","TestProduct3"]

}

Solved Solved
1 6 8,602
2 ACCEPTED SOLUTIONS

Hi Rohit,

Unfortunately this capability does not currently exist within the organization.apis.get API as you described above. For now you'd be best served to use the organizations.apiproducts.list API with the "expand" parameter set to true. With the results from that query you can extrapolate the information needed to list the products for each API proxy. Note, however, that the results won't mention any API proxies that aren't associated with a product at all. To find which APIs are missing use the organizations.apis.list API.

View solution in original post

Just FYI, here is a script  that does just what Raven suggests: searches through the list of products and finds those products that have authorization for a particular proxy. 

find it here.

example

$ node ./findApiProductForProxy.js --apigeex --token $TOKEN -o $ORG --proxy producttest-1
[2022-Aug-19 11:12:19] total count of API products for that org: 4
[2022-Aug-19 11:12:19] count of API products authorized for producttest-1: 1
[2022-Aug-19 11:12:19] list: TestingProduct

View solution in original post

6 REPLIES 6

Hi Rohit,

Unfortunately this capability does not currently exist within the organization.apis.get API as you described above. For now you'd be best served to use the organizations.apiproducts.list API with the "expand" parameter set to true. With the results from that query you can extrapolate the information needed to list the products for each API proxy. Note, however, that the results won't mention any API proxies that aren't associated with a product at all. To find which APIs are missing use the organizations.apis.list API.

Hi @ravenhedden ,

Thank you for the inputs!

The API which I requested would be a nice to have. This can be used to show case a particular API is being used by "n" number of consumers. And also to sort the APIs in order of most sold on the Developer Portal or custom Dashboards.

Just FYI, here is a script  that does just what Raven suggests: searches through the list of products and finds those products that have authorization for a particular proxy. 

find it here.

example

$ node ./findApiProductForProxy.js --apigeex --token $TOKEN -o $ORG --proxy producttest-1
[2022-Aug-19 11:12:19] total count of API products for that org: 4
[2022-Aug-19 11:12:19] count of API products authorized for producttest-1: 1
[2022-Aug-19 11:12:19] list: TestingProduct

Hi @dchiesa1 , @ravenhedden ,

Is there a way to make a request to Management Server from API proxy?

Yes, of course.  The Apigee API is available via a REST endpoint.  

Thank you!