Enabling the REST API for MFT

Before you can use the REST API for MFT, you must first enable the REST API for MFT. You can configure whether the REST API for MFT is enabled by using the setmqweb command. By default, the REST API for MFT is not enabled.

Before you begin

[MQ 9.3.5 Feb 2024][Linux]Note: If the mqweb server runs in a stand-alone IBM® MQ Web Server installation, this task is not applicable. The REST API for MFT is not available in a stand-alone IBM MQ Web Server installation.
To complete this task, you must be a user with certain privileges so that you can use the dspmqweb and setmqweb commands:
  • [z/OS]On z/OS®, you must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • [UNIX, Linux, Windows, IBM i]On all other operating systems, you must be a privileged user.
[z/OS]Attention:

Before you issue 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 set the WLP_USER_DIR environment variable, 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

  1. View the current configuration of the REST API for MFT by using the following command:
    dspmqweb properties -a
    The mqRestMftEnabled field shows whether the REST API for MFT is enabled. The value is True if the REST API for MFT is enabled, or False otherwise.
  2. Enable or disable the REST API for MFT by using one of the following commands:
    • Enable the REST API for MFT by using the following command:
      setmqweb properties -k mqRestMftEnabled -v true
    • Disable the REST API for MFT by using the following command:
      setmqweb properties -k mqRestMftEnabled -v false
  3. Restart the mqweb server by entering the following commands:
    endmqweb
    strmqweb

What to do next

If you enabled the REST API for MFT, you must set the coordination queue manager name before you can use the REST API for MFT. For more information about how to set the coordination queue manager, see Configuring the coordination queue manager for the REST API for MFT.