/api/v1/hotfolder
A drop-only ingest share at /api/v1/hotfolder, distinct from the read/write /api/v1/WebDAV mount above. Where /WebDAV maps WebDAV operations onto collections live, the hotfolder is a real on-disk staging directory (the API service's WebDAVHotfolderPath) served by the Go standard-library webdav.Handler. You drop files in; a background crawler imports each one into the matching collection and deletes it. You do not read a collection's records back through it.
Layout. The on-disk directory holds one sub-directory per collection, named by the collection UUID, created automatically for every collection that accepts objects (objects_allowed). A file is therefore dropped at /api/v1/hotfolder/{collectionUuid}/<...>/<filename>. A file placed at the top level (no collection UUID) is ignored.
Ingestion. A single crawler walks the directory and imports a file only once it has settled — its size and modification time must be unchanged for a configurable delay (15 s by default) — so half-written uploads are not grabbed. Empty files, dot-files and hotfolder.log are skipped; when both a JPEG and a non-JPEG of the same name are pending, the non-JPEG is imported first. On import the file is renamed to IMPORTING-<name>, uploaded into the collection identified by the UUID (creating a record / linked file, exactly as a PUT on the /WebDAV mount would), then deleted. The path below the collection UUID is kept as the stored file path; files in sub-directories are imported flat. A failed import is renamed to ERROR-<name> with a <name>.log beside it. Every attempt is appended as a TSV row to hotfolder.log inside the collection's directory, with columns date, user, path, file, size, system_object_id, file_eas_id, status, msg.
Enablement. Served only when webdav.hotfolder = true, a hotfolder path is configured, and the instance runs a single backend; otherwise every request returns 503 with code: WebdavNotEnabled. This gate is independent of webdav.read_write_access.
Authentication. As with /WebDAV, the share performs no client authentication — connect as guest and send no credentials. The import runs server-side as the owner of the target collection.
Being a stdlib webdav.Handler it accepts the full WebDAV method set, but only PUT (drop a file) and MKCOL (create a sub-directory) do anything meaningful; GET / PROPFIND expose the on-disk staging area (files still pending, plus any IMPORTING- / ERROR- markers and hotfolder.log), never the collection's actual contents.
GET /hotfolder/{collectionUuid}/{path} — Read the on-disk staging area (not the collection's objects).
Access token in the Authorization header:
Authorization: Bearer <token>.
The collection to ingest into — the name of its auto-created hotfolder sub-directory, which is the collection UUID. A file must be dropped under a collection UUID to be imported; files at the hotfolder root are ignored.
Any further path below the collection UUID. Sub-directories are allowed (the crawler imports their files flat); the final segment is the dropped file's name.
The bytes of a staged file, an IMPORTING-/ERROR- marker, or
hotfolder.log.
The path does not exist on disk.
The hotfolder share is not enabled (code: WebdavNotEnabled).
binaryPUT /hotfolder/{collectionUuid}/{path} — Drop a file into the collection's hotfolder for ingestion.
The file is written to the on-disk staging directory. It is imported
into the collection — creating a record / linked file — by the crawler
once it has settled, not synchronously with this request. Watch
hotfolder.log in the collection directory, or the new objects in the
collection, for the outcome.
Access token in the Authorization header:
Authorization: Bearer <token>.
The collection to ingest into — the name of its auto-created hotfolder sub-directory, which is the collection UUID. A file must be dropped under a collection UUID to be imported; files at the hotfolder root are ignored.
Any further path below the collection UUID. Sub-directories are allowed (the crawler imports their files flat); the final segment is the dropped file's name.
The file was written to the staging directory.
No content
An existing staged file was overwritten.
The hotfolder share is not enabled (code: WebdavNotEnabled).
No content
Last updated