REST API
REST API Overview
This section provides an overview of REST management API.
If web management is enabled (see )
the REST API can be used to monitor and manage the broker instance.
The Qpid broker REST services support traditional REST model which uses the GET method requests to retrieve
the information about broker configured objects, DELETE method requests to delete the configured object,
PUT to create the configured object and POST to update the configured objects.
The table below lists the available REST services with brief description how they can be used.
Rest services
Rest service URL
Description
GET
PUT
POST
DELETE
/rest/broker
Rest service to manage broker instance
Retrieves the details of broker configuration
Not implemented yet
Not implemented yet
Not implemented yet
/rest/authenticationprovider
/rest/authenticationprovider/<authentication provider name>
Rest service to manage authentication providers on the broker
Retrieves the details about authentication providers
Not implemented yet
Not implemented yet
Not implemented yet
/rest/user
/rest/user/<authentication provider name>/<user name>
Rest service to manage user account
Retrieves the details about user account
Creates user account
Updates user password
Deletes user account
/rest/groupprovider
/rest/groupprovider/<group provider name>
Rest service to manage group providers
Retrieves the details about group provider(s)
Not implemented yet
Not implemented yet
Not implemented yet
/rest/group
/rest/group/<group provider name>/<group name>
Rest service to manage user group
Retrieves the details about user group
Creates group
Not implemented yet
Deletes group
/rest/groupmember
/rest/groupmember/<group provider name >/<group name>/<user name>
Rest service to manage group member(s)
Retrieves the details about group member(s)
Add user to group
Not implemented yet
Deletes user from group
/rest/port
/rest/port/<port name>
Rest service to manage broker ports(s)
Retrieves the details about the broker port(s)
Not implemented yet
Not implemented yet
Not implemented yet
/rest/port
/rest/port/<port name>
Rest service to manage broker ports(s)
Retrieves the details about the broker port(s)
Not implemented yet
Not implemented yet
Not implemented yet
/rest/queue
/rest/queue/<virtual host name>/>queue name>
Rest service to manage queue(s)
Retrieves the details about the queue(s)
Creates queue
Not implemented yet
Deletes queue
/rest/exchange
/rest/exchange/<virtual host name>/<exchange name>
Rest service to manage exchange(s)
Retrieves the details about the exchange(s)
Creates exchange
Not implemented yet
Deletes exchange
/rest/binding
/rest/binding/<virtual host name>/<exchange name>/<queue name>/<binding name>
Rest service to manage binding(s)
Retrieves the details about the binding(s)
Binds a queue to an exchange
Not implemented yet
Deletes binding
/rest/connection
/rest/connection/<virtual host name>/<connection name>
Rest service to manage connection(s)
Retrieves the details about the connection(s)
Not implemented yet
Not implemented yet
Not implemented yet
/rest/session
/rest/session/<virtual host name>/<connection name>/<session name>
Rest service to manage session(s)
Retrieves the details about the session(s)
Not implemented yet
Not implemented yet
Not implemented yet
/rest/message/*
Rest service to manage messages(s)
Retrieves the details about the messages(s)
Not implemented yet
Copies, moves messages
Deletes messages
/rest/message-content/*
Rest service to retrieve message content
Retrieves the message content
Not implemented yet
Not implemented yet
Not implemented yet
/rest/logrecords
Rest service to retrieve broker logs
Retrieves the broker logs
Not implemented yet
Not implemented yet
Not implemented yet
/rest/sasl
Sasl authentication
Retrieves user current authentication status and broker supported SASL mechanisms
Authenticates user using supported SASL mechanisms
Not implemented yet
Not implemented yet
/rest/logout
Log outs
Log outs user
Not implemented yet
Not implemented yet
Not implemented yet
Rest URL are hierarchical. It is permitted to replace rest URL elements with an "asterisks" in GET requests to denote
all object of a particular type. Additionally, trailing object type in the URL hierarchy can be omitted.
In this case GET request will return all of the object underneath of the current object.
For example, for binding URL http://localhost:8080/rest/binding/<vhost>/<exchange>/<queue>/<binding>
replacing of <exchange> with "asterisks" (http://localhost:8080/rest/binding/<vhost>/*/<queue>/<binding>)
will result in the GET response containing the list of bindings for all of the exchanges in the virtual host having the given name and given queue.
If <binding> and <queue> are omitted in binding REST URL
(http://localhost:8080/rest/binding/<vhostname>/<exchangename>) the GET request will result in returning
all bindings for all queues for the given exchange in the virtual host.
Examples of queue creation using curl:
/
#create a durable priority queue
curl -X PUT -d '{"durable":true,"type":"priority"}' http://localhost:8080/rest/queue//
]]>
Example of binding a queue to an exchange using curl
///
]]>
Qpid broker web management console calls rest interfaces internally to manage the broker.