Rest API Usage
REST API
Last updated
REST API
Last updated
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.
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:
You can download a REST API client from the website above. Each client will have it's own syntax around making the REST API call, but they all follow the same REST pattern. You should be able to derive your necessary calls from the libraries you download
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.
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: