MFT Transfer REST API is useful to monitor the transfers that are initiated using a particular coordination queue manager.
This API is useful in cases where user wants to get list of all the transfers initiated by the user. For example, if user initiated 100 transfers and wants to know the status of those, then transfer status REST API would serve the purpose.
URL to get the list of transfers: “ http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer”
URL to get details of a specific transfer: “http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer/{transferid}”

Transfer URI query parameters:

Limit integer Maximum number of transfers to be retrieved. If limit=200. The API will return at most 200 transfers.
After String TransferId of the transfer from where the transfer list must be fetched. All the transfers which are initiated after that particular transfer will be fetched.
Before String TransferId of the transfer from where the transfer list has to fetched. All the transfers which are initiated before that transfer will be fetched.

URL’s:

• http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer
o Gets the list of transfers initiated after the mqweb server is started. If there are more than 100 transfers, then the Uri will get the latest 100 transfers only.
• http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer?limit=200
o Gets list of 200 transfers.If user wants more than 100
transfers,then limit can be used as a query parameter.
• http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer?after={transferId}&limit=100
o Gets the list of 100 transfers which were initiated after a transfer
• http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer?before={transferId}&limit=10
o Gets the list of 10 transfers which were initiated after a transfer.
• http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer?before={transferId}&limit=10&attributes=*
o Gets list of 10 transfers with all the attributes after a transfer.
• http[s]://hostname:port/9080/ibmmq/rest/v1/admin/mft/transfer/{transferid}?attributes={propertyName}
o Gets the specific property of a transfer along with the default properties.

Response Data:

The response data from this API is in JSON format. The structure of the JSON data is as follows:
• An outer JSONObject containing a single property, named in
accordance with the url – in this case “transfer”.
• The property value is a JSONArray containing zero or more JSON
Objects, each representing an individual transfer.
• Each JSON Object (i.e transfer) intern contains multiple JSON
Objects i.e
sourceAgent, destinationAgent, statistics, status,transferSet,originator.
• By default, only basic fields of the following JSON Objects
are returned
o sourceAgent
o destinationAgent
o originator
o statistics
o status
• If the user wants full details of a transfer then uri should
use “attributes=” as a query parameter.
o Eg: Provides all the details of a transfer with transfer id
:414D51204D465444454D4F352020202098B9B45A2407CA04
http://localhost:9080/ibmmq/rest/v1/admin/mft/transfer
/414D51204D465444454D4F352020202098B9B45A2407CA04?attributes=

o Eg : Following uri provides all the details of all the
transfers
http://localhost:9080/ibmmq/rest/v1/admin/mft/transfer?attributes=*

• Following is the sample response data for
“curl -k -i http://localhost:port/9080/ibmmq/rest/v1/admin/mft/transfer”

{“transfer”: [
{
“destinationAgent”: {“name”: “AGENT.TRI.BANK”},
“originator”: {
“host”: “xxx.xxx.xxx.xxx”,
“userId”: “user1”
},
“sourceAgent”: {“name”: “TESTAGENT”},
“statistics”: {
“endTime”: “2018-01-08T16:22:15.569Z”,
“numberOfFileFailures”: 0,
“numberOfFileSuccesses”: 2,
“numberOfFileWarnings”: 0,
“numberOfFiles”: 2,
“startTime”: “2018-01-08T16:22:15.242Z”
},
“status”: {
“state”: “successful”
},
“id”: “414D51204D465444454D4F3320202020513E525A21109908”
},
{
“destinationAgent”: {“name”: “AGENT.TRI.BANK”},
“originator”: {
“host”: “xxx.xxx.xxx.xxx”,
“userId”: “user1”
},
“sourceAgent”: {“name”: “TESTAGENT”},
“statistics”: {
“endTime”: “2018-01-08T16:22:13.573Z”,
“numberOfFileFailures”: 0,
“numberOfFileSuccesses”: 2,
“numberOfFileWarnings”: 0,
“numberOfFiles”: 2,
“startTime”: “2018-01-08T16:22:13.167Z”
},
“status”: {
“state”: “successful”
},
“id”: “414D51204D465444454D4F3320202020513E525A21109702”
}
]}

• Following is the sample response data for
“curl -k -i http:// http://localhost:9080/ibmmq/rest/v1/admin
/mft/transfer
/414D51204D465444454D4F352020202098B9B45A2407CA04?attributes=*”

{“transfer”: [{
“destinationAgent”: {
“name”: “TESTAGENT”,
“qmgrName”: “MFTDEMO5”
},
“id”: “414D51204D465444454D4F352020202098B9B45A2407CA04”,
“job”: {“name”: “”},
“originator”: {
“host”: “xxx.xxx.xxx.xxx”,
“mqmdUserId”: “ramsubbarao”,
“userId”: “ramsubbarao”
},
“sourceAgent”: {
“name”: “AGENT.TRI.BANK”,
“qmgrName”: “MFTDEMO5”
},
“statistics”: {
“endTime”: “2018-03-23T09:05:36.909Z”,
“numberOfFileFailures”: 0,
“numberOfFileSuccesses”: 1,
“numberOfFileWarnings”: 0,
“numberOfFiles”: 1,
“retryCount”: 0,
“startTime”: “2018-03-23T09:05:34.927Z”
},
“status”: {
“description”: “BFGRP0032I: The file transfer request has
successfully completed.”,
“lastStatusUpdate”: “2018-03-23T09:05:36.909Z”,
“state”: “successful”
},
“transferSet”: {
“bytesSent”: 10,
“item”: [{
“destination”: {
“actionIfExists”: “overwrite”,
“checksum”: {
“method”: “MD5”,
“value”: “A4E62171B356C1022F42C7B03ADF4782”
},
“file”: {
“encoding”: “”,
“endOfLine”: “”,
“lastModified”: “2018-03-23T09:05:36.230Z”,
“path”: “C:\\temp1\\temp\\telephon.txt”,
“size”: 10
},
“type”: “file”
},
“mode”: “binary”,
“source”: {
“checksum”: {
“method”: “MD5”,
“value”: “A4E62171B356C1022F42C7B03ADF4782”
},
“disposition”: “leave”,
“file”: {
“encoding”: “”,
“endOfLine”: “”,
“lastModified”: “2018-01-29T09:32:03.950Z”,
“path”: “C:\\temp1\\hello1.txt”,
“size”: 10
},
“type”: “file”
},
“status”: {
“description”: “BFGRP0032I: The file transfer request has successfully completed.”,
“state”: “successful”
}
}] },
“userProperties”: {}
}]}

• Following is the sample response data for “curl -k -i
http://localhost:9080/ibmmq/rest/v1/admin
/mft/transfer?attributes=transferSet.item.destination”

{“transfer”: [{
“destinationAgent”: {“name”: “TESTAGENT”},
“id”: “414D51204D465444454D4F352020202098B9B45A2407CA04”,
“originator”: {
“host”: “xxx.xxx.xxx.xxx”,
“userId”: “ramsubbarao”
},
“sourceAgent”: {“name”: “AGENT.TRI.BANK”},
“statistics”: {
“endTime”: “2018-03-23T09:05:36.909Z”,
“numberOfFileFailures”: 0,
“numberOfFileSuccesses”: 1,
“numberOfFileWarnings”: 0,
“numberOfFiles”: 1,
“startTime”: “2018-03-23T09:05:34.927Z”
},
“status”: {“state”: “successful”},
“transferSet”: {“item”: [{“destination”: {
“actionIfExists”: “overwrite”,
“checksum”: {
“method”: “MD5”,
“value”: “A4E62171B356C1022F42C7B03ADF4782”
},
“file”: {
“encoding”: “”,
“endOfLine”: “”,
“lastModified”: “2018-03-23T09:05:36.230Z”,
“path”: “C:\\temp1\\temp\\telephon.txt”,
“size”: 10
},
“type”: “file”
}}]}
}]}

If you see the above response, along with the default JSON structure only transferSet.item.destination details are provided because the uri had a query parameter which is “attributes=transferSet.item.destination”.
If the URI contains a query parameter, the JSON structure would contain details of that attribute along with the default JSON structure.
Following infocenter link contains more information on the attributes
https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.adm.doc/restjsonout.htm

Join The Discussion

Your email address will not be published.