WebDAV API and Protocol Capabilities
WebDAV-related content has three parts: accounts, mount entry, and protocol capabilities.
The protocol layer is currently split under src/webdav/**: mod.rs handles Actix mounting, runtime switches, audit context, and method dispatch; auth.rs handles WebDAV-specific Basic Auth; protocol.rs parses Depth, Destination, If, ETag, and related protocol headers; responses.rs centralizes HTTP / XML response builders; props/ handles PROPFIND / PROPPATCH; transfer/ handles GET / HEAD / PUT; resources/ handles MKCOL / DELETE / COPY / MOVE; locks/ handles LOCK / UNLOCK; fs/, file/, and dir_entry.rs adapt the filesystem; path_resolver.rs resolves paths; db_lock_system.rs implements locks; and deltav.rs contains the minimal DeltaV subset.
Account API
Section titled “Account API”The following paths are relative to /api/v1 and require authentication.
Personal accounts
Section titled “Personal accounts”| Method | Path | Description |
|---|---|---|
GET | /webdav-accounts | List the current user’s WebDAV accounts |
POST | /webdav-accounts | Create a WebDAV account |
DELETE | /webdav-accounts/{id} | Delete a WebDAV account |
POST | /webdav-accounts/{id}/toggle | Enable or disable an account |
GET | /webdav-accounts/settings | Read the active mount prefix and client endpoint |
POST | /webdav-accounts/test | Test a set of WebDAV credentials |
Team accounts
Section titled “Team accounts”| Method | Path | Description |
|---|---|---|
GET | /teams/{team_id}/webdav-accounts | List team WebDAV accounts |
POST | /teams/{team_id}/webdav-accounts | Create a team WebDAV account |
DELETE | /teams/{team_id}/webdav-accounts/{account_id} | Delete a team WebDAV account |
POST | /teams/{team_id}/webdav-accounts/{account_id}/toggle | Enable or disable a team WebDAV account |
Common details:
- if
passwordis empty when creating an account, the server generates a random password - plaintext password is returned only once at creation time
- for personal accounts,
root_folder_id = nullmeans the account can access the whole user space; for team accounts, it means the account can access the whole team space - when
root_folder_idis provided, the server verifies that the folder belongs to the personal or team workspace for that account /togglehas no request body; each call switches enabled / disabled state/settingsreturns:prefix: the active server mount prefixendpoint: a client-usable URL; ifpublic_site_urlis configured, this is absolute, otherwise it is relative. With multiple public origins, the server matches the current request origin exactly and falls back to the first configured origin when no match is found.
/testvalidates credentials without requiring a real client mountGET /webdav-accountsis paginated withlimitandoffsetGET /teams/{team_id}/webdav-accountsis also paginated withlimitandoffset- team members can create team WebDAV accounts; ordinary members can list, delete, and toggle only accounts they created, while team
owner/adminusers can list and manage all WebDAV accounts in the team - team WebDAV accounts must be managed through
/teams/{team_id}/webdav-accounts/*; the personal/webdav-accounts/{id}endpoints reject team accounts
Create request:
{ "username": "dav-demo", "password": null, "root_folder_id": 12}Mount URL
Section titled “Mount URL”The default WebDAV path is:
/webdavExample full URL:
http://localhost:3000/webdavChanging [webdav].prefix changes the mount URL as well.
Protocol capabilities
Section titled “Protocol capabilities”Common WebDAV methods are supported:
PROPFINDPROPPATCHMKCOLPUTGETHEADDELETECOPYMOVELOCKUNLOCKOPTIONS
A minimal DeltaV subset is also implemented:
REPORTwithDAV:version-treeVERSION-CONTROLOPTIONSwithDAV: version-control
This reuses file_versions, so clients can read version trees.
Limits:
REPORT version-treesupports files only- this is not a full DeltaV server, only the minimal useful subset
- the
/webdav/mount root is a virtual entry point, not a persisted folder entity.PROPFIND /webdav/may list contents and read live DAV properties, butPROPPATCH /webdav/explicitly returns403 Forbidden; custom dead properties are supported only on concrete files or folders. - missing
DepthonPROPFINDis parsed asinfinity; when the target is a collection, the server returns403withDAV:propfind-finite-depthinstead of doing unbounded recursion. COPYacceptsDepth: 0or missing /infinity, and rejectsDepth: 1;COPY Depth: 0copies only the collection itself and its dead properties, not children.GETsupportsRange: bytes=...and returns206 Partial Contentfor partial content;GET/HEADsupportIf-None-Matchand return304when it matches.PUT,DELETE,COPY, andMOVEevaluate standard ETag preconditions and WebDAVIflock-token conditions.MKCOLrequires an empty request body; non-empty bodies return415 Unsupported Media Type.Destinationmust stay on the current WebDAV server and under the active WebDAV prefix.LOCKsupports exclusive and shared write locks; multiple shared locks may coexist, while an exclusive lock blocks other shared / exclusive locks.- creating a
LOCKon a missing non-collection path creates a zero-byte file and returns201 Created.
Authentication and runtime switches
Section titled “Authentication and runtime switches”- Basic Auth: uses a dedicated WebDAV account and may be restricted to
root_folder_id - the current WebDAV mount does not accept normal
Authorization: Bearer <jwt>; Bearer is rejected as an unsupported auth scheme - if
webdav_enabled = false, WebDAV requests return503 - if
webdav_block_system_files_enabled = true, WebDAV writes / moves / copies are blocked according towebdav_block_system_file_patterns, which by default includes common client junk names such as.DS_Store,._*,Thumbs.db,desktop.ini, and$RECYCLE.BIN. REST folder listing does not apply this filter
When deployed behind a reverse proxy, make sure the proxy allows WebDAV methods and related headers. See reverse proxy deployment.
Conformance and client compatibility testing
Section titled “Conformance and client compatibility testing”For local protocol checks, the pinned Litmus baseline, known-difference management, the real-client matrix, and CI artifacts, see WebDAV Conformance and Compatibility Testing.