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

Jason T. Greene jason.greene at redhat.com
Thu Feb 10 11:26:36 EST 2011


On 2/10/11 3:37 AM, Kabir Khan wrote:
> Very cool, but maybe the operation names should be the same as for the native client? i.e. read-attribute instead of attribute and read-resource-description instead of resource-description?
>
> Or is it implicit that GET appends read- and PUT appends write-?

Yes that was the thought was that GET only exposes read so it's 
redundant, although if the mapping confuses people i could switch back 
to the true operation names. It's very important though that GET not be 
allowed to call anything but those few sets of read operations.


>
> How does something like add subsystem look?

All mutation operations will pretty much have to go through POST, which 
would just be a pure RPC operation call like in the native API. We could 
technically do a PUT if we ensured there was a common uniform ADD 
operation for all resources. I'm not sure how useful it will be though. 
We can't use it from the console since some browsers have bugs that 
prevent anything besides GET/POST working via XHR.

>
> On 10 Feb 2011, at 05:36, 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
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>


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



More information about the jboss-as7-dev mailing list