JBoss Community

HTTP (JSON-like) API

modified by Kabir Khan in JBoss AS7 Development - View the full document

This is a digest of http://lists.jboss.org/pipermail/jboss-as7-dev/2011-February/000491.html for easier finding.

 

In a nutshell this is another view on the management API available over the http connector installed in standalone.xml/host.xml, normally on port 9990.

 

    <management>

        <security-realms>

            <security-realm name="ManagementRealm">

                <authentication>

                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" plain-text="true"/>

                </authentication>

            </security-realm>

        </security-realms>

        <management-interfaces>

            <native-interface interface="management" port="9999"/>

            <http-interface interface="management" port="9990"/>

        </management-interfaces>

    </management>

 

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/management?recursive

 

To make the output of any GET operation easier to read you can append the "json.pretty" parameter to the end, e.g.:

http://localhost:9990/management?operation=resource&recursive&json.pretty

 

 

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/management/subsystem/web/connector/http

 

A single attribute can be retrieved by specifying the attribute

operation and the attribute name:

http://localhost:9990/management/subsystem/logging/console-handler/CONSOLE?operation=attribute&name=autoflush

 

The full description of the mode can be retrieved using the

read-resource-description operation like so:

http://localhost:9990/management?operation=resource-description&recursive&operations

 

TBD

Document the POST operations, e.g. to create a deployment

Comment by going to Community

Create a new document in JBoss AS7 Development at Community