Hi
I am trying to get the list of proxies deployed in an environment. I can get the list of proxies available in org, but it doesn't have information about the deployment.
Solved! Go to Solution.
There are two ways to do what you want: the hard way and the easy way.
For the hard way, you would do something like this:
GET :apigee/v1/organizations/:org/apis
Authorization: Bearer :gcp-token
# and then, for EACH proxy in the list
GET :apigee/v1/organizations/:org/apis/:api/deployments
Authorization: Bearer :gcp-token
For the easy way
GET :apigee/v1/organizations/:org/environments/:env/deployments
Authorization: Bearer :gcp-token
This is for X/hybrid. If you are working with Apigee Edge, then it's the same call, but your endpoint and authentication changes.
GET :mgmtserver/v1/o/:org/e/:env/deployments
Authorization: Bearer :edge-token
There are two ways to do what you want: the hard way and the easy way.
For the hard way, you would do something like this:
GET :apigee/v1/organizations/:org/apis
Authorization: Bearer :gcp-token
# and then, for EACH proxy in the list
GET :apigee/v1/organizations/:org/apis/:api/deployments
Authorization: Bearer :gcp-token
For the easy way
GET :apigee/v1/organizations/:org/environments/:env/deployments
Authorization: Bearer :gcp-token
This is for X/hybrid. If you are working with Apigee Edge, then it's the same call, but your endpoint and authentication changes.
GET :mgmtserver/v1/o/:org/e/:env/deployments
Authorization: Bearer :edge-token
Hi @dchiesa1
I was using the api you suggested. But it takes a lot of time and eventually doesn't give any output of the api call in opdk. Could you please suggest any other api?
But it takes a lot of time and eventually doesn't give any output of the api call in opdk.
oh, gosh that's unfortunate. That seems like a bug ... I suggest you contact Google support on that issue. Be prepared to explain what "doesn't give any output" means. How are you invoking it - curl? postman? some other way? What results do you actually see? Does the request time out? Do you get a 200 status code, or something else? If you "manage" the OPDK, then you might want to look into the management server system.log for clues - maybe an exception is logged there.
Could you please suggest any other api?
Did you try "the hard way", as I suggested above? It will also take a long time, but maybe you will get usable results.
Other than those two ways, there are no other APIs you can invoke to give you the API deployments in a particular environment.
Hi @dchiesa1
I got the response. Actually the volume is really large and after some time I got the response. Thank you.