[wildfly-dev] HTTP API support for plain JBoss-CLI commands

Heiko Braun hbraun at redhat.com
Thu May 28 04:56:33 EDT 2015


You can already use DMR over HTTP. It requires a different content-type ('application/dmr-encoded') and uses a base64 encoded representation of the payload ('ModelNode.toBase64String()'). 

You can describe an operation through the DMR API and then simply do HTTP POST to ‘/management’ endpoint. make sure to use 'application/dmr-encoded’ for both 'Content-Type' and ‘Accept’ headers. 

The response can be parse using 'ModelNode.fromBase64()'.

Hope this helps,
Heiko



> On 27 May 2015, at 19:54, Jairo Junior <junior.jairo1 at gmail.com> wrote:
> 
> I've been working on a Puppet Module for Wildfly [1] that uses his HTTP Management API to perform operations (manage resources/deploys and execute commands), but my command execution code is a little bit limited cause I have to transform from CLI syntax to JSON. e.g.:
> 
> :shutdown(restart=true)
> 
> becomes
> 
> {"operation" : "shutdown", "restart" : "true" }
> 
> Is there any specific reason to not support plain CLI commands through HTTP API? I looked at the code and it didn't see hard to implement this...
> 
> [1] https://github.com/biemond/biemond-wildfly
> 
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev




More information about the wildfly-dev mailing list