Example: Deleting a file space

You can delete an existing file space by submitting an HTTP request to the WebSphere® MQ Managed File Transfer Web Gateway. The file space is not deleted if a file transfer is in progress into the file space.

About this task

To delete a file space, you must have the appropriate security role associated with your user account. Users associated with the WebSphere MQ Managed File Transfer roles wmqfte-admin and wmqfte-filespace-delete can delete file spaces. 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 delete a file space by using the administrative console. For more information, see Web Gateway administrative console.

Successful deletion of a file space

About this task

In this example, the server hosting the WebSphere MQ Managed File Transfer Web Gateway is example.com. The file space belongs to the user richard. There are no file transfers currently in progress into the file space richard. You can find out the number of transfers in progress to the file spaces in your Web Gateway environment by listing the file spaces. For more information, see Example: Listing all file spaces.

Procedure

  1. To delete the file space richard, create an HTTP request with the following format:
    DELETE HTTP/1.1 /admin/filespace/richard
    Host: example.com
    User-Agent: mozilla
    
  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
    
    The file space richard and any files it contains are deleted. The deletion of a file space is logged to the application server event log. For more information, see File space administration logging format.

Possible problems when deleting a file space

About this task

In this example, the server hosting the WebSphere MQ Managed File Transfer Web Gateway is example.com. The file space belongs to the user suzanne. There are two transfers in progress into the file space suzanne. You can find out the number of transfers in progress to the file spaces in your Web Gateway environment by listing the file spaces. For more information, see Example: Listing all file spaces.

Procedure

  1. To delete the file space suzanne, create an HTTP request with the following format:
    DELETE HTTP/1.1 /admin/filespace/suzanne
    Host: example.com
    User-Agent: mozilla
    
  2. Submit the request to the Web Gateway. This request fails because there are transfers in progress into the file space. You therefore receive the following response from the Web Gateway:
    HTTP/1.1 409 Conflict
    Server: WAS/7.0
    
    BFGWI0060E: The file space 'suzanne' is currently in use, and cannot be deleted.
    You must wait for the transfers to the file space to complete before you can delete the file space.

    To identify the cause of any other errors you might receive, see Troubleshooting the Web Gateway.