DELETE

Use the HTTP DELETE method with the monitor resource to delete an existing monitor, or delete the history of an existing monitor.

Note:
  • Set the command queue manger in the configuration before issuing any MFT Create Monitor or Transfer REST API command. See Configuring the REST API for MFT for more information.
  • [MQ 9.3.5 Feb 2024]This resource is not available in a stand-alone IBM® MQ Web Server installation. For more information about the installation options for the IBM MQ component that runs the administrative REST API, see The IBM MQ Console and REST API.

Resource URL

To delete an existing monitor:
https://host:portibmmq/rest/v2/admin/mft/monitor/
{monitor name}?agent=<agentName>&agentQmgr=<QmgrName>
To delete the history of an existing monitor:
https://host:portibmmq/rest/v2/admin/mft/monitor/
{monitor name}/history?agent=<agentName>&agentQmgr=<QmgrName>

You can use HTTP instead of HTTPS if you enable HTTP connections. For more information about enabling HTTP, see Configuring the HTTP and HTTPS ports.

Request headers

The following headers must be sent with the request:
Content-Type
This header must be sent with a value of application/json optionally followed by ;charset=UTF-8.
ibm-mq-rest-csrf-token
This header must be set, but the value can be anything, including being blank.
Authorization
This header must be sent if you are using basic authentication. For more information, see Using HTTP basic authentication with the REST API.

Request body format

None.

Security requirements

The caller must be authenticated to the mqweb server and must be a member of the MFTWebAdmin or MFTWebUser roles. For more information about security for the administrative REST API, see IBM MQ Console and REST API security.

If token based security is used, the LTPA token that is used to authenticate the user must be provided with the request as a cookie. For more information about token-based authentication, see Using token-based authentication with the REST API.

If you have set up a user sandbox, and MFT authority checking , or MFT authority checking, is turned on, you need to grant an additional authority for the user that started the WebSphere® Liberty server to access the specified file system location.

For the MFTWebAdmin role, transfer requests are submitted under the context of the user that started the Liberty server. To distinguish between different principals of the MFTWebAdmin role, and for audit purposes, the transfer request submitted contains the name of the authenticated user as the transfer originator. This method ensures that there is a record of who initiated the transfer request.

For example, if the user mftadminusr, of the MFTWebAdmin role, initiates a transfer, the originator data in the XML has mftadminusr in the userID element, as shown in this example:
<originator>
  <hostName>example.com.</hostName>
  <userID>mftadminusr</userID> 
</originator>
If the caller is a member of the MQWebUser role, the security principal of the caller must be granted one of the following authorities:
  1. If the command queue is local, that is, the command queue manager and source agent queue manager are the same, grant put authority to the command queue.
  2. If the command queue is remote, that is, the command queue manager and source agent queue manager are different, grant put authority to the transmission queue.
Notes:
  • If the user ID of a principal that is a member of the MQWebUser role is longer than 12 characters, the request fails. Response status code 403 is returned to the caller.
  • If the caller is assigned more than one role, the highest privilege role that is applicable to the operation is used.

If security is disabled on the mqweb server, the transfer request submitted contains the name "UNAUTHENTICATED" as the transfer originator.

Response status codes

202
The delete request has been accepted by the REST API. It might still get rejected by the MFT agent.
400
Invalid or unknown data provided to delete resource monitor.
For example, invalid attributes specified.
401
Not authenticated.
The user must be authenticated to the mqweb server. For more information, see Security requirements.
The ibm-mq-rest-csrf-token header must also be specified.
403
Access prohibited for one of the following reasons:
  • Not authorized. The caller is authenticated to the mqweb server and is associated with a valid principal. However, the principal does not have access to the required IBM MQ or MFT resources.
  • [MQ 9.3.5 Feb 2024]Access prohibited in the current server environment. The administrative REST API is not available in a stand-alone IBM MQ Web Server installation.
500
Server issue, or error code from IBM MQ or MFT.

Response headers

The following header is returned with the response:
location
If the request was successful, this header specifies the URL with the details of the deleted resource monitor. https://host:port/ibmmq/rest/v1/admin/mft/monitor/{monitorName} .

Response body format

The response body is empty if the deletion is successful.

If an error occurs, the response body contains an error message; see REST API error handling.