[jboss-as7-dev] HTTP API Status & DMR GWT Prototype

Jason T. Greene jason.greene at redhat.com
Wed Feb 16 01:45:09 EST 2011


We now have post support for both JSON and DMR Encoded:

curl -d '{"operation":"read-resource","address":[],"json.pretty":1}' 
http://localhost:9990/domain-api

curl -H Content-Type:\ application/dmr-encoded -d 
bwAAAAMACW9wZXJhdGlvbnMADXJlYWQtcmVzb3VyY2UAB2FkZHJlc3NsAAAAAAAHcmVjdXJzZVoB 
  http://localhost:9990/domain-api

Also, by default we now compact the JSON for space efficiency. As shown 
in the first example, adding a json.pretty flag to the request or the 
GET query will dump human readable JSON.


On 2/9/11 11:36 PM, Jason T. Greene wrote:
> Last week Brian merged my http api patch into his detyped2; however, the
> most current iteration is here:
>
> https://github.com/n1hility/jboss-as/tree/detyped2
>
> Currently JSON read operations via GET are supported, POST is coming
> soon, now that Jonathan Pearlin, a new contributor, recently completed
> the JSON parser patch he was working on (Thanks Jonathan!). In addition
> a special base64 encoded binary representation is also supported;
> however, I will explain its purpose in another email.
>
> The GET URL form is a mapping of operation addresses, with a few
> supported read operations, and support for mapping top level values via
> query parameters. The default operation is read-resource. So in
> otherwords you can dump the whole management tree like so:
>
> http://localhost:9990/domain-api?recursive
>
> The lack of additional /'s defaults to the root node.
> The lack of an "operation" defaults to the read-resource operation.
> The "recursive" is mapped to the recursive as a boolean, a lack of an
> assignment defaults to "true"
>
> The attributes of the http web connector can be restrieved with:
> http://localhost:9990/domain-api/subsystem/web/connector/http
>
> A single attribute can be retrieved by specifying the attribute
> operation and the attribute name:
> http://localhost:9990/domain-api/subsystem/threads/bounded-queue-thread-pool/jca-short-running?operation=attribute&name=blocking
>
> The full description of the mode can be retrieved using the
> read-resource-description operation like so:
> http://localhost:9990/domain-api?operation=resource-description&recursive&operations.
>


-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jboss-as7-dev mailing list