Determining the REST API URL

The default URL to access the administrative REST API at Version 9.0.4 and later is: https://localhost:9443/ibmmq/rest/v1/admin. At Version 9.0.3 and earlier the default URL is: https://localhost:9443/ibmmq/rest/v1. The default URL to access the messaging REST API is: https://localhost:9443/ibmmq/rest/v1/messaging. If the host or port is changed from the default, or if HTTP is enabled, we can determine the URL by using the dspmqweb command.


From Version 9.0.4, we can use the dspmqweb status command to determine the REST API URL on Windows, Linux , and z/OSĀ®.

For Version 9.0.3, and earlier, on Windows and Linux, we can use the dspmqweb command. On z/OS you must search the messages.log file to determine the URL.


Procedure

Use one of the following methods to determine the URL:

  • From Version 9.0.4, use the dspmqweb status command as a privileged user:
    1. Ensure that the mqweb server is running, by entering the strmqweb command on the command line.
    2. Display the URL, by entering the dspmqweb status command on the command line.
  • For Version 9.0.3 and earlier, use one of the following methods:

    • On Windows or Linux, use the dspmqweb command as a privileged user:
      1. Ensure that the mqweb server is running, by entering the strmqweb command on the command line.
      2. Display the URL, by entering the dspmqweb command on the command line.
    • On z/OS, use the messages.log file to find the URL:
      1. Open the messages.log file.

        The messages.log file is on the WLP_user_directory/servers/mqweb/logs path, where WLP_user_directory is the directory that was specified when the crtmqweb.sh script ran to create the mqweb server definition.

      2. Search for the latest CWWKT0016I message code that ends with ibmmq/rest/v1. The URL is included in this message.


Example

The following example shows the message code CWWKT0016I with the URL as the default URL:

A CWWKT0016I: Web application available (default_host): https://localhost:9443/ibmmq/rest/v1