Example: Listing all files in a file space

You can list the contents of a file space by submitting an HTTP request to the WebSphere® MQ File Transfer Edition Web Gateway. The Web Gateway returns a response in XML or JSON format that lists the contents of a file space. You are authorized to list the contents of a file space if you are the owner of the file space or you have the security role wmqfte-admin.

About this task

A successful request returns an HTTP status code of 200 and a payload that lists the first 100 files in the file space. This response is returned in either XML (the default) or JSON format dependent on the 'Accept' header specified in the request.

The following steps describe how to submit a request. In this example, the server hosting the WebSphere MQ File Transfer Edition Web Gateway is example.com and the HTTP request is submitted using a web browser which identifies itself as mozilla. The name of the file space to list is 'john' and it contains two files. The header 'Accept: application/xml' specifies that the Web Gateway should return the results in XML format. For more information about the formats that are returned by a file space list request, see File space query response formats.

Procedure

  1. Create an HTTP request with the following format:
    GET HTTP/1.1 /filespace/john
    Host: example.com
    User-Agent: mozilla
    Accept: application/xml
  2. Submit the request to the Web Gateway.

Results

The Web Gateway returns an HTTP response with the following format:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fileSpaces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:noNamespaceSchemaLocation="WebFileSpaceList.xsd">
  <fileSpace size="2" name="john">
    <file fileLink="/wmqfte/filespace/john/414d51205745422e4654452020202020c1a1a34b03720120/filename"
        fsLocation="/var/ibm/WMQFTE/web/fte/transfer/414d51205745422e4654452020202020c1a1a34b03720120/file-0"
        transferLink="/wmqfte/transfer/414d51205745422e4654452020202020c1a1a34b03720120"
        transferID="414d51205745422e4654452020202020c1a1a34b03720120">
      <attribute-values mode="text" created="2010-08-26T11:45:02.000Z" size="259354303" 
                        checksum-value="98611a272a27d373f92d73a08cf0d4f4" checksum-method="MD5"/>
    </file>
    <file fileLink="/wmqfte/filespace/john/414d51205745422e4654452020202020c1a1a34b06520120/filename"
        fsLocation="/var/ibm/WMQFTE/web/fte/transfer/414d51205745422e4654452020202020c1a1a34b06520120/file-0"
        transferLink="/wmqfte/transfer/414d51205745422e4654452020202020c1a1a34b06520120"
        transferID="414d51205745422e4654452020202020c1a1a34b06520120">
      <attribute-values mode="text" created="2010-08-26T12:15:02.260Z" size="259554303" 
                        checksum-value="98611a272a27d37bf22d73a08cf0d4f4" checksum-method="MD5"/>
    </file>
  </fileSpace>
</fileSpaces>

Task Task

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/web_filespace_list.htm