Rest API Usage

REST API

The only way to communicate with the AllQServer is through the AllQClient.

By default, the AllQClient offers a RESTful API for communicating with the AllQServer. This HTTP API is configurable via environment variables.

HTTP_SERVER_PORT = 8090 (default)

You application will call into this local http server with JSON and standard REST API calls.

How do I use AllQ now?

The simplest way is to use the REST API provided by the AllQClient.

The AllQClient is running a simple http server on localhost. This REST API is defined here:

AllQueue Rest API

Alternately, you can use a REST API library from your language of choice, and simply use the defined API above. In the example below, we will use the Ruby AllQ gem.

Example

Here is a simple ruby example that will put and get items from your server. This gem is just a thin wrapper around the REST API.

You must run this ON a machine that has the AllQClient installed. The REST API client assumes localhost:8090.

Save this file as test.rb and simply run it via:

Last updated

Was this helpful?