Transfer query response formats
When you request the status of a transfer or multiple transfers from the WebSphere® MQ File Transfer Edition Web Gateway the response is returned in either JSON or XML format.
XML
The following example shows the format of a simple transfer query XML response.
<transfers xsi:noNamespaceSchemaLocation="WebTransferStatus.xsd">
<transfer end-time="2010-08-26T12:00:00.260Z"
start-time="2010-08-26T11:55:00.076Z"
status="Success"
id="414d51205745422e4654452020202020c1a1a34b03720120">
<source>
<agent qmgr="QM_JUPITER" name="AGENT_CALLISTO"/>
<metadata>
<key value="FIRST_JOB" name="com.ibm.wmqfte.JobName"/>
<key value="AGENT_CALLISTO" name="com.ibm.wmqfte.SourceAgent"/>
<key value="AGENT_EUROPA" name="com.ibm.wmqfte.DestinationAgent"/>
<key value="serenity.example.com."
name="com.ibm.wmqfte.OriginatingHost"/>
<key value="user1" name="com.ibm.wmqfte.MqmdUser"/>
<key value="414d51205745422e4654452020202020c1a1a34b03720120"
name="com.ibm.wmqfte.TransferId"/>
<key value="user1" name="com.ibm.wmqfte.OriginatingUser"/>
</metadata>
</source>
<destination>
<agent qmgr="QM_JUPITER" name="AGENT_EUROPA"/>
<metadata>
<key value="FIRST_JOB" name="com.ibm.wmqfte.JobName"/>
<key value="AGENT_CALLISTO" name="com.ibm.wmqfte.SourceAgent"/>
<key value="AGENT_EUROPA" name="com.ibm.wmqfte.DestinationAgent"/>
<key value="user1" name="com.ibm.wmqfte.MqmdUser"/>
<key value="serenity.example.com."
name="com.ibm.wmqfte.OriginatingHost"/>
<key value="user1" name="com.ibm.wmqfte.OriginatingUser"/>
<key value="414d51205745422e4654452020202020c1a1a34b03720120"
name="com.ibm.wmqfte.TransferId"/>
</metadata>
</destination>
<stats retry-count="0" file-warnings="0" file-failures="0"
bytes-transferred="259354303"/>
<result text="BFGRP0032I: The file transfer request has successfully completed."
code="0"/>
<transfer-set>
<file result-code="0" mode="text">
<source-file name="/home/user1/output.zip">
<attribute-values last-modified="2010-08-19T14:16:57.000Z"
file-size="259354303" disposition="leave"
checksum-value="98611a272a27d373f92d73a08cf0d4f4"
checksum-method="MD5"/>
</source-file>
<destination-file name="/tmp/output.zip">
<attribute-values last-modified="2010-08-26T12:00:00.000Z"
file-size="259354303" exists-action="error"
checksum-value="98611a272a27d373f92d73a08cf0d4f4"
checksum-method="MD5"/>
</destination-file>
</file>
</transfer-set>
</transfer>
</transfers>
JSON
The following example shows the format of a simple transfer query JSON response.
{
"transfers" : {
"transfer" : {
"end-time" : "2010-08-26T12:00:00.260Z",
"status" : "Success",
"start-time" : "2010-08-26T11:55:00.076Z",
"id" : "414d51205745422e4654452020202020c1a1a34b03720120",
"result" : {
"code" : "0",
"text" : "BFGRP0032I: The file transfer request has successfully completed."
}
,
"destination" : {
"metadata" : {
"key" : [
{
"name" : "com.ibm.wmqfte.JobName",
"value" : "FIRST_JOB"
}
,
{
"name" : "com.ibm.wmqfte.SourceAgent",
"value" : "AGENT_CALLISTO"
}
,
{
"name" : "com.ibm.wmqfte.DestinationAgent",
"value" : "AGENT_EUROPA"
}
,
{
"name" : "com.ibm.wmqfte.MqmdUser",
"value" : "user1"
}
,
{
"name" : "com.ibm.wmqfte.OriginatingHost",
"value" : "serenity.example.com."
}
,
{
"name" : "com.ibm.wmqfte.OriginatingUser",
"value" : "user1"
}
,
{
"name" : "com.ibm.wmqfte.TransferId",
"value" : "414d51205745422e4654452020202020c1a1a34b03720120"
}
]
}
,
"agent" : {
"name" : "AGENT_EUROPA",
"qmgr" : "QM_JUPITER"
}
}
,
"stats" : {
"bytes-transferred" : "259354303",
"retry-count" : "0",
"file-warnings" : "0",
"file-failures" : "0"
}
,
"transfer-set" : {
"file" : {
"result-code" : "0",
"mode" : "text",
"source-file" : {
"name" : "\/home\/user1\/output.zip",
"attribute-values" : {
"last-modified" : "2010-08-19T14:16:57.000Z",
"checksum-value" : "98611a272a27d373f92d73a08cf0d4f4",
"checksum-method" : "MD5",
"file-size" : "259354303",
"disposition" : "leave"
}
}
,
"destination-file" : {
"name" : "\/tmp\/output.zip",
"attribute-values" : {
"exists-action" : "error",
"last-modified" : "2010-08-26T12:00:00.000Z",
"checksum-value" : "98611a272a27d373f92d73a08cf0d4f4",
"checksum-method" : "MD5",
"file-size" : "259354303"
}
}
}
}
,
"source" : {
"metadata" : {
"key" : [
{
"name" : "com.ibm.wmqfte.JobName",
"value" : "FIRST_JOB"
}
,
{
"name" : "com.ibm.wmqfte.SourceAgent",
"value" : "AGENT_CALLISTO"
}
,
{
"name" : "com.ibm.wmqfte.DestinationAgent",
"value" : "AGENT_EUROPA"
}
,
{
"name" : "com.ibm.wmqfte.OriginatingHost",
"value" : "serenity,example.com."
}
,
{
"name" : "com.ibm.wmqfte.MqmdUser",
"value" : "user1"
}
,
{
"name" : "com.ibm.wmqfte.TransferId",
"value" : "414d51205745422e4654452020202020c1a1a34b03720120"
}
,
{
"name" : "com.ibm.wmqfte.OriginatingUser",
"value" : "user1"
}
]
}
,
"agent" : {
"name" : "AGENT_CALLISTO",
"qmgr" : "QM_JUPITER"
}
}
}
}
}
Understanding the transfer query response
The names of the elements and attributes in the XML response format and the names of the objects in the JSON response format are the same. These elements, attributes, and objects are described in the following list:
- transfers
- Group containing transfer information for all of the transfers that match the query.
- transfer
- Group containing the information for a single transfer.
Attribute or object Description end-time The time that the transfer finished in Coordinated Universal Time. start-time The time that the transfer started in Coordinated Universal Time. status The status of the transfer. id The unique hexadecimal ID of the transfer. - source
- Group containing information about the source of the transfer.
- destination
- Group containing information about the destination of the transfer.
- agent
- Specifies the name and queue manager of an agent. When used within
the element or object source this element or
object specifies the source agent information; when used within the
element or object destination this element or
object specifies the destination agent information.
Attribute or object Description name The name of the agent. qmgr The queue manager that the agent connects to. - metadata
- Group containing transfer information in name-value pairs.
- key
- Specifies a name-value pair.
Attribute or object Description name The identifier of a piece of metadata. value The value of a piece of metadata. - stats
- Specifies information about the whole transfer.
Attribute or object Description retry-count The number of times that the transfer went into recovery and was tried again by the agent. file-warnings The number of files in the transfer set that generated warnings while being transferred, but otherwise transferred successfully. file-failures The number of files in the transfer set that failed to transfer successfully. bytes-transferred The number of bytes transferred in this transfer. - result
- Specifies the return code and supplementary information of the
transfer.
Attribute or object Description code The return code of the transfer. For more information, see Return codes for WebSphere MQ File Transfer Edition. text The supplementary information of a transfer. - transfer-set
- Group containing information about the files that were transferred.
- file
- Group containing information about one file in the transfer.
Attribute or object Description result-code The return code of the transfer of the individual file. For more information, see Return codes for files in a transfer. mode The transfer mode. Valid values are: - text
- binary
- source-file
- Specifies the name of the source file.
Attribute or object Description name The name of the file on the source system. - destination-file
- Specifies the name of the destination file.
Attribute or object Description name The name of the file on the destination system. - attribute-values
- Specifies additional information about the file being transferred.
When used within the element or object source-file this
element or object specifies information about the file on the source
system; when used within the element or object destination-file this
element or object specifies information about the file on the destination
system.
Attribute or object Description file-size The size of the file. exists-action Specifies what to do if the destination file already exists. Valid values are: - error
- overwrite
This attribute is valid only when the attribute-values element or object is used within the destination-file element or object.
disposition Specifies what to do with the source file after the transfer is complete. Valid values are: - delete
- leave
This attribute is valid only when the attribute-values element or object is used within the source-file element or object.
checksum-method The method used to produce a checksum value of this file. checksum-value The checksum value of the file. last-modified The time when the file was last modified, in Coordinated Universal Time.