Is there an API or set of APIs that can be used to retrieve all proxies running and/or deployed on a given MessageProcessor?

I would like to know if there is an API that allows us to get the message processor associated with a proxy at run time.

Solved Solved
0 7 385
1 ACCEPTED SOLUTION

jhans
Participant II

@AMAR DEVEGOWDA

Here is the API call:

I have tried it on my instance.

[root@ip-10-229-19-108 ~]# curl -v http://10.229.19.108:8082/v1/runtime/organizations/testsap/environments/prod/apis  -u jhans@apigee.com
Enter host password for user 'jhans@apigee.com':
* About to connect() to 10.229.19.108 port 8082 (#0)
*   Trying 10.229.19.108... connected
* Connected to 10.229.19.108 (10.229.19.108) port 8082 (#0)
* Server auth using Basic with user 'jhans@apigee.com'
> GET /v1/runtime/organizations/testsap/environments/prod/apis HTTP/1.1
> Authorization: Basic **********************
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.229.19.108:8082
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Thu, 25 Jun 2015 07:07:27 GMT
< Content-Length: 10
<
* Connection #0 to host 10.229.19.108 left intact
* Closing connection #0
[ "test" ][root@ip-10-229-19-108 ~]



This is just meant for OPDK customers. For Cloud customers only Apigee Support will be able to run this call. This is for specific to message processor only. 

You will be able get the runtime apis deployed on Message processor.

View solution in original post

7 REPLIES 7

Dear @AMAR DEVEGOWDA ,

You can use Get API Proxy Deployments API.

Gets a list of all API proxies that are deployed to a specific environment along with message processor id's and other information.

https://api.enterprise.apigee.com/v1/organizations/{ORGNAME}/environments/{ENVIRONMENT}/deployments

More details find here.

You can't filter by given Message Processor in the API itself but you can parse above api results and get all proxies running on a given Message Processor.

FYI, You can find all Apigee Management API reference here.

Hope it helps.

Cheers,

Anil Sagar

Former Community Member
Not applicable

Hi @AMAR DEVEGOWDA there are management APIs that will give you information of all the proxies. Then you can invoke the Get Proxy Deployment details API to get the deployment details of that specific proxy.

Thanks Anil and Prithpal for your quick responses.

1. The suggestion provided by you both, that is, invoke the API in the link https://community.apigee.com/questions/6035/is-there-an-api-or-set-of-apis-that-can-be-used-to.html allows us to get the message processors associated for a specific proxy statically.

2. I would like to know if there is an API that allows us to get the message processor associated with a proxy at run time.

Thank you @AMAR DEVEGOWDA for more details. I have update the question description so that it will be helpful for others. Glad your issue has been resolved.

jhans
Participant II

@AMAR DEVEGOWDA

Here is the API call:

I have tried it on my instance.

[root@ip-10-229-19-108 ~]# curl -v http://10.229.19.108:8082/v1/runtime/organizations/testsap/environments/prod/apis  -u jhans@apigee.com
Enter host password for user 'jhans@apigee.com':
* About to connect() to 10.229.19.108 port 8082 (#0)
*   Trying 10.229.19.108... connected
* Connected to 10.229.19.108 (10.229.19.108) port 8082 (#0)
* Server auth using Basic with user 'jhans@apigee.com'
> GET /v1/runtime/organizations/testsap/environments/prod/apis HTTP/1.1
> Authorization: Basic **********************
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.229.19.108:8082
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Thu, 25 Jun 2015 07:07:27 GMT
< Content-Length: 10
<
* Connection #0 to host 10.229.19.108 left intact
* Closing connection #0
[ "test" ][root@ip-10-229-19-108 ~]



This is just meant for OPDK customers. For Cloud customers only Apigee Support will be able to run this call. This is for specific to message processor only. 

You will be able get the runtime apis deployed on Message processor.

Not applicable

This can be run on Edge as well as Private Cloud:

#!/bin/bash UNAME=$USERID PASSWORD=$USERPASSWORD for ORG in `curl -s -X GET -H "accept:application/xml" https://api.enterprise.apigee.com/v1/o/ -H "p:p" -u $UNAME:$PASSWORD | sed 's/ //g' | sed -e 's/<[^>]*>//g' | sed '/^$/d'` do for API in `curl -g -X GET https://api.enterprise.apigee.com/v1/organizations/$ORG/apis -u $USERID:$USERPASSWORD | sed 's/\"//g' | sed 's/,//g' ` do curl -g -X GET https://api.enterprise.apigee.com/v1/organizations/$ORG/apis/$API/deployments -u $USERID:$USERPASSWORD done echo

done

NB. You'll need to add your org name for Edge after the /o

Unless you're an apigee admin.