One of the new features introduced in MQ 9.0.5 is the MQ Managed File Transfer (MFT) REST API. It is a start for a big picture that provides API interface for MFT administrative functionality via HTTP and REST interfaces.

Need of the hour

Automating MQ Managed File Transfer (MFT) administration has historically been possible by wrapping command line interface / runmqsc in scripts or by using PCF. These options may not be as convenient as administrating through REST API’s.

Across IT in general, creating dashboard to monitor and administrating the service has become the latest trend. To create such interfaces REST APIs are very popular. Many programmers are familiar with this line of actions and the tooling is easily available, making it easy for the programmer. There was also a demand from the developers for the MFT REST API. Therefore, we provided REST APIs for MFT administration in the same line of MQ REST APIs.

Note In the current release this service is available on MQAdvance.

 

How to use MFT REST API

MFT REST services are also deployed on the same webserver, where MQ REST services are deployed. The starting / stopping for the MFT REST services are handled in the similar manner as that of MQ REST API.

To handle the aspects of MFT resources through MFT REST API interface, two new roles have been added. MFTWebAdmin and MFTWebAdminRO are added to the existing IBM MQ specific roles of MQWebAdmin, MQWebAdminRO and MQWebUser.

Role Privilege
MFTWebAdmin A user or a group assigned to this role can perform all MFT REST operations. This operates under the security context of the operating system of a user ID that is used to start the mqweb server.
MFTWebAdminRO This role provides read only access to the MFT REST API ( i.e GET requests only). A user or a group that is assigned this role can perform read only operations like list transfer and list agents.

 

There are also three new configuration parameters that are very specific to MFT. These values must get into “mqwebuser.xml”.

Properties Type Description
mqRestMftEnabled boolean To enable MFT REST API services, it must be set as ‘true’.
mqRestMftCoordinationQmgr string The name of the coordination queue manager that fetches the details to be retrieved
mqRestMftReconnectTimeoutInMinutes integer The time in minutes until MFT stops attempting to connect to the coordination queue manager, when it fails.
Note In the current release the coordination qmgr must be configured in the same server where webserver is running.

 

When this server is appropriately configured and started, you get access to the REST API operations via HTTP and/or HTTPS.

How data for response is generated ?

Most of the data for the response are retrieved by subscribing to a relevant topic in coordination qmgr.

For example
In the case of agent, some information is retrieved by subscribing to the topic “SYSTEM.FTE/Agents/#”, there are few other information that are calculated (like status age of the agent), and there are few data, configured through “agent.properties”. These values that are not available with the published data, are dynamically retrieved from the agent properties.

The REST API is exposed via a URL hierarchy based at
http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/

In accordance with normal REST practices, the usual HTTP methods have the following semantics:-

HTTP Method

Result
GET Retrieve information about an MFT entity or entities.
Note: Current release supports only this method.
POST Create a new MFT entity
PUT Update an existing MFT entity
DELETE Delete an existing MFT entity

Data is exchanged in “application:json” format.

What is available at MQ V9.0.5 ?

In the current release, REST services were implemented to retrieve the status and details of the following:
Agents
Transfers

References

https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.adm.doc/restapi_ref.htm

In MQ V9.0.5 the first phase of MFT REST services was delivered, where it was exposed that APIs which enquirers MFT agent and transfer status. This surely eases MFT administration, and you may highlight any more API that needs to be exposed for MFT?

2 comments on"MQ 9.0.5 – Quick Start with MFT REST APIs"

  1. When will the 9.0.5 PTFs be published ?

Join The Discussion

Your email address will not be published.