You can use an url like https://localhost:9443/ibm/api/explorer to display the mqweb api documentation. The documentation is in swagger format, available in a web browser. This is the same information you get from a REST request see here.
If you enter the url in the web browser, and you are using certificate authentication, you will be prompted with a list of valid certificates. Any certificate is valid. Even one with a CN=unknown was accepted. The information is read only so this is not an issue.
The web page has
- API Discovery
- channel
- …
- login
- …
If you click login it gives
- DELETE /ibmmq/rest/v1/login
- Logs out a user
- GET /ibmmq/rest/v1/login
- Queries the authenticated user and their roles.
- POST /ibmmq/rest/v1/login
- Logs out a user
If you click on an item it displays more information, in a nice, easy to read format. Much easier to read than if you retrieved it using the REST API.
What it doesn’t tell you
It does not tell you to put ?attributes=*&status=* on the end of your query to get queue attributes, and qstatus returned, as in https://127.0.0.1:9443/ibmmq/rest/v1/admin/qmgr/QMA/queue/CP0000?attributes=*&status=* . See here for more information.
Using the url as a REST request.
Using the url from curl and –user colinpaice:password gave
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:9443
Using certificate authentication nothing was returned.
Using certificate authentication and the –include option (include headers)
url –include https://localhost:9443/ibm/api/explorer –cacert cacert.pem –cert colinpaice.pem:password –key colinpaice.key.pem
gave
HTTP/1.1 401 Unauthorized
So using the explorer url is not allowed.
2 thoughts on “Using IBM api explorer to display the syntax of mq rest commands.”