setmqweb (set mqweb server configuration)

Add or remove a known configuration property from the mqwebuser.xml file.

Purpose

We can use the setmqweb properties command to configure the mqweb server. The mqweb server is used to support the IBM MQ Console and REST API.

Use the command on z/OS

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 passed to crtmqweb.sh. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

See Create the Liberty server definition for more information.

Syntax

setmqweb properties -r-kname-d-vvalue -l

Parameters

    -r
    Reset to default values. This parameter removes all user-modified configuration properties from the mqwebuser.xml file.
    -k name
    The name of the configuration property to add, update, or remove to or from the mqwebuser.xml file. The following values are the valid values for name on all platforms, including the IBM MQ Appliance:

      ltpaExpiration
      This configuration property is used to specify the time, in seconds, before the LTPA token expires.
      The value for this property is an integer value.

      maxTraceFiles
      This configuration property is used to specify the maximum number of trace files that are generated by the mqweb server.
      The value for this property is an integer value.

      maxTraceFileSize
      This configuration property is used to specify the maximum size, in MB, that each log file can reach.
      The value for this property is an integer value.

      mqRestCorsAllowedOrigins
      This configuration property is used to specify the origins that are allowed to access the REST API. For more information about CORS, see Configure CORS for the REST API.
      The value for this property is a string value.

      mqRestCorsMaxAgeInSeconds
      This configuration property is used to specify the time, in seconds, that a web browser can cache the results of any CORS pre-flight checks.
      The value for this property is an integer value.

      mqRestCsrfExpirationInMinutes
      This configuration property no longer exists at Version 9.0.5.
      Applicable to Version 9.0.4 only, and used to specify the time, in minutes, before the CSRF token expires.
      The value for this property is an integer value.

      mqRestCsrfValidation
      This configuration property is used to specify whether CSRF validation checks are performed. A value of false removes the CSRF token validation checks.
      The value for this property is a boolean value.

      mqRestGatewayEnabled
      This configuration property is used to specify whether the administrative REST API gateway is enabled.
      The value for this property is a boolean value.

      mqRestGatewayQmgr
      This configuration property is used to specify the name of the queue manager to use as the gateway queue manager. This queue manager must be in the same installation as the mqweb server. A blank value indicates that no queue manager is configured as the gateway queue manager.
      The value for this property is a string value.

      mqRestMessagingEnabled
      This configuration property is used to specify whether the messaging REST API is enabled.
      The value for this property is a boolean value.

      mqRestRequestTimeout
      This configuration property is used to specify the time, in seconds, before a REST request times out.
      The value for this property is an integer value.

      traceSpec
      This configuration property is used to specify the level of trace that is generated by the mqweb server. For a list of possible values, see Configure logging for the IBM MQ Console and REST API.
      The value for this property is a string value.

    The following values are the additional valid values for name on z/OS, UNIX, Linux , and Windows:

      httpHost
      This configuration property is used to specify the HTTP host name as an IP address, domain name server (DNS) host name with domain name suffix, or the DNS host name of the server where IBM MQ is installed.
      We can use an asterisk in double quotation marks to specify all available network interfaces.
      We can use the value localhost to allow only local connections.
      The value for this property is a string value.

      httpPort
      This configuration property is used to specify the HTTP port number that is used for HTTP connections.
      We can use a value of -1 to disable the port.
      The value for this property is an integer value.

      httpsPort
      This configuration property is used to specify the HTTPS port number that is used for HTTPS connections.
      We can use a value of -1 to disable the port.
      The value for this property is an integer value.

      mqConsoleAutostart
      This configuration property is used to specify whether the IBM MQ Console automatically starts when the mqweb server starts.
      The value for this property is a boolean value.

      mqRestAutostart
      This configuration property is used to specify whether the REST API automatically starts when the mqweb server starts.
      The value for this property is a boolean value.

    -d
    Deletes the specified configuration property from the mqwebuser.xml file.
    -v value
    The value of the configuration property to add to, or update in, the mqwebuser.xml file. Any existing configuration properties of the same name are overwritten. Duplicate configuration properties are removed.
    The value is case-sensitive. To specify an asterisk, multiple tokens, or an empty value, enclose the value in double quotation marks.
    The value that is specified is not validated. If incorrect values are specified a subsequent attempt to start the mqweb server might fail.
    -l
    Enable verbose logging. Diagnostic information is written to an mqweb server log file.

Return codes

Return code Description
0 Command successful
>0 Command not successful.
For a full list of server command exit codes, see Liberty:server command options in the WebSphere Application Server documentation.

Related commands

Command Description
strmqweb Start the mqweb server.
endmqweb Stop the mqweb server.
dspmqweb Display the status or configuration of the mqweb server.