API

Messaging Middleware for the Open Web

Browsing the REST API

You can browse the REST API for RestMQ by running an instance of RestMQ and then browsing the API documentation at http://localhost:8080/api

The intention of the API is to fully support the hypermedia constraint which is often referred to as HATEOAS so you should only have to know a single URL and from that be able to navigate to all of the required resources using linking.

Using cURL

A quick way to get started with the API other than browsing could be to use cURL.

For example if youwant to see all the available resource types you can access using JSON then type the following into a command shell

curl http://localhost:8080/index.json

or you can use accept headers to specify you want to see the root URL as JSON

curl -Haccept:application/json http://localhost:8080/

you should see something like this response

{"resources":[
  {"name":"queues","uri":"/queues"},
  {"name":"topics","uri":"/topics"}]
}

you can then navigate to the child resources such as to get a list of all of the queues

curl -Haccept:application/json http://localhost:8080/queues