Skip to content

List directory

GET
/v0/namespaces/{namespace}/filesystem/list

Lists a directory at the current namespace head.

namespace
required
string

Namespace id

path
required
string

Absolute filesystem path

limit
string

Maximum page size

cursor
string

Opaque directory-list page cursor

Directory listing page

One directory listing and the namespace head it was answered at.

The envelope names the listing target and head so an empty directory still tells the caller which state it observed, and so the response can grow without reshaping entries.

object
absolute_path
required

Absolute path of the listed directory.

string
entries
required

Directory entries for this page.

Entries are returned in canonical name-key order. Higher-level display surfaces may sort entries separately for presentation.

Array<object>

Authoritative metadata for one visible path.

This is the result shape for stat/list style reads. File entries include revision and content summary fields; directory entries leave those empty.

object
absolute_path
required

Absolute path as rendered from stored display names.

string
committed_at_ms

Wall-clock stamp of the commit that created the current revision, for files; directories carry no modification time in v0. Observational: head_seq and revision sequences are the order.

integer | null format: int64
content_ref
One of:
null
display_name
One of:
null
head_seq
required

Namespace head sequence this answer was read from.

integer format: int64
inode_id
required

Stable inode identity for this item.

integer format: int64
inode_kind
required

Whether the item is a file or directory.

string
Allowed values: file dir
namespace_id
required

Namespace that was read.

string
parent_inode_id
One of:
null
revision_no
One of:
null
size_bytes

Current file size in bytes, for files.

integer | null format: int64
head_seq
required

Namespace head sequence this listing was read from.

integer format: int64
namespace_id
required

Namespace that was read.

string
next_cursor

Cursor for the next page, if more entries remain.

string | null

Invalid path, limit, or cursor

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Unauthorized

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Namespace or path not found

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Namespace deleted

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null