Retrieving data for a node in the tree obtains the following information about the REST resource that represents the node:
A list of the REST methods that the resource supports
A list of the attributes of the resource and their values
A list of URLs to the children of the resource
You can specify the format in which this information is presented. For more information, see Formats for Resource Representation.
Ensure that the server is running.
Operations on REST resources for GlassFish Server data require a running server.
Use the GET method on the REST resource that represents the node.
This example uses the cURL utility to retrieve data for the resource for a domain. The example uses the following options of the cURL utility:
-X to specify that the GET method is used
-H to specify that the resource is represented in JavaScript Object Notation (JSON)
In this example, the DAS is running on the local host and the HTTP port for administration is 4848.
Line breaks are added to enhance readability.
curl -X GET -H "Accept: application/json" http://localhost:4848/management/domain { "Domain":{"log-root":"${com.sun.aas.instanceRoot}/logs", "application-root":"${com.sun.aas.instanceRoot}/applications", "locale":"", "version":"74.1"}, "Methods":{ "Method":{ "Name":"POST", "Message Parameters":{ "log-root":{"Key":"false", "Type":"string", "Optional":"true"}, "application-root":{"Key":"false", "Type":"string", "Optional":"true"}, "locale":{"Key":"false", "Type":"string", "Optional":"true"}, "version":{"Key":"false", "Type":"string", "Optional":"true"} } }, "Method":{ "Name":"GET" } }, "Child Resources":[ "http://localhost:4848/management/domain/configs", "http://localhost:4848/management/domain/resources", "http://localhost:4848/management/domain/servers", "http://localhost:4848/management/domain/property", "http://localhost:4848/management/domain/applications", "http://localhost:4848/management/domain/system-applications", "http://localhost:4848/management/domain/stop", "http://localhost:4848/management/domain/restart", "http://localhost:4848/management/domain/uptime", "http://localhost:4848/management/domain/version", "http://localhost:4848/management/domain/rotate-log", "http://localhost:4848/management/domain/host-port" ] |