[V9.0.4 Oct 2017]

Configuring the administrative REST API gateway

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

About this task

You must be a privileged user to complete this procedure.

You can 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.
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.

[z/OS][V9.0.4 Oct 2017]Attention:

Before issuing either the setmqweb or dspmqweb commands on z/OS®, you 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.sh. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

For more information, see Create the Liberty server definition.

Procedure

  • 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