The rest4jmx is a simple service that exposes a Java MBeanServer as a restful API with JSON or JSONP as data protocol. With the service is is possible to:
The service either generates JSON data as application/json or JSONP data as application/x-javascript. To get JSONP use a callback parameter named "callback".
URL: mbeans/domain[?callback=FUNCTION_NAME], for example mbeans/domains
Returns an array of domain names, for example:
["JMImplementation","com.sun.management","org.apache.derby","solr","java.lang","java.util.logging","com.polopoly"]
URL: mbeans/domains/DOMAIN[?callback=FUNCTION_NAME], for example mbeans/domains/java.lang
Returns a domain object containing the domain name and a list of mbean names, for example:
{"domain":"java.lang","mbeans":["java.lang:type=MemoryPool,name=PS Eden Space"]}
URL: mbeans/MBEAN_NAME[?callback=FUNCTION_NAME], for example mbeans/com.polopoly:host=pra-desktop, application=indexserver, module=cm, component=modulecmclient, detailLevel=FINE, group=CacheTimer, name=LockService
Returns an mbean object containing the name of the mbean and an attribute object containing all attributes and their values, for example:
{"name":"com.polopoly:host=pra-desktop,application=indexserver,module=cm,component=modulecmclient, detailLevel=FINE,group=CacheTimer,name=LockService", "attributes":{"unlock":"0 0 0ms","getLocks":"0 0 0ms"}}
URL: mbeans/MBEAN_NAME/ATTRIBUTE_NAME[?callback=FUNCTION_NAME], for example mbeans/com.polopoly:host=pra-desktop, application=indexserver, module=cm, component=modulecmclient, detailLevel=FINE, group=CacheTimer, name=LockService/unlock
Returns and attribute object with a value, for example:
{"name":"com.polopoly:host=pra-desktop,application=indexserver,module=cm,component=modulecmclient, detailLevel=FINE,group=CacheTimer,name=LockService", "attribute":"unlock","value":"0 0 0ms"}
The MBean tree viewer is both an example and a way to view which mbeans are available.