Skip to content
Hoody.com

Use a HEAD request against any file path to retrieve its metadata without downloading the file body. The response headers describe the file’s size, content type, modification time, and ETag, while a successful empty body confirms that the file exists. This is the fastest way to check whether a file is present, compare ETags for caching, or inspect version-history and time-travel options before issuing a full read.

The endpoint lives at the WebDAV-style file root of the container, not under an /api/files/metadata/ prefix — every path you want to inspect is appended directly to the files service host.


Returns headers describing the file at the given path. The body of a successful response is empty; metadata is conveyed entirely through response headers (for example Content-Length, Content-Type, ETag, Last-Modified).

The query parameters below enable version-history listing (history), point-in-time reads (at), stable-revision reads (revision), and unified diffs (diff). These are mutually exclusive — pick one mode per request.

NameInTypeRequiredDescription
pathpathstringYesURL-encoded absolute path of the file (e.g. docs/readme.md)
historyquerystringNoList all revisions of a file. Pass an empty string. Returns JSON with revisions array, pagination via after_id. Mutually exclusive with at/revision/diff.
atquerystringNoRead file content at a point in time. Accepts RFC3339 timestamp or Unix milliseconds. Mutually exclusive with history/revision/diff. Composable with ?lines, ?hash, ?base64.
revisionqueryintegerNoRead file content by stable per-path sequence number. Mutually exclusive with history/at/diff. Composable with ?lines, ?hash, ?base64.
diffquerystringNoCompute unified diff between two versions. Pass an empty string. Requires from_seq or from_ts. Optional to_seq or to_ts (defaults to current file). Mutually exclusive with history/at/revision.
from_seqqueryintegerNoSource revision seq number for ?diff. Mutually exclusive with from_ts.
from_tsquerystringNoSource timestamp for ?diff (RFC3339 or Unix ms). Mutually exclusive with from_seq.
to_seqqueryintegerNoTarget revision seq number for ?diff. Mutually exclusive with to_ts. Default: current file on disk.
to_tsquerystringNoTarget timestamp for ?diff (RFC3339 or Unix ms). Mutually exclusive with to_seq.
after_idqueryintegerNoCursor for ?history pagination. Returns entries with id > after_id.
limitqueryintegerNoMax entries to return for ?history. Default: 100.

This endpoint accepts no request body.

// Plain existence check
const res = await client.files.files.getMetadata({ path: "docs/readme.md" });
// List revisions (use ?history)
await client.files.files.getMetadata({ path: "docs/readme.md", history: "" });
// Read at a point in time
await client.files.files.getMetadata({
path: "docs/readme.md",
at: "2025-01-15T10:30:00Z",
});
// Read by revision seq
await client.files.files.getMetadata({ path: "docs/readme.md", revision: 42 });
// Diff between two revisions
await client.files.files.getMetadata({
path: "docs/readme.md",
diff: "",
from_seq: 40,
to_seq: 42,
});
// Paginate history
await client.files.files.getMetadata({
path: "docs/readme.md",
history: "",
after_id: 1500,
limit: 50,
});

The method lives on the files service of the files namespace (client.files.files.getMetadata). The path is required and goes inside the trailing options object alongside any query parameters (history, at, revision, diff, from_seq, from_ts, to_seq, to_ts, after_id, limit).

The file exists. The body is empty; inspect response headers for Content-Length, Content-Type, ETag, and Last-Modified.

{
"description": "File exists"
}