Example: Listing a specific subset of the files in a file space
You can query the contents of a file space by submitting an HTTP request containing a query to the WebSphere® MQ Managed File Transfer Web Gateway. The Web Gateway returns a response in XML or JSON format describing only those files in the filespace that match the query.
About this task
You can append a query to your HTTP request that requests information about the files in a file space that match the query. You can query files by their associated details, including the originating user, the transfer start time, the transfer end time, and the transfer ID of the transfer that sent the file to the file space. You can specify the number of results to return.
A successful request returns an HTTP status code of 200 and a payload that describes the files that match the query. You can request that the details of the files are returned in either XML or JSON format. You can write a web application to parse the content of the response and display it in an appropriate format to a web user.
accept=json
query. The query requests a list of files that
fulfill the following criteria:- The file are in the file space
james
. - The files were sent to the file space by the user
bob
, specified by theoriginatoruser=bob
query. - The files were sent to the file space after 13:00 (UTC) on 26
August 2010, specified by the
startafter=2010-08-26T13:00
query.