Uniform Resource Identifier syntax for using the Web Gateway

A WebSphere® MQ Managed File Transfer Uniform Resource Identifier (URI) is distinguished from other IBM® WebSphere MQ URIs by the context root specified at deploy time. The recommended context root is /wmqfte.

WebSphere MQ Managed File Transfer resources are distinguished from each other by their types. A resource is addressed by its resource type and an identifying token.

WMQFTE Uniform Resource Identifier syntax diagram

Read syntax diagramSkip visual syntax diagram (connection_name) / fte / file/agent/ (agent_name)@ (agent_queue_manager_name)/ (directory_path)transfer/(transfer_ID)/?accept= (format)? (transfer_query)& (transfer_query)& (result_format)&accept= (format)filespace/ (file_space_name)?accept= (format)/ (transfer_ID)/ (file_name)? (file_space_query)& (file_space_query)&accept= (format)

Parameters

(connection_name)
Required. The host name and, optionally, the port of the server hosting the WebSphere MQ Managed File Transfer Web Gateway. Not case-sensitive.

fte
Required. Prefix indicating that the URI is addressed to the WebSphere MQ Managed File Transfer Web Gateway. Case-sensitive.

file
Optional. Indicates that you are addressing a file resource. Case-sensitive.

agent
Optional. Indicates that the type of destination is an agent. Case-sensitive.

(agent_name)
Optional. The name of the agent to send the file to. Not case-sensitive, agent names are converted to uppercase.

(agent_queue_manager_name)
Required. The name of the queue manager used by the agent to send the file to. Case-sensitive.

(directory_path)
Optional. The path of the directory on the destination agent file system that you are addressing. The directory path must contain only unreserved or escaped characters. Case-sensitive.

If the directory_path part of the URI begins with a forward slash (/) character, in addition to the forward slash character used as a path separator, the directory_path is resolved as an absolute path. If you want to upload a file to an absolute path, you must encode the forward slash as the string %2F so that it is not removed. If you do not want Web Gateway uploads to be able to write to an absolute path on the destination agent's file system, you must configure user or agent sandboxing on the destination agent.

If the directory_path does not begin with an additional forward slash character, the directory path is resolved relative to the transfer root directory of the destination agent.

transfer
Optional. Indicates that you are addressing a transfer resource. Case-sensitive.

(transfer_ID)
Optional. The transfer ID is the unique 48 character hexadecimal string that identifies the transfer. Not case-sensitive.

accept=(format)
Optional. Specifies the format of the response that the Web Gateway returns. The value of format is one of the following values:
  • JSON - Specifies that the response is in JavaScript Object Notation.
  • XML - Specifies that the response is in XML format. This is the default.

Not case-sensitive. You can also set the format of the response using the Accept: header in the request. The format that is set using the URI takes priority over the format set using the Accept: header.

(transfer_query)
Optional. Requests information about all transfers that match the query, from the WebSphere MQ Managed File Transfer Web Gateway. You can specify multiple queries, separated by the ampersand character (&), but only one of each type of query.
The query can be one of the following types:
  • srcagent=(agent_name)
  • destagent=(agent_name)
  • agent=(agent_name)
  • status=(status_value)
  • metadata=(metadata_info)
  • endafter=(date)
  • endbefore=(date)
  • startafter=(date)
  • startbefore=(date)
  • srcfile=(file_path)
  • destfile=(file_path)
  • jobname=(job_name)
  • returncode=(return_code)

For more information about these queries, see Query parameters.

filespace
Optional. Indicates that you are addressing a file space resource. Case-sensitive.

(file_space_name)
Optional. The name of the file space you are addressing. This is the name of the user associated with the file space. Case-sensitive.

(file_name)
Optional. The name of the file to download. If a file name has a space character in the name this character must be represented by the string %20 in the URI. Case-sensitive.

(file_space_query)
Optional. Requests information about all files in the file space that match the query, from the WebSphere MQ Managed File Transfer Web Gateway. You can specify multiple queries, separated by the ampersand character (&), but only one of each type of query.
The query can be one of the following types:
  • endafter=(date)
  • endbefore=(date)
  • startafter=(date)
  • startbefore=(date)

For more information about these queries, see Query parameters.

(result_format)
  • sortby=(sort_by_values)
  • sort=(sort_values)
  • start=(start_value)
  • count=(count_value)

For more information about these result formats, see Result format parameters.

Query parameters

srcagent=(agent_name)

Requests information about transfers that have agent_name as the source agent. The value of agent_name is not case-sensitive, agent names are converted to uppercase.

If you use the srcagent query you cannot use the agent query.

destagent=(agent_name)

Requests information about transfers that have agent_name as the destination agent. The value of agent_name is not case-sensitive, agent names are converted to uppercase.

If you use the destagent query you cannot use the agent query.

agent=(agent_name)

Requests information about transfers that have agent_name as either the source agent, the destination agent or both. The value of agent_name is not case-sensitive, agent names are converted to uppercase.

If you use the agent query you cannot use the srcagent or destagent query.

status=(status_value)
Requests information about transfers that have status_value as their transfer status. The value of status_value is case-sensitive and is a comma-separated list enclosed in brackets ([ ]). The comma-separated list contains one or many of the following values:
  • submitted
  • started
  • success
  • partial success
  • cancelled
  • failure

metadata=(metadata_info)

Requests information about transfers that have metadata_info as part of their metadata.

The value of metadata_info is in one of the following formats:
name
The name part of a metadata name-value pair. If the transfer has metadata with this name and any value the transfer matches the query.
name=value
A metadata name-value pair. If the transfer has metadata with this name and this value the transfer matches the query.

endafter=(date)
Requests information about transfers that completed after the date given by the date value. The value of date is in one of the following formats:
yyyy-MM-ddTHH:mm:ss
The date and time. For example, 2010-08-26T12:25:40.
yyyy-MM-ddTHH:mm
The date and time, without seconds. For example, 2010-08-26T12:25, which is evaluated as 2010-08-26T12:25:00.
yyyy-MM-ddTHH
The date and time, without seconds and minutes. For example, 2010-08-26T12, which is evaluated as 2010-08-26T12:00:00.
yyyy-MM-dd
The date. For example, 2010-08-26, which is evaluated as 2010-08-26T00:00:00.
yyyy-MM
The date without days. For example, 2010-08, which is evaluated as 2010-07-31T23:59:59.
yyyy
The year. For example, 2010, which is evaluated as 2009-12-31T23:59:59.
The date and time are in Coordinated Universal Time (UTC).

You can specify a date in a different timezone by adding a four-digit number, prefaced by a plus (+) sign or minus (-) sign, to the end of the date to indicate the difference in time between UTC and the timezone you are using. For example, to specify 7pm on the 26th August 2010 in the timezone for San Francisco, Pacific Daylight Time, which is 7 hours behind UTC, use the following value: 2010-08-26T19:00-0700.

endbefore=(date)
Requests information about transfers that completed before the date given by the date value. The value of date is in one of the following formats:
yyyy-MM-ddTHH:mm:ss
The date and time. For example, 2010-08-26T12:25:40.
yyyy-MM-ddTHH:mm
The date and time, without seconds. For example, 2010-08-26T12:25, which is evaluated as 2010-08-26T12:25:00.
yyyy-MM-ddTHH
The date and time, without seconds and minutes. For example, 2010-08-26T12, which is evaluated as 2010-08-26T12:00:00.
yyyy-MM-dd
The date. For example, 2010-08-26, which is evaluated as 2010-08-26T00:00:00.
yyyy-MM
The date without days. For example, 2010-08, which is evaluated as 2010-07-31T23:59:59.
yyyy
The year. For example, 2010, which is evaluated as 2009-12-31T23:59:59.
The date and time are in Coordinated Universal Time (UTC).

You can specify a date in a different timezone by adding a four-digit number, prefaced by a plus (+) sign or minus (-) sign, to the end of the date to indicate the difference in time between UTC and the timezone you are using. For example, to specify 7pm on the 26th August 2010 in the timezone for San Francisco, Pacific Daylight Time, which is 7 hours behind UTC, use the following value: 2010-08-26T19:00-0700.

startafter=(date)
Requests information about transfers that started after the date given by the date value. The value of date is in one of the following formats:
yyyy-MM-ddTHH:mm:ss
The date and time. For example, 2010-08-26T12:25:40.
yyyy-MM-ddTHH:mm
The date and time, without seconds. For example, 2010-08-26T12:25, which is evaluated as 2010-08-26T12:25:00.
yyyy-MM-ddTHH
The date and time, without seconds and minutes. For example, 2010-08-26T12, which is evaluated as 2010-08-26T12:00:00.
yyyy-MM-dd
The date. For example, 2010-08-26, which is evaluated as 2010-08-26T00:00:00.
yyyy-MM
The date without days. For example, 2010-08, which is evaluated as 2010-07-31T23:59:59.
yyyy
The year. For example, 2010, which is evaluated as 2009-12-31T23:59:59.
The date and time are in Coordinated Universal Time (UTC).

You can specify a date in a different timezone by adding a four-digit number, prefaced by a plus (+) sign or minus (-) sign, to the end of the date to indicate the difference in time between UTC and the timezone you are using. For example, to specify 7pm on the 26th August 2010 in the timezone for San Francisco, Pacific Daylight Time, which is 7 hours behind UTC, use the following value: 2010-08-26T19:00-0700.

startbefore=(date)
Requests information about transfers that started before the date given by the date value. The value of date is in one of the following formats:
yyyy-MM-ddTHH:mm:ss
The date and time. For example, 2010-08-26T12:25:40.
yyyy-MM-ddTHH:mm
The date and time, without seconds. For example, 2010-08-26T12:25, which is evaluated as 2010-08-26T12:25:00.
yyyy-MM-ddTHH
The date and time, without seconds and minutes. For example, 2010-08-26T12, which is evaluated as 2010-08-26T12:00:00.
yyyy-MM-dd
The date. For example, 2010-08-26, which is evaluated as 2010-08-26T00:00:00.
yyyy-MM
The date without days. For example, 2010-08, which is evaluated as 2010-07-31T23:59:59.
yyyy
The year. For example, 2010, which is evaluated as 2009-12-31T23:59:59.
The date and time are in Coordinated Universal Time (UTC).

You can specify a date in a different timezone by adding Z to the end of the date in any of the listed formats. The value of Z is a four-digit number indicating the difference in time between UTC and the timezone you are using. For example, to specify 7pm on the 26th August 2010 in the timezone for San Francisco, Pacific Daylight Time, which is 7 hours behind UTC, use the following value: 2010-08-26T19:00-0700.

srcfile=(file_path)

Requests information about transfers that have file_path as the full source file path. Case-sensitive.

If a file path contains a space character, this character must be represented by the string %20 in the query.

destfile=(file_path)

Requests information about transfers that have file_path as the full destination file path. Case-sensitive.

If a file path contains a space character, this character must be represented by the string %20 in the query.

jobname=(job_name)
Requests information about transfers that have job_name as their job name. Job name is case-sensitive.

returncode=(return_code)
Requests information about transfers that have return_code as their return code. The return code of a transfer is a positive integer. For a list of possible return codes, see Return codes for WebSphere MQ Managed File Transfer.

transferid=(transfer_ID)
Optional. The transfer ID is the unique 48 character hexadecimal string that identifies the transfer that transferred the file to the file space. Not case-sensitive.

Result format parameters

sortby=(sort_by_values)
Specifies which value to sort the results by. For a transfer query the value of sort_by_value is one of the following values:
  • srcagent
  • destagent
  • status
  • startdate
  • enddate
  • jobname
By default the results are sorted by startdate.

sort=(sort_value)
Specifies whether the results that are returned are sorted in ascending or descending order of the value specified for sortby query. The value of sort_value is one of the following values:
  • ascending
  • descending

You can only specify the sort query if you have specified the sortby query.

start=(start_value)
Specifies the index of the first result to return. The value of start_value is 0 or a positive integer. The first result found by the Web Gateway has an index of 0.

count=(count_value)

Specifies the number of results to return. The value of count_value is a positive integer that is less than 100. You can only return 100 results at a time.

Examples

For example, to use a POST request to transfer a file resource to a destination agent called ACCOUNTS, which uses an agent queue manager called DEPT1, use the following URI:

http://example.org/wmqfte/file/agent/ACCOUNTS@DEPT1/

In this example:
  • http://example.org is the host system.
  • /wmqfte indicates the URI is a WebSphere MQ Managed File Transfer URI.
  • /file indicates that the resource being addressed is a file resource.
  • /agent/ACCOUNTS@DEPT1/ is the identifying token. This identifying token is a combination of the destination type, in this case agent, a destination agent name, in this case ACCOUNTS, and the destination agent queue manager name prefixed by an @ sign, in this case @DEPT1.

For example, to address a transfer resource:

http://example.org/wmqfte/transfer/414d5120514d5f4c4d343336303920201159c54820027102

In this example:
  • http://example.org is the host system.
  • /wmqfte indicates the URI is a WebSphere MQ Managed File Transfer URI.
  • /transfer indicates that the resource being addressed is a transfer resource.
  • /414d5120514d5f4c4d343336303920201159c54820027102 is the identifying token, which in this case is the hexadecimal transfer ID.