Getting Started

Perform the following steps for a quick start with the REST Proxy.

    Procedure
  1. Create a JSON version of the EMS server's sample configuration file:

    /opt/tibco/ems/10.5/bin/tibemsconf2json -conf /opt/tibco/ems/10.5/samples/config/tibemsd.conf -json /tmp/tibemsd.json
  2. Create a store directory for EMS:

    mkdir datastore
  3. Run the EMS server using the new JSON configuration file:

    /opt/tibco/ems/10.5/bin/tibemsd -config /tmp/tibemsd.json
  4. In another shell, start the EMS REST Proxy with at least one server group and one server role defined:

    /opt/tibco/ems/10.5/bin/tibemsrestd --ems.server_groups.group1.servers.srv1.url tcp://localhost:7222
  5. In a third shell, make sure the proxy is up and listening:

    curl -ks https://localhost:8080/ping

    If you receive a {"message":"pong"} response to your ping, the proxy is running.

  6. Connect using the default admin user and no password:

    curl -ks -X POST -c /tmp/cookies.txt -b /tmp/cookies.txt https://admin:@localhost:8080/connect

    You should see an {"errors":[]} response if the connection succeeded.

  7. Now try listing the configured users:

    curl -ks -c /tmp/cookies.txt -b /tmp/cookies.txt https://localhost:8080/users

    If you see a response similar to the following, then congratulations, you are up and running:

    {
        "errors": [],
        "first": "ABapGvuZyfr2BVLY82pzkJ1r8ijPHvEXQbxwwAaEqfQfwP4p1A",
        "last": "ABapGvuZyfr2BVLY82pzkJ1r8ijPHvEXQbxwwAaEqfQfwP4p1A",
        "next": "",
        "prev": "",
        "self": "ABapGvuZyfr2BVLY82pzkJ1r8ijPHvEXQbxwwAaEqfQfwP4p1A",
        "users": [
            {
                "description": "Route Server",
                "external": false,
                "name": "EMS-SERVER2",
                "server_group": "group1",
                "server_role": "srv1"
            },
            {
                "description": "Main Server",
                "external": false,
                "name": "EMS-SERVER",
                "server_group": "group1",
                "server_role": "srv1"
            },
            {
                "description": "Administrator",
                "external": false,
                "name": "admin",
                "server_group": "group1",
                "server_role": "srv1"
            }
        ]
    }