IBM MQ Managed File Transfer (MFT) transfers files between systems in a managed and auditable way, regardless of file size or the operating systems used. You can use Managed File Transfer to build a customized, scalable, and automated solution that enables you to manage, trust, and secure file transfers. Managed File Transfer eliminates costly redundancies, lowers maintenance costs, and maximizes your existing IT investments.
MFT provides multiple options to initiate transfers:
- Resource monitors: Poll a file system directory or a MQ queue at specified intervals and automatically submit transfer requests when files/messages matching a specified pattern arrive.
- Scheduled Transfers: Initiate transfers at specified time and intervals.
- fteCreateTransfer: Initiate transfers using command.
- Templates: Submit transfer requests using predefined templates via MQExplorer.
- Ant Scripts: Perform conditional transfers using Ant Script. For example – initiate transfer B only if transfer A succeeds or fire an email if transfer A fails.
- REST API: Submit transfers using MFT Rest APIs in any language/scripts that support HTTP verbs.
This blog provides links to sample code to submit transfer requests using REST APIs in Golang and Python.
This writeup assumes the following:
- MQ Web Server has been configured and started.
- Basic authentication has been configured in the MQ Web Server.
The sample programs do the following to submit transfer request and later query the status of transfer.
- Build a JSON payload containing transfer request.
- Connect to MQ Web Server and do a HTTP POST request with payload.
- Verify the response of the POST request and note the transfer status URL returned in the response header.
- Use the transfer status URL to query the status using HTTP GET verb.
The sample programs have been posted in the following Github repositories.
Golang: https://github.com/ibm-messaging/mft-rest-submit-transfer-go
Python: https://github.com/ibm-messaging/mft-rest-submit-transfer-py