+

Search Tips | Advanced Search

Configure the administrative REST API gateway

By default, the administrative REST API gateway is enabled. When the administrative REST API gateway is enabled, we can perform remote administration with the REST API by using a gateway queue manager. We can configure the queue manager that is used as the default gateway queue manager, or we can prevent remote administration by disabling the administrative REST API gateway, by using the setmqweb command.


About this task

To complete this task, we must be a user with certain privileges so that we can use the dspmqweb and setmqweb commands:

  • On z/OS, we must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • On all other operating systems, we must be a privileged user.

The default gateway queue manager is used when both the following statements are true:

  • A queue manager is not specified in the ibm-mq-rest-gateway-qmgr header of a REST request.
  • The queue manager that is specified in the REST API resource URL is not a local queue manager.

For more information about remote administration with the REST API, see Remote administration using the REST API.

Attention:

Before issuing either the setmqweb or dspmqweb commands on z/OS, we must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.

To do this, issue the following command:
export WLP_USER_DIR=WLP_user_directory
where WLP_user_directory is the name of the directory that is passed to crtmqweb. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

For more information, see Create the mqweb server.


Procedure

  • View the current configuration of the administrative REST API gateway by using the following command:

    dspmqweb properties -a

    The mqRestGatewayEnabled field shows whether the gateway is enabled, and mqRestGatewayQmgr field shows the name of the default gateway queue manager. For more information, see dspmqweb.

  • Configure whether the administrative REST API gateway is enabled by using the following command:

    setmqweb properties -k mqRestGatewayEnabled -v enabled

    where enabled is the value true to enable the administrative REST API gateway, or false otherwise.

  • Configure which queue manager is used as the default gateway queue manager:

    • Set the default gateway queue manager by using the following command:

      setmqweb properties -k mqRestGatewayQmgr -v qmgrName

      where qmgrName is the name of a queue manager in the same installation as the mqweb server.

    • Unset the default gateway queue manager by using the following command:

      setmqweb properties -k mqRestGatewayQmgr -d

Parent topic: Configure the IBM MQ Console and REST API

Last updated: 2020-10-04