Wildfly Management API : What is URL for list Servergroups?

436 views Asked by At

How to fetch server group details using Wildfly Management API

https://wildfly.prod.idntegrator.cosng.net/management?operation=attribute&name=server-group

{
    "outcome" : "failed",
    "failure-description" : "WFLYCTL0201: Unknown attribute 'servergroup'",
    "rolled-back" : true
}

I am not able to find much information here: https://docs.jboss.org/author/display/WFLY10/The%20HTTP%20management%20API.html

I tried from Jboss CLI but it has no attribute like servergroup but has /server-group=generic type notation not sure how to put in rest call

1

There are 1 answers

5
James R. Perkins On

As far as I know there is no way to read just the server groups from the HTTP Management API. The best you could do is something like:

http://localhost:9990/management/?operation=resource

This would include an array of the server groups.

"server-group": {
    "main-server-group": null,
    "other-server-group": null
}

From CLI however you can use the read-children-names operation.

/:read-children-names(child-type=server-group)

Example output:

[domain@localhost:9990 /] /:read-children-names(child-type=server-group)
{
    "outcome" => "success",
    "result" => [
        "main-server-group",
        "other-server-group"
    ]
}