If you want to try out the Navigator REST API without installing it, you can exercise it on the Navigator demo system.
Copy this link and paste into your browser (or select and choose open in new tab): https://navigator.meshiq.com:8019/rest/v1/api-docs?url=/rest/v1/openapi.json#/
The REST API interface is subject to change and there may be some
variations from the images shown.
Viewing the available functions
For example, scroll down to see these IBM MQ Queues requests. You can view the available functions by just scrolling through them.
Clicking on an item shows the parameters and sample responses like the one below.
Note this is just sample output not an actual response.
Try it out
You can also exercise various functions using data from the demo system. In order to do this you must first authorize.
Authorize
Scroll back to the top of the list and click the Authorize button on the right side at the top of the page
For credentials, use basic authentication and the same user and password you would use to login from the main Navigator login screen which is demo / demo for this system.
Once you click Authorize, you will be logged in and it will show Authorized
Click Close to dismiss the dialog.
Invoking API Requests
Querying Object data
Navigate back to GET /ibmmq/queues Search Queues and click on it to expand it. You will see the various parameters available but you will not be able to enter any data until you click the Try it out button on the right.
This will switch to say Cancel and the parameters will become input fields. For your first query, leave attributes and nodeName unchanged, and set qmgrName to QM_PROD and queueName to CREDIT.*.
Then press the Execute button at the bottom of the parameters
If you get authorization error, it indicates you didn't Authorize correctly above.
This is the expected response for the query requested, representing the 2 queues that match CREDIT on QM_PROD.
You are probably wondering where are the other attributes of the queues? Since we only asked for the queue information, that was all that was returned.
Add * to the attributes requested
and Execute the query again. This time multiple pages of data are returned.
We can also use the parameters to get a group of attributes or specific attributes. The following are examples that you can try out.
- general.* - returns all of the general attributes
- general.description - the description of the queue
- extended.maxDepth, state.curQdepth - Maximum and current depth of the queue
Making changes to objects
Next, collapse GET and expand DELETE (delete queue), then click on Try it out as above.
Enter IP-172-31-47-88 for node name, QM_PROD for the queue manager and CREDIT.INPUT.PROCESS for the queue name.
Then press the EXECUTE option to run it.
You will get the following response.
Which indicates that you do not have access to the resource to delete it. You didn't expect you would be able to, did you? The demo user is limited to viewing objects which applies both in the GUI interface as well as in the REST API.
Summary
This was a basic walk though of the REST API, more details can be found in REST API examples and in the product documentation.