GET
Use the HTTP GET method with the transfer resource to request information about transfers and transfer status. We can query only the transfers that are initiated after the mqweb server is started.
The information that is returned is similar to the information returned by the fteListScheduledTransfers command.
Note: You must set a coordination queue manager before we can use the transfer resource. For more information, see Configure the REST API for MFT.- Resource URL
- Optional query parameters
- Request headers
- Request body format
- Security requirements
- Response status codes
- Response headers
- Response body format
- Examples
Resource URL
https://host:port/ibmmq/rest/v1/admin/mft/transfer/{transferID}
- transferID
- Optionally specifies the ID of the transfer to query.
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.
Optional query parameters
- attributes
- This query parameter is valid only when a transfer ID is specified.
- limit
- This query parameter is valid only when no transfer ID is specified.
- after
- This query parameter is valid only when no transfer ID is specified.
- before
- This query parameter is valid only when no transfer ID is specified.
Request headers
The following header must be sent with the request:
- Authorization
- This header must be sent if you 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 one or more of the MFTWebAdmin, or MFTWebAdminRO roles. For more information about security for the administrative REST API, see IBM MQ Console and REST API security.
Response status codes
- 200
- Transfer information retrieved successfully.
- 400
- Invalid data provided.
- 401
- Not authenticated.
- 403
- Not authorized.
- 404
- A transfer with the specified ID does not exist.
- 500
- Server issue or error code from IBM MQ.
- 503
- Queue manager not running.
Response headers
- Content-Type
- This header is returned with a value of application/json;charset=utf-8.
Response body format
The response is in JSON format in UTF-8 encoding. The response contains an outer JSON object that contains a single JSON array called transfer. Each element in the array is a JSON object that represents information about a transfer.
For more information, see Response body attributes for transfers.
If an error occurs, see REST API error handling.
Examples
The following example returns a default set of data in the response
The following URL is used with the HTTP GET method:https://localhost:9443/ibmmq/ibmmq/rest/v1/admin/mft/transfer/414d512050524d465444454d4f312020f5189c5921f22302The following JSON response is returned:
{ "transfer": [{ "id": "414D512050524D465444454D4F312020F5189C5921F22302", "destinationAgent": {"name": "AGENT.TRI.BANK"}, "originator": { "host": "192.168.99.1", "userId": "johndoe" }, "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" } }] }The following example lists all the attributes for the specified transfer ID, on the coordination queue manager. The following URL is used with the HTTP GET method:
https://localhost:9443//ibmmq/rest/v1/admin/mft/transfer/414d512050524d465444454d4f312020c5c6705924cf9e02?attributes=*The following JSON response is returned:
{ "transfer": [{ "id": "414D512050524D465444454D4F312020C5C6705924CF9E02", "sourceAgent": { "qmgrName": "PRMFTDEMO1", "name": "AGENT2" }, "destinationAgent": { "qmgrName": "PRMFTDEMO1", "name": "AGENT1" }, "originator": { "host": "192.168.56.1", "userId": "johndoe", "mqmdUserId": "johndoe" }, "transferSet": { "item": [ { "source": { "file": { "lastModified": "2017-07-13T11:25:20.780Z", "size":179367055 , "path": "D:/ProgramFiles/WASlibertyprofile.zip" }, "checksum": { "method": "md5", "value": "5F0ED36FBD3C0E1F4083B12B34A318D3" }, "disposition": "leave", "type": "file" }, "destination": { "file": { "lastModified": "2017-07-28T08:00:12.065Z", "size": 179367055, "path": "C:/Users/IBMADMIN/Desktop/demo.zip" }, "checksum": { "method": "md5", "value": "5F0ED36FBD3C0E1F4083B12B34A318D3" }, "actionIfExists": "overwrite", "type": "file" }, “status”: { "description": "BFGRP0032I: The file transfer request has successfully completed." “state”:”successful” } "mode": "binary" }], "bytesSent": 0, "startTime": "2017-07-28T08:00:10.599Z" }, “job”: { “name”:”job1” }, “userProperties”:{ }, "status": { "lastStatusUpdate": "2017-07-28T08:00:10.599Z", “state”:”successful”, "description": "BFGRP0032I: The file transfer request has successfully completed." }, "statistics": { "startTime": "2017-07-28T08:00:09.897Z", "retryCount": 0, “endTime”: "2017-07-28T08:00:10.599Z", “numberOfFilesSuccesses”:1, "numberOfFileFailures": 0, "numberOfFileWarnings": 0, “numberOfFiles”:1 } }] }