Starting the OneDB REST Listener

About this task

The OneDB REST interface is part of the OneDB wire listener. The OneDB wire listener java-based mid-tier gateway server that enables communication not only between HTTP/REST clients and the OneDB database server, but Mongo and MQTT clients as well. The OneDB wire listener comes with the database server installation and is installed at $INFORMIXDIR/bin/jsonListener.jar.

Prerequisites for starting the OneDB REST Listener :

Java 1.8
A OneDB server that is up and running

To start the OneDB REST Listener :

Procedure

  1. Create a REST listener properties file

    Sample properties file:

    url=jdbc:onedb://localhost:9088/sysmaster:USER=informix;PASSWORD=password
    listener.hostName=*
    listener.port=8080
    listener.type=rest
    security.s ql.passthrough=true
    authentication.enable=true
    authentication.localhost.bypass.enable=false

    The url property is the JDBC url to connect to your OneDB database server. The listener.hostName property determines the network adapter or interface that the wire listener binds the server socket to (a value of * directs the wire listener to bind to all interfaces or addresses). The listener.port property specifies the port number to listen on for incoming connections from clients.

    The security.sql.passthrough is optional, but by setting it to true, you enable support for issuing SQL statements directly through the REST listener.

    authentication.enable enables authentication and authentication.localhost.bypass.enable allows you to configure whether localhost connections are allowed to bypass authentication.

    The default authentication mechanism for the REST listener is for clients to send the user and password through HTTP Basic Authentication; the wire listener will connect to the OneDB database server through JDBC using the provided user and password credentials. See User authentication with the wire listener for more details on authentication options.

  2. Start the REST listener using java
    java -jar $INFORMIXDIR/bin/jsonListener.jar -config rest.properties -logfile wire_listener_rest.log -start