Skip to content

The WebDAV endpoints expose WebDAV-compatible file operations on Hoody file resources. These endpoints implement the HTTP verbs defined in RFC 4918 so that standard WebDAV clients — including Nextcloud, ownCloud, macOS Finder, Windows Explorer, and Cyberduck — can connect to Hoody as a WebDAV server.

Use these endpoints when you need to:

  • Connect an external WebDAV client to a file path on Hoody.
  • Discover server capabilities via OPTIONS.
  • Copy or move files between paths.
  • Issue LOCK / UNLOCK for client compatibility.
  • Retrieve (PROPFIND) or modify (PROPPATCH) WebDAV properties.

GET /{path}?type=webdav

Connect a WebDAV client (Nextcloud, ownCloud, etc.) to a Hoody file path. Returns the file content or a directory listing.

NameInTypeRequiredDescription
pathpathstringYesResource path on the Hoody WebDAV server
typequerystringYesMust be webdav
serverquerystringYesHoody server base URL
userquerystringNoUsername for WebDAV authentication
passquerystringNoPassword for WebDAV authentication
webdav_pathquerystringNoWebDAV endpoint path. Default: /
{
"description": "File content or directory listing"
}
await client.files.webdav.access({
path: "documents/report.pdf",
type: "webdav",
server: "https://app.hoody.com",
user: "alice",
pass: "••••••••",
webdav_path: "/"
});

OPTIONS /{path}

Returns supported HTTP methods and WebDAV capabilities in the Allow header. Used by WebDAV clients for capability discovery (RFC 4918 §10.1).

NameInTypeRequiredDescription
pathpathstringYesResource path to query for capabilities

This endpoint takes no body.

Returns 204 No Content. The advertised methods and DAV class are conveyed via response headers:

HeaderDescription
AllowComma-separated list of supported HTTP methods. WebDAV-root paths advertise the full WebDAV verb set; /api/v1/* paths advertise the simple HTTP set.
DAVWebDAV compliance class. Set to 1 on WebDAV-root OPTIONS responses; absent on /api/v1/* OPTIONS responses.
MS-Author-ViaAuthoring-protocol hint for Microsoft WebDAV clients. Set to DAV on WebDAV-root OPTIONS responses.
await client.files.webdav.getOptions({
path: "documents/"
});

COPY /{path}

WebDAV COPY: copy a file or directory to a new location specified by the Destination header.

NameInTypeRequiredDescription
pathpathstringYesSource file or directory path
DestinationheaderstringYesDestination URL for the copy
DepthheaderstringNoCopy depth: 0 (file only) or infinity (recursive for directories). Default: infinity

This endpoint takes no body.

{
"description": "Resource copied successfully"
}
await client.files.webdav.copyResource({
path: "documents/report.pdf",
Destination: "https://app.hoody.com/webdav/archive/report.pdf",
Depth: "0"
});

MOVE /{path}

WebDAV MOVE: move a file or directory to a new location specified by the Destination header. Requires both upload and delete permissions on the source.

NameInTypeRequiredDescription
pathpathstringYesSource file or directory path
DestinationheaderstringYesDestination URL for the move

This endpoint takes no body.

{
"description": "Resource moved successfully"
}
await client.files.webdav.moveResource({
path: "documents/draft.pdf",
Destination: "https://app.hoody.com/webdav/documents/final.pdf"
});

LOCK /{path}

WebDAV LOCK: returns a lock token for WebDAV client compatibility. This is a compatibility stub — locks are not enforced server-side.

NameInTypeRequiredDescription
pathpathstringYesResource path to lock
DepthheaderstringNoLock depth: 0 or infinity

Optional XML lock request body (application/xml).

<?xml version="1.0" encoding="utf-8"?>
</D:lockscope>
</D:locktype>
</D:lockinfo>
<?xml version="1.0" encoding="utf-8"?>
opaquelocktoken:hoody-compat</D:href></D:locktoken>
</D:activelock>
</D:lockdiscovery>
</D:prop>
await client.files.webdav.lockResource({
path: "documents/report.pdf",
Depth: "0"
});

UNLOCK /{path}

WebDAV UNLOCK: release a lock token. This is a no-op compatibility stub.

NameInTypeRequiredDescription
pathpathstringYesResource path to unlock
Lock-TokenheaderstringYesLock token to release

This endpoint takes no body.

{
"description": "Lock released (no-op)"
}
await client.files.webdav.unlockResource({
path: "documents/report.pdf",
Lock-Token: "opaquelocktoken:hoody-compat"
});

PROPFIND /{path}

WebDAV PROPFIND: retrieve properties (metadata) for files or directories. Returns XML with resource type, size, modification date, ETag, and more. Supports the Depth header (0, 1, infinity) to control recursion into directories.

NameInTypeRequiredDescription
pathpathstringYesResource path to query
DepthheaderstringNoDepth of property retrieval: 0 (resource only), 1 (immediate children), infinity (recursive). Default: 1

Optional PROPFIND XML body (application/xml) specifying which properties to retrieve. If omitted, all properties are returned.

<?xml version="1.0" encoding="utf-8"?>
</D:prop>
</D:propfind>
<?xml version="1.0" encoding="utf-8"?>
/documents/report.pdf</D:href>
245760</D:getcontentlength>
Mon, 10 Feb 2025 14:32:11 GMT</D:getlastmodified>
</D:prop>
HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
await client.files.webdav.propfindResource({
path: "documents/",
Depth: "1"
});

PROPPATCH /{path}

WebDAV PROPPATCH: modify properties on a file. Returns a 207 Multi-Status response.

NameInTypeRequiredDescription
pathpathstringYesResource path to modify

PROPPATCH XML body (application/xml) with set / remove instructions for the target properties.

<?xml version="1.0" encoding="utf-8"?>
<customprop xmlns="https://hoody.com/ns/">archived</customprop>
</D:prop>
</D:set>
</D:propertyupdate>
<?xml version="1.0" encoding="utf-8"?>
/documents/report.pdf</D:href>
<customprop xmlns="https://hoody.com/ns/">archived</customprop>
</D:prop>
HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
await client.files.webdav.proppatchResource({
path: "documents/report.pdf"
});