Configure the messaging REST API
By default, the mqweb server which hosts the IBM MQ Console and REST API has the messaging REST API enabled. We can configure whether messaging is enabled or disabled by using the setmqweb properties command.
Before you begin
You must be a privileged user to complete this procedure. We can view the current configuration of the messaging REST API by using the following command:dspmqweb properties -aThe mqRestMessagingEnabled field shows whether the messaging REST API is enabled or disabled. For more information, see dspmqweb. To use the messaging REST API the caller must be authenticated to the mqweb server and must be a member of the MQWebUser role. The MQWebAdmin and MQWebAdminRO roles are not applicable for the messaging REST API. The caller must also be authorized through OAM/RACF. For more information about security for the REST API, see IBM MQ Console and REST API security.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_directorywhere 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
Use the following method to configure the messaging REST API:- Use the setmqweb properties command:
- Configure whether the messaging REST API is enabled, by using the following command:
setmqweb properties -k mqRestMessagingEnabled -v enabled
where enabled is the value true if you want the messaging REST API enabled, or false otherwise.
- Configure whether the messaging REST API is enabled, by using the following command: