Skip to content

Metadata REST API

The metadata server exposes a REST API alongside its RPC protocol. The REST endpoints serve utilities and monitoring. All query parameters use kebab-case (e.g., volume-id, base-path).

These parameters are accepted by most endpoints:

ParameterTypeDescription
volume-idstringVolume UUID or name (required)
base-pathstringBase32-encoded base path to scope the query
at-timeuint64Point-in-time in nanoseconds since epoch (for time-travel mounts)
GET /analyze/files

Returns the top files by size, size_bin, or cost within a volume or subtree.

ParameterTypeDefaultDescription
volume-idstringVolume UUID or name (required)
base-pathstringBase32-encoded path prefix
at-timeuint64Point-in-time (nanoseconds since epoch)
headerboolfalseInclude column headers
limituint32100Maximum results (1-1000)
order-bystringcostSort field: size, size_bin, or cost

Response: 200 OK with tab-separated text, one file per line.

GET /analyze/folders

Returns per-directory recursive size and cost.

ParameterTypeDefaultDescription
volume-idstringVolume UUID or name (required)
base-pathstringBase32-encoded path prefix
at-timeuint64Point-in-time (nanoseconds since epoch)
headerboolfalseInclude column headers
max-depthuint320Maximum depth (0 = unlimited)

Response: 200 OK with tab-separated text.

GET /analyze/users

Returns per-user size and cost.

ParameterTypeDefaultDescription
volume-idstringVolume UUID or name (required)
base-pathstringBase32-encoded path prefix
at-timeuint64Point-in-time (nanoseconds since epoch)
headerboolfalseInclude column headers
limituint32100Maximum results (1-1000)
order-bystringcostSort field: size or cost

Response: 200 OK with tab-separated text (UID, size, cost).

GET /find

Searches the filesystem with filters on inode attributes.

ParameterTypeDescription
volume-idstringVolume UUID or name (required)
base-pathstringBase32-encoded path prefix
fieldsstringComma-separated output fields
headerboolInclude column headers
namestringDentry name filter (supports glob)
typestringInode type: b, c, d, f, l, p, s
uiduint32UID filter
giduint32GID filter
inouint64Inode number filter
emptyboolEmpty file/directory filter
sparseboolSparse file filter
permstringPermissions filter (octal)
perm-maskstringPermissions mask (octal)
min-size, max-sizeuint64Byte size range
min-blocks, max-blocksuint64Block count range
min-cost, max-costfloat64Monthly cost range
min-nlink, max-nlinkuint32Hard link count range
min-depth, max-depthuint32Depth range
min-atime, max-atimeuint64Access time range (nanoseconds)
min-btime, max-btimeuint64Birth time range (nanoseconds)
min-ctime, max-ctimeuint64Change time range (nanoseconds)
min-mtime, max-mtimeuint64Modification time range (nanoseconds)
min-size-bin, max-size-binuint32Size bin range (0-74)

Response: 200 OK with tab-separated text.

GET /duplicates

Returns groups of files that share the same size and block count, which are candidates for deduplication.

ParameterTypeDescription
volume-idstringVolume UUID or name (required)
base-pathstringBase32-encoded path prefix
at-timeuint64Point-in-time (nanoseconds since epoch)
min-size, max-sizeuint64Byte size range
min-blocks, max-blocksuint64Block count range

Response: 200 OK with JSON object. Keys are "{size}.{blocks}" and values are arrays of {path, nlink, btime} objects.

GET /metrics

Returns Prometheus-format metrics for the metadata server.

GET /status

Returns server health status.