JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

Using the asadmin Utility

Path to the asadmin Utility

asadmin Utility Syntax

Subcommands of the asadmin Utility

asadmin Utility Options and Subcommand Options

Operands of asadmin Utility Subcommands

To Run an asadmin Utility Subcommand in Single Mode

To Display Help Information for the asadmin Utility or a Subcommand

To Start a Multimode Session

To End a Multimode Session

To Run a Set of asadmin Subcommands From a File

Administering System Properties

To Create System Properties

To List System Properties

To Delete a System Property

Administering Resources

To Add Resources From an XML File

Listing Various System Elements

To Display the GlassFish Server Version

To List Applications

To List Containers

To List Modules

To List Subcommands

To List Timers

To Show Component Status

Using REST Interfaces to Administer GlassFish Server

Using REST URLs to Administer GlassFish Server

REST URLs to Resources for Configuration and Monitoring Objects

REST URLs for Accessing the Log File

Using REST Resource Methods to Administer GlassFish Server

To Determine the Methods and Method Parameters That an Object in the Tree Supports

To Retrieve Data for an Object in the Tree

To Add an Object to the Tree

To Update an Object in the Tree

To Delete an Object From the Tree

Resources for asadmin Subcommands That Perform Non-CRUD Operations

Securing GlassFish Server REST Interfaces

Setting Up Basic Authentication Over a Secure Connection

To Secure REST Interfaces by Using Session Tokens

Formats for Resource Representation of Configuration Objects

JSON Resource Representation for Configuration Objects

XML Resource Representation for Configuration Objects

HTML Resource Representation for Configuration Objects

Formats for Resource Representation of Monitoring Objects

JSON Resource Representation for Monitoring Objects

XML Resource Representation for Monitoring Objects

HTML Resource Representation for Monitoring Objects

Formats for Resource Representation of Log File Details

JSON Resource Representation for Log File Details

XML Resource Representation for Log File Details

Supported Content Types in Requests to REST Resources

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Writing and Running JavaScript Clients to Monitor GlassFish Server

10.  Administering Life Cycle Modules

11.  Extending and Updating GlassFish Server

Part II Resources and Services Administration

12.  Administering Database Connectivity

13.  Administering EIS Connectivity

14.  Administering Internet Connectivity

15.  Administering the Object Request Broker (ORB)

16.  Administering the JavaMail Service

17.  Administering the Java Message Service (JMS)

18.  Administering the Java Naming and Directory Interface (JNDI) Service

19.  Administering Transactions

Part III Appendixes

A.  Subcommands for the asadmin Utility

Index

Using REST Interfaces to Administer GlassFish Server

GlassFish Server provides representational state transfer (REST) interfaces to enable you to access monitoring and configuration data for GlassFish Server, including data that is provided by newly installed add-on components.

You can access the GlassFish Server REST interfaces through client applications such as:

You can also use the GlassFish Server REST interfaces in REST client applications that are developed in languages such as:

The implementation of the GlassFish Server REST interfaces is based on project Jersey. Project Jersey is the reference implementation of Java Specification Request (JSR) 311: JAX-RS: The Java API for RESTful Web Services. Information about JSR 311 is also available from the JSR 311 project home page.

The following topics are addressed here:

Using REST URLs to Administer GlassFish Server

Each object in the configuration and monitoring object trees is represented as a REST resource that is accessible through an HTTP uniform resource locator (URL). Access to REST resources for GlassFish Server monitoring and configuration data requires a running DAS.

REST URLs to Resources for Configuration and Monitoring Objects

The formats of the URLs to resources that represent objects in the configuration and monitoring object trees are as follows:

The replaceable items in these URLs are as follows:

host

The host where the DAS is running.

port

The HTTP port or HTTPS port for administration.

path

The path to the object. The path is the dotted name of the object in which each dot (.) is replaced with a slash (/).


Note - The path to a GlassFish Server instance is servers/server/instance-name, where instance-name is the name of the instance. For the DAS, instance-name is server and the path is servers/server/server.


For more information, see the following documentation:

If the URL to a REST resource for GlassFish Server monitoring or configuration data is opened in a web browser, the browser displays a web page that contains the following information about the resource:

The following figure shows the web page for the REST resource for managing a domain.

Figure 2-1 Web Page for the REST Resource for Managing a Domain

image:Screen capture showing the web page for the REST resource for managing a domain.

REST URLs for Accessing the Log File

The server.log file of the DAS is represented as a child that is named view-log of the resource for managing the domain. A child of the resource for the server.log file represents the log file details

The formats of the URLs to resources that represent the log file are as follows:

The replaceable items in these URLs are as follows:

host

The host where the DAS is running.

port

The HTTP port or HTTPS port for administration.

You can use the optional start parameter in the URL to the resource for the log file to specify the number of characters at the start of the file to skip. For example, to skip 10,000 characters, specify the URL as http://localhost:4848/management/domain/view-log?start=10000. This example assumes that the DAS is running on the local host and uses the default port for administration.

The resource for the log file returns the HTTP header "X-Text-Append-Next", which contains the entire URL to pass to the GET method to return the changes since the last call. You can use this header in client applications to get all log entries that were added in particular interval. For example, by testing the value of the "X-Text-Append-Next" header in a client thread every 10 seconds, you can monitor the log entries that were added in the last 10 seconds.

Using REST Resource Methods to Administer GlassFish Server

The GlassFish Server REST interfaces support methods for accessing objects in the monitoring and configuration object trees.

The following table shows the REST methods for administering monitoring and configuration data and the tasks that you can perform with each method. These methods are HTTP 1.1 primitives. For the detailed specification of these primitives, see Hypertext Transfer Protocol -- HTTP/1.1.

Table 2-1 REST Resource Methods for Administering Monitoring and Configuration Data

Task
REST Method
Determine the methods and method parameters that an object in the tree supports
GET
Retrieve data for an object in the tree
GET
Add an object to the tree
POST
Update an object in the tree
POST
Delete an object from the tree
DELETE

Note - The GET determines the methods and method parameters that an object in the tree supports and provides additional information about the object. For details, see To Retrieve Data for an Object in the Tree.


To Determine the Methods and Method Parameters That an Object in the Tree Supports

The methods and method parameters that an object in the tree supports depend on the REST resource that represents the object:

Before performing any operations on an object in the tree, determine the methods and method parameters that the object supports.

You can specify the format in which this information is presented. For more information, see Formats for Resource Representation of Configuration Objects.


Note - Each POST method and DELETE method that a REST resource supports has an equivalent asadmin subcommand. The parameters of a POST method or a DELETE method correspond to the options of the method's equivalent asadmin subcommand. For information about the options of asadmin subcommand, see Oracle GlassFish Server 3.1-3.1.1 Reference Manual.


  1. Ensure that the server is running.

    Operations on REST resources for GlassFish Server data require a running server.

  2. Use the GET method on the REST resource that represents the object.

    The GET method returns the list of methods that the resource supports. For each method, the list of acceptable message parameters or the list of acceptable query parameters are returned.

Example 2-21 Determining the Methods and Method Parameters That an Object in the Tree Supports

This example uses the cURL utility to determine the methods and method parameters that the resource for the node sj01 supports. The example uses the following options of the cURL utility:

In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The resource supports the GET method and the POST method.

Line breaks and white space are added to enhance readability.

curl -X GET -H "Accept: application/json" http://localhost:4848/management/domain/nodes/node/sj01
{
  "command":"Node",
  "exit_code":"SUCCESS",
  "extraProperties":{
    "commands":[
      {"path":"_delete-node","command":"delete-node","method":"DELETE"},
      {"path":"_update-node","command":"_update-node","method":"POST"},
      {"path":"ping-node-ssh","command":"ping-node-ssh","method":"GET"},
      {"path":"update-node-ssh","command":"update-node-ssh","method":"POST"},
      {"path":"update-node-config","command":"update-node-config","method":"POST"}],
    "methods":[
      {"name":"GET"},
      {"name":"POST","messageParameters":{
        "installDir":{"optional":"true","type":"string","key":"false"},
        "nodeDir":{"optional":"true","type":"string","key":"false"},
        "nodeHost":{"optional":"true","type":"string","key":"false"},
        "type":{"optional":"true","type":"string","key":"false"}
        }
      }
    ],
    "entity":{
      "installDir":"\/export\/glassfish3",
      "name":"sj01",
      "nodeDir":null,
      "nodeHost":
      "sj01.example.com",
      "type":"SSH"
    },
    "childResources":{
      "application-ref":
        "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/application-ref",
      "resource-ref":
        "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/resource-ref",
      "ssh-connector":
        "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/ssh-connector"
    }
  }
}

To Retrieve Data for an Object in the Tree

Retrieving data for an object in the tree obtains the following information about the REST resource that represents the object:

You can specify the format in which this information is presented. For more information, see Formats for Resource Representation of Configuration Objects.

  1. Ensure that the server is running.

    Operations on REST resources for GlassFish Server data require a running server.

  2. Use the GET method on the REST resource that represents the object.

Example 2-22 Retrieving Data for an Object in the Tree

This example uses the cURL utility to retrieve data for the resource for a the node sj01. The example uses the following options of the cURL utility:

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.

Line breaks and white space are added to enhance readability.

curl -X GET -H "Accept: application/json" http://localhost:4848/management/domain/nodes/node/sj01
{
  "command":"Node",
  "exit_code":"SUCCESS",
  "extraProperties":{
    "commands":[
      {"path":"_delete-node","command":"delete-node","method":"DELETE"},
      {"path":"_update-node","command":"_update-node","method":"POST"},
      {"path":"ping-node-ssh","command":"ping-node-ssh","method":"GET"},
      {"path":"update-node-ssh","command":"update-node-ssh","method":"POST"},
      {"path":"update-node-config","command":"update-node-config","method":"POST"}],
    "methods":[
      {"name":"GET"},
      {"name":"POST","messageParameters":{
        "installDir":{"optional":"true","type":"string","key":"false"},
        "nodeDir":{"optional":"true","type":"string","key":"false"},
        "nodeHost":{"optional":"true","type":"string","key":"false"},
        "type":{"optional":"true","type":"string","key":"false"}
        }
      }
    ],
    "entity":{
      "installDir":"\/export\/glassfish3",
      "name":"sj01",
      "nodeDir":null,
      "nodeHost":
      "sj01.example.com",
      "type":"SSH"
    },
    "childResources":{
      "application-ref":
        "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/application-ref",
      "resource-ref":
        "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/resource-ref",
      "ssh-connector":
        "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/ssh-connector"
    }
  }
}

To Add an Object to the Tree

  1. Ensure that the server is running.

    Operations on REST resources for GlassFish Server data require a running server.

  2. Determine the acceptable message parameters for the POST method of the resource that represents the parent of the object.

    For information about how to perform this step, see To Determine the Methods and Method Parameters That an Object in the Tree Supports.

  3. Use the POST method on the REST resource that represents the parent of the object that you are adding.
  4. Confirm that the object has been added.

    Perform this step on the resource that represents the object that you have just added, not the parent. For information about how to perform this step, see To Retrieve Data for an Object in the Tree.

Example 2-23 Adding an Object to the Tree

This example uses the cURL utility to add a JDBC resource object to the tree by creating a REST resource to represent the JDBC resource.

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.

  1. This step determines the acceptable message parameters for the POST method of the resource jdbc-resource.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/jdbc-resource
    {
      "command":"Jdbc-resource",
      "exit_code":"SUCCESS",
      "extraProperties":{
        "commands":[],
        "methods":[
          {"name":"GET"},
          {"name":"POST","messageParameters":{
            "description":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""},
            "enabled":{"acceptableValues":"",optional":"true","type":"boolean",defaultValue":"true"},
            "id":{"acceptableValues":"","optional":"false","type":"string","defaultValue":""},
            "poolName":{"acceptableValues":"","optional":"false","type":"string","defaultValue":""},
            "property":{"acceptableValues":"","optional":"true","type":"string","defaultValue":"},
            "target":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""}
            }
          }
        ],
        "childResources":{
          "jdbc\/__TimerPool":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdbc%2F__TimerPool",
          "jdbc\/__default":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdbc%2F__default"
        }
      }
    }
  2. This step adds a resource as a child of the jdbc-resource resource. The -d option of the cURL utility sets the required message parameters as follows:

    • id is set to jdbc/myjdbcresource.

    • connectionpoolid is set to DerbyPool.

    curl -X POST -d id=jdbc/myjdbcresource -d id=poolName=DerbyPool 
    http://localhost:4848/management/domain/resources/jdbc-resource
  3. This step confirms that the object has been added by retrieving data for the REST resource that represents the object.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc%2Fmyjdbcresource
    {
      "command":"Jdbc-resource",
      "exit_code":"SUCCESS",
      "extraProperties":{
        "commands":[],
        "methods":[
          {"name":"GET"},
          {"name":"POST","messageParameters":{
            "description":{"optional":"true","type":"string","key":"false"},
            "enabled":{"optional":"true","type":"boolean","defaultValue":"true","key":"false"},
            "jndiName":{"optional":"true","type":"string","key":"true"},
            "objectType":{"optional":"true","type":"string","defaultValue":"user","key":"false"},
            "poolName":{"optional":"true","type":"string","key":"false"}
            }
          },
          {"name":"DELETE","messageParameters":{
            "target":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""}
            }
          }
        ],
        "childResources":{
          "property":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdbc%2Fmyjdbcresource\/property"
        }
      }
    }

To Update an Object in the Tree

  1. Ensure that the server is running.

    Operations on REST resources for GlassFish Server data require a running server.

  2. Determine the acceptable message parameters for the POST method of the resource that represents the object.

    For information about how to perform this step, see To Determine the Methods and Method Parameters That an Object in the Tree Supports.

  3. Use the POST method on the REST resource that represents the object that you are updating.
  4. Confirm that the object has been updated.

    For information about how to perform this step, see To Retrieve Data for an Object in the Tree.

Example 2-24 Updating an Object in the Tree

This example uses the cURL utility to update a JDBC resource in the tree by modifying the REST resource that represents the JDBC resource.

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.

  1. This step determines the acceptable message parameters for the POST method of the resource jdbc-myjdbcresource.

    curl -X OPTIONS -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc-myjdbcresource
    {
      "command":"Jdbc-resource",
      "exit_code":"SUCCESS",
      "extraProperties":{
        "commands":[],
        "methods":[
          {"name":"GET"},
          {"name":"POST","messageParameters":{
            "description":{"optional":"true","type":"string","key":"false"},
            "enabled":{"optional":"true","type":"boolean","defaultValue":"true","key":"false"},
            "jndiName":{"optional":"true","type":"string","key":"true"},
            "objectType":{"optional":"true","type":"string","defaultValue":"user","key":"false"},
            "poolName":{"optional":"true","type":"string","key":"false"}
            }
          },
          {"name":"DELETE","messageParameters":{
            "target":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""}
            }
          }
        ],
        "childResources":{
          "property":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdbc%2Fmyjdbcresource\/property"
        }
      }
    }
  2. This step updates the REST resource jdbc-myjdbcresource to disable the JDBC resource that jdbc-myjdbcresource represents. The -d option of the cURL utility sets the enabled message parameter to disabled.

    curl -X POST -d "enabled=false" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc%2Fmyjdbcresource
  3. This step confirms that the object has been updated by retrieving data for the REST resource that represents the object.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc%2Fmyjdbcresource
    {
      "command":"Jdbc-resource",
      "exit_code":"SUCCESS",
      "extraProperties":{
        "commands":[],
        "methods":[
          {"name":"GET"},
          {"name":"POST","messageParameters":{
            "description":{"optional":"true","type":"string","key":"false"},
            "enabled":{"optional":"true","type":"boolean","defaultValue":"true","key":"false"},
            "jndiName":{"optional":"true","type":"string","key":"true"},
            "objectType":{"optional":"true","type":"string","defaultValue":
            "user","key":"false"},
            "poolName":{"optional":"true","type":"string","key":"false"}
            }
          },
          {"name":"DELETE","messageParameters":{
            "target":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""}
            }
          }
        ],
      "entity":{
        "description":null,
        "enabled":"false",
        "jndiName":"jdbc\/myjdbcresource",
        "objectType":
        "user",
        "poolName":"DerbyPool"
      },
      "childResources":{
        "property":
          "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/
           jdbc%2Fmyjdbcresource\/property"
        }
      }
    }

To Delete an Object From the Tree

  1. Ensure that the server is running.

    Operations on REST resources for GlassFish Server data require a running server.

  2. Confirm that the object can be deleted.

    For information about how to perform this step, see To Determine the Methods and Method Parameters That an Object in the Tree Supports.

  3. Confirm that the object has been deleted.

    Perform this step on the resource that represents the parent of the object that you have just deleted. For information about how to perform this step, see To Retrieve Data for an Object in the Tree.

Example 2-25 Deleting an Object From the Tree

This example uses the cURL utility to delete a JDBC resource from the tree by deleting the REST resource that represents the JDBC resource.

In this example, the DAS is running on the local host and the HTTP port for administration is 4848.

Line breaks and white space are added to enhance readability.

  1. This step confirms that the object can be deleted by retrieving the REST methods that the resource jdbc-myjdbcresource supports.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc%2Fmyjdbcresource
    {
      "command":"Jdbc-resource",
      "exit_code":"SUCCESS",
      "extraProperties":{
        "commands":[],
        "methods":[
          {"name":"GET"},
          {"name":"POST","messageParameters":{
            "description":{"optional":"true","type":"string","key":"false"},
            "enabled":{"optional":"true","type":"boolean","defaultValue":"true","key":"false"},
            "jndiName":{"optional":"true","type":"string","key":"true"},
            "objectType":{"optional":"true","type":"string","defaultValue":"user","key":"false"},
            "poolName":{"optional":"true","type":"string","key":"false"}
            }
          },
          {"name":"DELETE","messageParameters":{
            "target":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""}
            }
          }
        ],
        "childResources":{
          "property":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/
            jdbc%2Fmyjdbcresource\/property"
        }
      }
    }
  2. This step deletes the jdbc/myjdbcresource resource.

    curl -X DELETE http://localhost:4848/management/domain/resources/
    jdbc-resource/jdbc%2Fmyjdbcresource
  3. This step confirms that the object has been deleted by retrieving data for the REST resource that represents the parent of the object.

    curl -X GET -H "Accept: application/json" 
    http://localhost:4848/management/domain/resources/jdbc-resource
    {
      "command":"Jdbc-resource",
      "exit_code":"SUCCESS",
      "extraProperties":{
        "commands":[],
        "methods":[
          {"name":"GET"},
          {"name":"POST","messageParameters":{
            "description":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""},
            "enabled":{"acceptableValues":"",optional":"true","type":"boolean",defaultValue":"true"},
            "id":{"acceptableValues":"","optional":"false","type":"string","defaultValue":""},
            "poolName":{"acceptableValues":"","optional":"false","type":"string","defaultValue":""},
            "property":{"acceptableValues":"","optional":"true","type":"string","defaultValue":"},
            "target":{"acceptableValues":"","optional":"true","type":"string","defaultValue":""}
            }
          }
        ],
        "childResources":{
          "jdbc\/__TimerPool":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdbc%2F__TimerPool",
          "jdbc\/__default":
            "https:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdbc%2F__default"
        }
      }
    }

Resources for asadmin Subcommands That Perform Non-CRUD Operations

The GlassFish Server REST interfaces also support operations other than create, read, update, and delete (CRUD) operations, for example:

These operations are supported through REST resources that represent the asadmin subcommands for performing these operations. Each resource is a child of the resource on which the operation is performed. The child resources do not represent objects in the configuration object tree.

For example, the resource that represents a node provides child resources for the following asadmin subcommands that perform non-CRUD operations on the node:

Securing GlassFish Server REST Interfaces

The GlassFish Server REST interfaces support the following authentication schemes for securing the REST interfaces:

When security is enabled, you must specify https as the protocol in the URLs to REST resources and provide a username and password.

Setting Up Basic Authentication Over a Secure Connection

Setting up basic authentication over a secure connection to secure GlassFish Server REST interfaces involves the following sequence of tasks:

  1. Adding an admin-realm user to the asadmin user group

  2. Enabling Secure Sockets Layer (SSL)

For information about how to perform these tasks from the command line, see the following documentation:

For information about how to perform these tasks by using the Administration Console, see the following topics in the Administration Console online help:

To Secure REST Interfaces by Using Session Tokens

Basic authentication requires a REST client to cache a user's credentials to enable the client to pass the credentials with each request. If you require a REST client not to cache credentials, your client must use session tokens for authentication.

  1. Request a session token by using the GET method on the resource at http://host:port/management/sessions.

    GlassFish Server uses basic authentication to authenticate the client, generates a session token, and passes the token to the client.

  2. In each subsequent request that requires authentication, use the token to authenticate the client.
    1. Create a cookie that is named gfresttoken the value of which is the token.
    2. Send the cookie with the request.
  3. When the token is no longer required, retire the token by using the DELETE method on the resource at http://host:port/management/sessions/{tokenvalue}.

    Note - If a client does not explicitly retire a token, the token is retired after 30 minutes of inactivity.


Formats for Resource Representation of Configuration Objects

The GlassFish Server REST interfaces represent resources for configuration objects in the following formats:

GlassFish Server enables you to specify the resource representation through the filename extension in the URL or through the HTTP header:

JSON Resource Representation for Configuration Objects

The general format for the JSON representation of a resource for a configuration object is as follows:

{
  "command":"resource",
  "exit_code":"code",
  "extraProperties":{
    "commands":[command-list],
    "methods":[method-list],
    "entity":{attributes},
    "childResources":{children}
  }
}

The replaceable items in this format are as follows:

resource

The name of the resource.

code

The result of the attempt to get the resource.

command-list

One or more metadata sets separated by a comma (,) that represent the asadmin subcommands for performing non—CRUD operations on the resource. For the format of each metadata set, see JSON Representation of a Command in a Command List.

method-list

One or more metadata sets separated by a comma (,) that represent the methods that the resource supports. For the format of each metadata set, see JSON Representation of a Method in a Method List.

attributes

Zero or more name-value pairs separated by a comma (,). Each name-value pair is specified as "name":value.

children

Zero or more child resources separated by a comma (,). Each child resource is specified as "resource-name":”url”.

resource-name

The name of the resource as displayed in client applications that access the parent of the resource.

url

The URL to the child resource.

JSON Representation of a Command in a Command List

The JSON representation of a command in a command list is as follows:

{
  "path":"command-path",
  "command":"command-name",
  "method":"rest-method"
}

The replaceable items in this format are as follows:

command-path

The relative path to REST resource that represents the command. This path is relative to the URL of the REST resource that is the parent of the resource that represents the command.

command-name

The name of the command as displayed in client applications that access the resource.

rest-method

The REST resource method that the command invokes when the command is run. The method is GET, POST, or DELETE.

JSON Representation of a Method in a Method List

The JSON representation of a method in a method list is as follows:

{
    "name":"method-name",
    "messageParameters":{
        message-parameter-list
    }
    "queryParameters":{
        queryparameter- list
    }
}

The replaceable items in this format are as follows:

method-name

The name of the method, which is GET, POST, or DELETE.

message-parameter-list

Zero or more metadata sets separated by a comma (,) that represent the message parameters that are allowed for the method. For the format of each metadata set, see JSON Representation of a Message Parameter or a Query Parameter.

query-parameter-list

Zero or more metadata sets separated by a comma (,) that represent the query parameters that are allowed for the method. For the format of each metadata set, see JSON Representation of a Message Parameter or a Query Parameter.

JSON Representation of a Message Parameter or a Query Parameter

The JSON representation of a message parameter or a query parameter is as follows:

"parameter-name":{attribute-list}

The replaceable items in this format are as follows:

parameter-name

The name of the parameter.

attribute-list

A comma-separated list of name-value pairs of attributes for the parameter. Each pair is in the following format:

"name":"value"

Possible attributes are as follows:

defaultValue

The default value of the parameter.

acceptableValues

The set or range of acceptable values for the parameter.

type

The data type of the parameter, which is one of the following types:

  • boolean

  • int

  • string

optional

Indicates whether the parameter is optional. If true, the parameter is optional. If false, the parameter is required.

key

Indicates whether the parameter is key. If true, the parameter is key. If false, the parameter is not key.

Example JSON Resource Representation for a Configuration Object

This example shows the JSON representation of the resource for the node sj01. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain/nodes/node/sj01.

Line breaks and white space are added to enhance readability.

{
  "command":"Node",
  "exit_code":"SUCCESS",
  "extraProperties":{
    "commands":[
      {"path":"_delete-node","command":"delete-node","method":"DELETE"},
      {"path":"_update-node","command":"_update-node","method":"POST"},
      {"path":"ping-node-ssh","command":"ping-node-ssh","method":"GET"},
      {"path":"update-node-ssh","command":"update-node-ssh","method":"POST"},
      {"path":"update-node-config","command":"update-node-config","method":"POST"}],
    "methods":[
      {"name":"GET"},
      {"name":"POST","messageParameters":{
        "installDir":{"optional":"true","type":"string","key":"false"},
        "nodeDir":{"optional":"true","type":"string","key":"false"},
        "nodeHost":{"optional":"true","type":"string","key":"false"},
        "type":{"optional":"true","type":"string","key":"false"}
        }
      }
    ],
    "entity":{
      "installDir":"\/export\/glassfish3",
      "name":"sj01",
      "nodeDir":null,
      "nodeHost":
      "sj01.example.com",
      "type":"SSH"
    },
    "childResources":{
      "application-ref":
       "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/application-ref",
      "resource-ref":
       "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/resource-ref",
      "ssh-connector":
       "https:\/\/localhost:4848\/management\/domain\/nodes\/node\/sj01\/ssh-connector"
    }
  }
}

XML Resource Representation for Configuration Objects

The general format for the XML representation of a resource for a configuration object is as follows:

<map>
 <entry key="extraProperties">
  <map>
   <entry key="methods">
    <list>
     methods
    </list>
   </entry>
   <entry key="entity">
    <map>
     attributes
    </map>
   </entry>
   <entry key="commands">
    <list>
     commands
    </list>
   </entry>
   <entry key="childResources">
    <map>
    children
    </map>
   </entry>
  </map>
 </entry>
 <entry key="message"></entry>
 <entry key="exit_code" value="code"></entry>
 <entry key="command" value="resource"></entry>
</map>

The replaceable items in this format are as follows:

methods

One or more XML elements that represent the methods that the resource supports. For the format of each element, see XML Representation of a Resource Method.

attributes

Zero or more XML elements that represent the attributes of the resource. Each element specifies a name-value pair as follows:

<entry key="name" value="value"></entry>
commands

One or more XML elements that represent the asadmin subcommands for performing non—CRUD operations on the resource. For the format of each element, see XML Representation of a Command.

children

Zero or more XML elements that represent the children of the resource. Each element is specified as follows:

<entry key="resource-name" value="url"></entry>
resource-name

The name of the resource as displayed in client applications that access the parent of the resource.

url

The URL to the child resource.

code

The result of the attempt to get the resource.

resource

The name of the resource.

XML Representation of a Resource Method

The XML representation of a method in a method list is as follows:

<map>
 <entry key="name" value="method-name"></entry>
 <entry key="messageParameters">
  message-parameter-list
 </entry>
 <entry key="queryParameters">
  message-parameter-list
 </entry>
</map>

The replaceable items in this format are as follows:

method-name

The name of the method, which is GET, POST, or DELETE.

message-parameter-list

Zero or more XML elements that represent the message parameters that are allowed for the method. For the format of each element, see XML Representation of a Message Parameter or a Query Parameter.

query-parameter-list

Zero or more XML elements that represent the query parameters that are allowed for the method. For the format of each element, see XML Representation of a Message Parameter or a Query Parameter.

XML Representation of a Command

The XML representation of a command is as follows:

<map>
 <entry key="command" value="command-name"></entry>
 <entry key="path" value="command-path"></entry>
 <entry key="method" value="rest-method"></entry>
</map>

The replaceable items in this format are as follows:

command-name

The name of the command as displayed in client applications that access the resource.

command-path

The relative path to REST resource that represents the command. This path is relative to the URL of the REST resource that is the parent of the resource that represents the command.

rest-method

The REST resource method that the command invokes when the command is run. The method is GET, POST, or DELETE.

XML Representation of a Message Parameter or a Query Parameter

The XML representation of a message parameter or a query parameter is as follows:

<map>
 <entry key="parameter-name">
  <map>
   attributes
  </map>
 </entry>
</map>

The replaceable items in this format are as follows:

parameter-name

The name of the parameter.

attributes

One or more XML elements that represent the attributes for the parameter. Each element specifies a name-value pair as follows:

<entry key="name" value="value"></entry>

Possible attributes are as follows:

defaultValue

The default value of the parameter.

acceptablevalues

The set or range of acceptable values for the parameter.

type

The data type of the parameter, which is one of the following types:

  • boolean

  • int

  • string

optional

Indicates whether the parameter is optional. If true, the parameter is optional. If false, the parameter is required.

key

Indicates whether the parameter is key. If true, the parameter is key. If false, the parameter is not key.

Example XML Resource Representation

This example shows the XML representation of the resource for the node sj01. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain/nodes/node/sj01.

Line breaks and white space are added to enhance readability.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<map>
 <entry key="extraProperties">
  <map>
   <entry key="methods">
    <list>
     <map>
      <entry key="name" value="GET"/>
     </map>
     <map>
      <entry key="name" value="POST"/>
      <entry key="messageParameters">
       <map>
        <entry key="installDir">
         <map>
          <entry key="optional" value="true"/>
          <entry key="type" value="string"/>
          <entry key="key" value="false"/>
         </map>
        </entry>
        <entry key="nodeDir">
         <map>
          <entry key="optional" value="true"/>
          <entry key="type" value="string"/>
          <entry key="key" value="false"/>
         </map>
        </entry>
        <entry key="type">
         <map>
          <entry key="optional" value="true"/>
          <entry key="type" value="string"/>
          <entry key="key" value="false"/>
         </map>
        </entry>
        <entry key="nodeHost">
         <map>
          <entry key="optional" value="true"/>
          <entry key="type" value="string"/>
          <entry key="key" value="false"/>
         </map>
        </entry>
       </map>
      </entry>
     </map>
    </list>
   </entry>
   <entry key="entity">
    <map>
     <entry key="installDir" value="/export/glassfish3"/>
     <entry key="name" value="sj01"/>
     <entry key="nodeDir" value=""/>
     <entry key="type" value="SSH"/>
     <entry key="nodeHost" value="sj01example.com"/>
    </map>
   </entry>
   <entry key="commands">
    <list>
     <map>
      <entry key="command" value="delete-node"/>
      <entry key="path" value="_delete-node"/>
      <entry key="method" value="DELETE"/>
     </map>
     <map>
      <entry key="command" value="_update-node"/>
      <entry key="path" value="_update-node"/>
      <entry key="method" value="POST"/>
     </map>
     <map>
      <entry key="command" value="ping-node-ssh"/>
      <entry key="path" value="ping-node-ssh"/>
      <entry key="method" value="GET"/>
     </map>
     <map>
      <entry key="command" value="update-node-ssh"/>
      <entry key="path" value="update-node-ssh"/>
      <entry key="method" value="POST"/>
     </map>
     <map>
      <entry key="command" value="update-node-config"/>
      <entry key="path" value="update-node-config"/>
      <entry key="method" value="POST"/>
     </map>
    </list>
   </entry>
   <entry key="childResources">
    <map>
     <entry key="application-ref" 
      value="https://localhost:4848/management/domain/nodes/node/sj01/application-ref"/>
     <entry key="ssh-connector" 
      value="https://localhost:4848/management/domain/nodes/node/sj01/ssh-connector"/>
     <entry key="resource-ref" 
      value="https://localhost:4848/management/domain/nodes/node/sj01/resource-ref"/>
    </map>
   </entry>
  </map>
 </entry>
 <entry key="message"/>
 <entry key="exit_code" value="SUCCESS"/>
 <entry key="command" value="Node"/>
</map>

HTML Resource Representation for Configuration Objects

The format for the HTML representation of a resource for a configuration object is a web page that provides the following information about the resource:

For a sample web page, see Figure 2-1. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain/nodes/node/sj01.

Formats for Resource Representation of Monitoring Objects

The GlassFish Server REST interfaces represent resources for monitoring data in the following formats:

JSON Resource Representation for Monitoring Objects

The general format for the JSON representation of a resource for a monitoring object is as follows:

{
  "message":"",
  "command":"Monitoring Data",
  "exit_code":"code",
  "extraProperties":{
    "entity":{
      statistics-list
    },
    "childResources":{
      children
    }
  }
}

The replaceable items in this format are as follows:

code

The result of the attempt to get the resource.

statistics-list

Zero or more metadata sets separated by a comma (,) that represent the statistics that the monitoring object provides. For the format of each metadata set, see JSON Representation of a Statistic in a Statistics List.

children

Zero or more child resources separated by a comma (,). Each child resource is specified as "resource-name":”url”.

resource-name

The name of the resource as displayed in client applications that access the parent of the resource.

url

The URL to the child resource.

JSON Representation of a Statistic in a Statistics List

The JSON representation of a counter statistic in a statistics list is as follows:

"statistic":{
  "count":count,
  "lastsampletime":last-sample-time,
  "description":"description",
  "unit":"unit",
  "name":"name",
  "starttime":start-time
}

The JSON representation of a range statistic in a statistics list is as follows:

"statistic":{
  "highwatermark":highest-value, 
  "lowwatermark":lowest-value, 
  "current":current-value
  "lastsampletime":last-sample-time,
  "description":"description",
  "unit":"unit",
  "name":"name",
  "starttime":start-time
}

The replaceable items in these formats are as follows:

statistic

The name of the statistic.

count

Counter statistics only: The current value of the statistic.

highest-value

Range statistics only: The highest value of the statistic since monitoring of the statistic began.

lowest-value

Range statistics only: The lowest value of the statistic since monitoring of the statistic began.

current-value

Range statistics only: The lowest value of the statistic since monitoring of the statistic began.

last-sample-time

The time in UNIX time at which the statistic was last sampled.

description

A textual description of what the statistic represents.

unit

The unit of measurement of the statistic, which is one of the following units of measurement:

name

The name of the statistic as displayed in client applications that access the resource that contains the statistic.

start-time

The time in UNIX time at which monitoring of the statistic began.

Example JSON Resource Representation for a Monitoring Object

This example shows the JSON representation of the monitoring object that provides class loader statistics for the virtual machine for the Java platform. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/monitoring/domain/server/jvm/class-loading-system.

Line breaks and white space are added to enhance readability.

{
  "message":"",
  "command":"Monitoring Data",
  "exit_code":"SUCCESS",
  "extraProperties":{
    "entity":{
      "loadedclass-count":{
        "count":8521,
        "lastsampletime":1300726961018,
        "description":"Number of classes currently loaded in the Java virtual 
          machine",
        "unit":"count",
        "name":"LoadedClassCount",
        "starttime":1300483924126
      },
      "totalloadedclass-count":{
        "count":8682,
        "lastsampletime":1300726961018,
        "description":"Total number of classes that have been loaded since the 
          Java virtual machine has started execution",
        "unit":"count",
        "name":"TotalLoadedClassCount",
        "starttime":1300483924127
      },
      "unloadedclass-count":{
        "count":161,
        "lastsampletime":1300726961018,
        "description":"Total number of classes unloaded since the Java virtual 
          machine has started execution",
        "unit":"count",
        "name":"UnLoadedClassCount",
        "starttime":1300483924127
      }
    },"childResources":{}
  }
}

XML Resource Representation for Monitoring Objects

The general format for the XML representation of a resource for a monitoring object is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<map>
 <entry key="extraProperties">
  <map>
   <entry key="entity">
    <map>
     statistics
    </map>
   </entry>
   <entry key="childResources">
    <map>
     children
    </map>
   </entry>
  </map>
 </entry>
 <entry key="message" value=""></entry>
 <entry key="exit_code" value="code"></entry>
 <entry key="command" value="Monitoring Data"></entry>
</map>

The replaceable items in this format are as follows:

statistics

Zero or more XML elements that represent the statistics that the monitoring object provides. For the format of each element, see XML Representation of a Statistic.

children

Zero or more XML elements that represent the children of the resource. Each element is specified as follows:

<entry key="resource-name" value="url"></entry>
resource-name

The name of the resource as displayed in client applications that access the parent of the resource.

url

The URL to the child resource.

code

The result of the attempt to get the resource.

XML Representation of a Statistic

The XML representation of a counter statistic is as follows:

<entry key="statistic">
 <map>
 <entry key="unit" value="unit"></entry>
 <entry key="starttime">
   <number>start-time</number>
  </entry>
  <entry key="count">
   <number>count</number>
  </entry>
  <entry key="description" value="description"></entry>
  <entry key="name" value="name"></entry>
  <entry key="lastsampletime">
   <number>last-sample-time</number>
  </entry>
  </map>
</entry>

The XML representation of a range statistic is as follows:

<entry key="statistic">
 <map>
 <entry key="unit" value="unit"></entry>
 <entry key="starttime">
   <number>start-time</number>
  </entry>
  <entry key="highwatermark">
   <number>highest-value</number>
  </entry>
  <entry key="lowwatermark">
   <number>lowest-value</number>
  </entry>
  <entry key="current">
   <number>current-value</number>
  </entry>
  <entry key="description" value="description"></entry>
  <entry key="name" value="name"></entry>
  <entry key="lastsampletime">
   <number>last-sample-time</number>
  </entry>
  </map>
</entry>

The replaceable items in these formats are as follows:

statistic

The name of the statistic.

unit

The unit of measurement of the statistic, which is one of the following units of measurement:

start-time

The in time in UNIX time at which monitoring of the statistic began.

count

Counter statistics only: The current value of the statistic.

highest-value

Range statistics only: The highest value of the statistic since monitoring of the statistic began.

lowest-value

Range statistics only: The lowest value of the statistic since monitoring of the statistic began.

current-value

Range statistics only: The lowest value of the statistic since monitoring of the statistic began.

description

A textual description of what the statistic represents.

name

The name of the statistic as displayed in client applications that access the resource that contains the statistic.

last-sample-time

The time in UNIX time at which the statistic was last sampled.

Example XML Resource Representation for a Monitoring Object

This example shows the XML representation of the monitoring object that provides class loader statistics for the virtual machine for the Java platform. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/monitoring/domain/server/jvm/class-loading-system.

Line breaks and white space are added to enhance readability.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<map>
 <entry key="extraProperties">
  <map>
   <entry key="entity">
    <map>
     <entry key="unloadedclass-count">
      <map>
       <entry key="unit" value="count"/>
       <entry key="starttime">
        <number>1300483924127</number>
       </entry><entry key="count">
        <number>161</number>
       </entry>
       <entry key="description" value="Total number of classes unloaded since 
        the Java virtual machine has started execution"/>
       <entry key="name" value="UnLoadedClassCount"/>
       <entry key="lastsampletime">
        <number>1300726989505</number>
       </entry>
      </map>
     </entry>
     <entry key="totalloadedclass-count">
      <map>
       <entry key="unit" value="count"/>
       <entry key="starttime">
        <number>1300483924127</number>
       </entry>
       <entry key="count">
         number>8682</number>
       </entry>
       <entry key="description" value="Total number of classes that have been 
        loaded since the Java virtual machine has started execution"/>
       <entry key="name" value="TotalLoadedClassCount"/>
       <entry key="lastsampletime">
        <number>1300726989505</number>
       </entry>
      </map>
     </entry>
     <entry key="loadedclass-count">
      <map>
       <entry key="unit" value="count"/>
       <entry key="starttime">
        <number>1300483924126</number>
       </entry><entry key="count">
        <number>8521</number>
       </entry>
       <entry key="description" value="Number of classes currently loaded in 
        the Java virtual machine"/>
       <entry key="name" value="LoadedClassCount"/>
       <entry key="lastsampletime">
        <number>1300726989505</number>
       </entry>
      </map>
     </entry>
    </map>
   </entry>
   <entry key="childResources">
    <map/>
   </entry>
  </map>
 </entry>
 <entry key="message" value=""/>
 <entry key="exit_code" value="SUCCESS"/>
 <entry key="command" value="Monitoring Data"/>
</map>

HTML Resource Representation for Monitoring Objects

The format for the HTML representation of a resource for a monitoring object is a web page that provides the following information about the resource:

The following figure shows the web page for the REST resource that provides class loader statistics for the virtual machine for the Java platform. .

Figure 2-2 Web Page for the REST Resource That Provides Class Loader Statistics

image:Screen capture showing the web page for the REST resource that provides class loader statistics.

Formats for Resource Representation of Log File Details

The GlassFish Server REST interfaces represent resources for log file details in the following formats:

JSON Resource Representation for Log File Details

The general format for the JSON representation of a resource for log file details is as follows:

{
  "records": [
    record-list
  ]
}

The replaceable items in this format are as follows:

record-list

One or more metadata sets separated by a comma (,) that represent the log records in the log file. For the format of each metadata set, see JSON Representation of a Log Record in a Record List.

JSON Representation of a Log Record in a Record List

The JSON representation of a log record in a record list is as follows:

{
  "recordNumber":record-number,
  "loggedDateTimeInMS":logged-date,
  "loggedLevel":"log-level",
  "productName":"product-name",
  "loggerName":"logger-class-name",
  "nameValuePairs":"_ThreadID=thread-id;_ThreadName=thread-name;",
  "messageID":"message-id",
  "Message":"message-text"
}

The replaceable items in this format are as follows:

record-number

A serial number in the form of a decimal integer that uniquely identifies the log record.

logged-date

The date and time in UNIX time that the record was created.

log-level

The severity level of the message in the log record. For more information, see Setting Log Levels.

product-name

The application that created the log message, for example, glassfish3.1.

logger-class-name

The fully qualified name of the Java class of the logger class that created the log message. Each component of GlassFish Server provides its own logger class. For detailed information about the names of logger classes in GlassFish Server, see Logger Namespaces.

thread-id

The numerical identifier of the thread that created the message.

thread-name

The name of the thread that created the message.

message-id

A unique identifier for the message. For messages from GlassFish Server, this identifier consists of a module code and a numerical value, for example, CORE5004. All SEVERE and WARNING messages and some INFO messages from GlassFish Server contain a message identifier. For more information, see Oracle GlassFish Server 3.1 Error Message Reference.

message-text

The text of the log message.

Example JSON Resource Representation for Log File Details

This example shows the JSON representation of the resource for log file details. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain/view-log/details.

Line breaks and white space are added to enhance readability.

{
  "records": [
    {
      "recordNumber":475,
      "loggedDateTimeInMS":1300743782815,
      "loggedLevel":"INFO",
      "productName":"glassfish3.1",
      "loggerName":"org.glassfish.admingui",
      "nameValuePairs": "_ThreadID=25;_ThreadName=Thread-1;",
      "messageID":"",
      "Message":"Admin Console: Initializing Session Attributes..."
    },
    {
      "recordNumber":474,
      "loggedDateTimeInMS":1300728893368,
      "loggedLevel":"INFO",
      "productName":"glassfish3.1",
      "loggerName":"javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter",
      "nameValuePairs":"_ThreadID=238;_ThreadName=Thread-1;",
      "messageID":"",
      "Message":"The Admin Console application is loaded."
    },
    {
      "recordNumber":473,
      "loggedDateTimeInMS":1300728893367,
      "loggedLevel":"INFO",
      "productName":"glassfish3.1",
      "loggerName":"javax.enterprise.system.core.com.sun.enterprise.v3.server",
      "nameValuePairs":"_ThreadID=238;_ThreadName=Thread-1;",
      "messageID":"CORE10010",
      "Message":" Loading application __admingui done in 40,063 ms"
    }
  ]
}

XML Resource Representation for Log File Details

The general format for the XML representation of a resource for log file details is as follows:

<records>
 records
 </records>

The replaceable items in this format are as follows:

records

One or more XML elements that represent the log records in the log file. For the format of each element, see XML Representation of a Log Record.

XML Representation of a Log Record

The XML representation of a log record is as follows:

<record loggedDateTimeInMS="logged-date" loggedLevel="log-level" 
 loggerName="logger-class-name" messageID="message-id" 
 nameValuePairs="_ThreadID=thread-id;_thread-name;" productName="product-name"
 recordNumber="record-number"/>

The replaceable items in this format are as follows:

logged-date

The date and time in UNIX time that the record was created.

log-level

The severity level of the message in the log record. For more information, see Setting Log Levels.

logger-class-name

The fully qualified name of the Java class of the logger class that created the log message. Each component of GlassFish Server provides its own logger class. For detailed information about the names of logger classes in GlassFish Server, see Logger Namespaces.

message-id

A unique identifier for the message. For messages from GlassFish Server, this identifier consists of a module code and a numerical value, for example, CORE5004. All SEVERE and WARNING messages and some INFO messages from GlassFish Server contain a message identifier. For more information, see Oracle GlassFish Server 3.1 Error Message Reference.

thread-id

The numerical identifier of the thread that created the message.

thread-name

The name of the thread that created the message.

product-name

The application that created the log message, for example, glassfish3.1.

record-number

A serial number in the form of a decimal integer that uniquely identifies the log record.

Example XML Resource Representation for Log File Details

This example shows the XML representation of the resource for log file details. In this example, the DAS is running on the local host and the HTTP port for administration is 4848. The URL to the resource in this example is http://localhost:4848/management/domain/view-log/details.

Line breaks and white space are added to enhance readability.

<records>
 <record loggedDateTimeInMS="1300743782815" loggedLevel="INFO" 
 loggerName="org.glassfish.admingui" messageID="" 
 nameValuePairs="_ThreadID=25;_ThreadName=Thread-1;" 
 productName="glassfish3.1" recordNumber="475"/>
 <record loggedDateTimeInMS="1300728893368" loggedLevel="INFO" 
 loggerName="javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter" 
  messageID="" nameValuePairs="_ThreadID=238;_ThreadName=Thread-1;" 
  productName="glassfish3.1" recordNumber="474"/>
 <record loggedDateTimeInMS="1300728893367" loggedLevel="INFO" 
 loggerName="javax.enterprise.system.core.com.sun.enterprise.v3.server" 
 messageID="CORE10010" nameValuePairs="_ThreadID=238;_ThreadName=Thread-1;" 
 productName="glassfish3.1" recordNumber="473"/>
</records>

Supported Content Types in Requests to REST Resources

The GlassFish Server REST interfaces support the following types in the content-type header of a client request:

How to specify the type in the content-type header depends on how you are sending the request. For example, if you are using the cURL utility, specify the type through the -H option as follows: