I know Apigee is built on Java, and I found an old list of JARS in the community (circa Spring v3.2), but the post was over a year old. We are using Spring Boot for the Backend Microservices, and Ideally like to use the Java Callout to interact with the Audit Service produced by a microservice. How can I query the loaded Java Jar files and versions?
I tried:
http://myManagementAPIServer:8080/v1/organizations/myorg/environments/dev/resourcefiles
At the ORG and Api level too, and I get an empty response—call works but nothing loaded:
JAR Files in Environment ...
HTTP/1.1 200 OK Content-Type: application/xml Date: Mon, 09 Nov 2015 22:34:15 GMT Content-Length: 73 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ResourceFiles/>
Obviously I am making the wrong call, but I can’t figure out which Management API I need to call to obtain the loaded Apigee JAR/versions?
This seems strange, your call seems to be fine. Only issue i could think is the jar files are not added properly. I used below call on console and it listed all my resources.
curl -v -u adminid:password http://myManagementAPIServer:8080/v1/organizations/orgname/environments/envname/resourcefiles/
Can you please tell me what commands you have used to add the file?
Regards,
Remeesh
Hi @johndohoney
As you may know, resource files like Java JARs can be loaded into Edge with various scopes.
Your example URL is querying resource files for a particular environment. If that list is empty, is it possible you haven't explicitly uploaded any JARs into the environment?
The easiest test for you might be to simply upload the JAR for the the jar you want to re-use into the set of resource files for an environment. You would do this using the corresponding POST call. This is documented here.
For example, suppose you have a jar that implements an Audit service. I think something like this would work:
curl -i -X POST -n \ -H accept:application/json \ -H Content-type:application/octet-stream \ --data-binary @my-audit-service.jar \ "http://edgeadminserver:8080/v1/o/myorg/e/myenv/resourcefiles?name=AuditService&type=java"
And then you could query the list of resources in that environment, like this:
curl -i -X GET -n \ -H accept:application/json \ "http://edgeadminserver:8080/v1/o/myorg/e/myenv/resourcefiles"
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |