Example: Modifying file space configuration

You can modify an existing file space by submitting an HTTP request to the WebSphere® MQ File Transfer Edition Web Gateway. You can change the file space quota and the list of users who can access the file space if you have the necessary security role associated with your user account.

About this task

The WebSphere MQ File Transfer Edition roles wmqfte-admin and wmqfte-filespace-modify can change both the file space quota and the list of users who can access the file space. For more information about securing the Web Gateway, see User roles for the Web Gateway.

If you have the security role wmqfte-admin, you can also modify a file space by using the administrative console. For more information, see Web Gateway administrative console.

If you change a file space quota while file transfers to the file space are in progress, the transfers might succeed even if they cause the new quota value to be exceeded. Any file transfers that are started after the quota has been changed are successful only if they do not cause the new quota value to be exceeded.

The following examples show how to change the quota of the file space, add users to the list of people authorized to access the file space, and remove users from the list of people who are not authorized to access the file space. In this example, the server hosting the Web Gateway is example.com. The name of the file space, which has already been created, is finlay. The name of the file space is denoted by the final part of the URI used by the POST request.

For more information about the format of the XML request to modify a file space, see File space create or alter request format.

Procedure

  1. If you want to add to or remove from the existing lists of users, use the add action or remove action on the authorized and unauthorized elements. For example, the following request adds two users to the authorized list and removes one user from the unauthorized user:
    POST HTTP/1.1 /admin/filespace/finlay
    Host: example.com
    User-Agent: mozilla
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <filespaces>
      <filespace>
        <quota bytes="100000000"/>
        <writers>
          <authorized action="add">
            <agent-user>jonathan</agent-user>
            <agent-user>lauren</agent-user>
          </authorized>
          <unauthorized action="remove">
            <agent-user>marley</agent-user>
          </unauthorized>
        </writers>
      </filespace>
    </filespaces>
    If you want to overwrite the current lists of users, rather than add to or remove from the existing lists, use the overwrite action on the authorized and unauthorized elements. For example, the following request overwrites the current authorized list:
    POST HTTP/1.1 /admin/filespace/finlay
    Host: example.org
    User-Agent: mozilla
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <filespaces>
      <filespace>
        <writers>
          <authorized action="overwrite">
            <agent-user>fte.*</agent-user>
            <agent-user>ella</agent-user>
            <agent-user>jonathan</agent-user>
            <agent-user>lauren</agent-user>
          </authorized>
        </writers>
      </filespace>
    </filespaces>

    You can use Java™ regular expressions to match multiple user names. For example, one of the agent-user entries in the example above has the value fte.*, which will match any user with a name that starts with fte.

  2. Submit the request to the Web Gateway. The Web Gateway returns an HTTP response with the following format:
    HTTP/1.1 200 OK
    Server: WAS/7.0
    Content-Length: 0

    The request to modify a file space is logged to the application server event log. For more information, see File space administration logging format.

    An invalid request returns an HTTP error code and a WMQFTE error message. To identify the cause of the error, see Troubleshooting the Web Gateway.

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_modify.htm