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 Configure the REST API for MFT for more information.


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>

We can use HTTP instead of HTTPS if you enable HTTP connections. For more information about enabling HTTP, see Configure 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 we are using basic authentication. For more information, see Use 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 Use token-based authentication with the REST API.

If we have set up a user sandbox, and MFT authority checking , or MFT authority checking, is turned on, we 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 authorized Liberty profile 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 with this login, the originator data in the xml has mftadminusr:
<originator>
  <hostName>example.com.</hostName>
  <userID>mftadminusr</userID> 
</originator>
For the MQWebUser role support, the principal logged onto the Liberty profile requires the following authority. If the command queue is:
  1. Local, grant PUT authority to the command queue.
  2. Remote, that is, when the command queue manager and source agent queue manager are different, grant PUT authority to the transmission queue.

Notes:

  • If the Principal name with an effective MQWebUser role is longer than 12 characters, the request fails with a 403 return code.
  • If the Principal is configured to have multiple roles, only one role applies when determining behavior, and that role is determined by the Principal having the highest privileges applicable to the requested REST API operation.

If security is disabled on the Liberty profile, the transfer request submitted contains the name "UNAUTHENTICATED" user 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. See Security requirements for more information.
    The ibm-mq-rest-csrf-token header must also be specified.

    403
    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 all, or a subset, of the required IBM MQ or MFT resources.

    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.

Parent topic: /admin/mft/monitor


Related reference


Related information