Skip to content
Hoody.com

Metadata

Retrieve file metadata using HEAD requests against a container’s file root. The endpoint returns HTTP headers by default, and supports query parameters to switch the response into a JSON body describing file revisions, a point-in-time view, or a diff between versions.

HEAD /{path}

Returns metadata for a file at the given path. Pass a query parameter such as history, at, revision, or diff to receive a JSON body describing the selected view; otherwise the response carries metadata in HTTP headers.

NameInTypeRequiredDescription
pathpathstringYesURL-encoded file path relative to the container file root.
historyquerystringNoList all revisions of a file. 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. 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.

{
"description": "File exists"
}

Default metadata fetch (path only):

Terminal window
curl -I 'https://{projectId}-{containerId}-files-1.{server}.containers.hoody.com/docs%2Freadme.md' \
-H "Authorization: Bearer <token>"

Listing revisions via the history query option:

Terminal window
curl -I 'https://{projectId}-{containerId}-files-1.{server}.containers.hoody.com/docs%2Freadme.md?history=' \
-H "Authorization: Bearer <token>"

Computing a diff between a past revision and the current file:

Terminal window
curl -I 'https://{projectId}-{containerId}-files-1.{server}.containers.hoody.com/docs%2Freadme.md?diff=&from_seq=12' \
-H "Authorization: Bearer <token>"