Bitesize Blogging: View your subscriptions with the MQ REST API

Share this:

We have a number of new features to talk to you about that are all part of the MQ REST API in V9.0.4. I’m here to talk to you about just one of them, subscriptions.

Overview

If you’ve been following these blogs posts you’ll have no doubt heard that in MQ V9.0.1 we introduced a REST API. It gives you a really quick and modern way of issuing administrative actions to MQ by using HTTP requests. Over the last several releases we’ve continued to extend this API, expanding it to support more MQ objects. We’ve added APIs for queue managers, queues, channels and even runmqsc support. In V9.0.4, GET support for subscriptions was added to this list; you can issue a request and the REST API now will process it and return a list of subscriptions to you.

How do I use the subscriptions REST API?

Below is an example REST API request querying the list of subscriptions available on my test queue manager along with the response.
GET http://localhost:9080/ibmmq/rest/v1/admin/qmgr/RESTQM1/subscription

In addition to a basic request, we support all the usual parameters we’ve been adding to our other REST APIs such as limiting the list of attributes returned to a subset you care about or applying a number of filters against the dataset to only show the subscriptions that match your criteria.

For example, the following request will display the extended attributes on subscriptions that are against the topic ‘sports’