Manage configuration files, templates and web resources using WebDAV

Funnelback provides a WebDAV interface that enables administrators to manage their Freemarker templates, web resources and a set of search package and data source (collection) configuration files using a WebDAV client.

This allows a user to:

  • edit templates, web-resources and configuration files using a locally installed text editor application.

  • create, upload and download templates, web resources and configuration files directly from a desktop computer.

Accessing the Funnelback resources using a WebDAV client

Generic instructions

A WebDAV client can access Funnelback resources using a non-expiring user token. See: Instructions on how to generate a non-expiring user application token.

The following can be entered into a supported WebDAV client:

The tokenAsHTTPBasicAuth username and password provided via the API when generating an non-expiring user API access token:

  • Username: <tokenAsHTTPBasicAuth-username>

  • Password: <tokenAsHTTPBasicAuth-password>

This will present a directory hierarchy including data sources and search packages (collections), the results pages (profiles) they contain and the two views these results pages include (live and preview).

You can access a subset of collection level configuration files in the conf directory, log files in the 'log' directory and a list of available results pages under profiles directory

Example:

  • Data source and search package configuration files

  • Data source and search package log files

  • Results page template files and web resources

Within each results page view directory two directories are available, 'templates' and 'web-resources'.

The templates directory is a single flat directory which may contain only *.ftl template files. No other file formats or extensions are permitted.

The web-resources directory may contain any file format and nested directories as described in the web resources folder documentation

Access Funnelback with Windows File Explorer

Windows File Explorer’s WebDAV support is a bit buggy and sometimes will fail to connect. Retrying the connection sometimes solves the problem. Setting the following registry key: ServerNotFoundCacheLifeTimeInSec to 0 seems to resolve this issue when the problem occurs. See: https://docs.microsoft.com/en-us/iis/publish/using-webdav/using-the-webdav-redirector#webdav-redirector-registry-settings for information on the registry key and warnings about editing of registry keys. Failing this, we recommend using the Cyberduck client which has connection instructions below.
  1. Right click on 'computer' in the start menu and select map network drive.

  2. Enter the path to the WebDAV endpoint into the network location field: https://<FUNNELBACK-SERVER>:<FUNNELBACK-ADMIN-HTTPS-PORT>/admin-api/file-management/v1/webdav/ e.g. https://search.example.com:8443/admin-api/file-management/v1/webdav/

  3. (optional) check the reconnect on logon option if you wish the drive to be auto-mounted on boot.

  4. Click connect.

  5. Enter the token HTTP Basic Authentication details when prompted for a username and password (optional: select the save password option).

  6. You should be able to then browse the files and folders located on the Funnelback server via Windows explorer.

If you attempt to save a file in a read only folder (such as the live view of a results page) Windows will return an error message saying that the save failed.

Access Funnelback with MacOS Finder

  1. Open Finder.

  2. Select go  connect to server or press ⌘ Command+K.

  3. Enter the path to the WebDAV endpoint into the server address field: https://<FUNNELBACK-SERVER>:<FUNNELBACK-ADMIN-HTTPS-PORT>/admin-api/file-management/v1/webdav/ e.g. *https://search.example.com:8443/admin-api/file-management/v1/webdav/+

  4. (optional) add to your favourites by clicking the + button.

  5. Click connect.

  6. Enter the token HTTP Basic Authentication details when prompted for a username and password (optional: select the save password option).

  7. You should be able to then browse the files and folders located on the Funnelback server via your Finder window.

Finder will not let you create any new files in the live folders but will allow you to open the files and edit them. If you try to save a file that is located in the live folder (which is read only) the operation will not succeed and you will not receive any feedback to indicate that it has failed. This means that it will look like the file has saved normally but you will silently lose the changes.

Access Funnelback with Cyberduck

These instructions apply to Cyberduck on Windows and MacOS.

Cyberduck can be downloaded from https://cyberduck.io/

Windows users can skip straight to step 5.

  1. Open Cyberduck

  2. Create a new bookmark by selecting bookmark  new bookmark.

  3. The bookmark configuration screen opens. Select WebDAV (HTTPS) from the dropdown menu.

  4. Enter the following details into the bookmark configuration screen:

    • Server: <FUNNELBACK-SERVER> (e.g. search.example.com)

    • Port: <FUNNELBACK-ADMIN-HTTPS-PORT> (e.g. 8443)

    • Username: The tokenAsHTTPBasicAuth username value.

    • Path: /admin-api/file-management/v1/webdav/

  5. Save the bookmark

  6. Double click on the bookmark to connect to the server. When prompted, enter the tokenAsHTTPBasicAuth password value. On Windows you will be prompted for a password on your first connection attempt. Ensure you check the save password option before continuing. Mac users won’t be prompted (you have already saved the password in your keychain).

  7. The file window will display, showing collections at the root. Expanding this will show all the collections that you have access to, with sub-folders for each profile, then live and offline views, and then templates and web resources.

  8. Navigate to a collection’s templates folder (in a preview folder). Right-click on the simple.ftl then select edit with from the popup menu and choose a suitable text editor.

  9. The file will open in your text editor. You can make changes and save the file in your text editor and the file on the Funnelback server will be updated. Note: when you save a file this way it overwrites the file on the server without creating an automatic backup of the file. Changes will be reflected when viewing the file on the Funnelback server. If you wish to publish the file you will need to do this from the admin interface.

  10. Navigate to a web-resources folder, again beneath a preview profile. Create a new folder inside this (select new folder from the menu).

  11. Navigate into this folder and add an image file to it.

If you log in to the search dashboard you should see the same files existing on the preview profile of the collection you’ve been modifying via WebDAV.

Publishing

WebDAV clients do not support the concept of publication, so after modifying the preview content via WebDAV, please use the search dashboard to publish changes, or directly access the publication API endpoints which are documented within Funnelback’s API UI.

See also