Skip to content

NAMESPACE LIST

Lists the child namespaces under a given path or lists root-level namespaces when no path is provided.

NAMESPACE LIST [namespace]
ParameterTypeRequiredDescription
namespacestringNoDot-separated hierarchical path to list children of (e.g. production.users). When omitted, root-level namespaces are listed.

Array of bulk strings: each element is the name of a child namespace. Returns an empty array when no children exist.

The command opens an isolated one-off transaction against the FoundationDB directory layer.

When called without arguments, it lists all root-level namespaces. When called with a namespace path, it lists the immediate children of that path.

The reserved __internal__ namespace is automatically filtered from the results and never appears in the output.

If the cluster has not been initialized yet and no path is provided, an empty array is returned.

Error CodeDescription
NOSUCHNAMESPACEThe given namespace path does not exist.
ERRThe namespace path contains the reserved __internal__ leaf.

List root-level namespaces:

> NAMESPACE LIST
1) "global"

List children of a namespace:

> NAMESPACE CREATE production.users
OK
> NAMESPACE CREATE production.orders
OK
> NAMESPACE LIST production
1) "users"
2) "orders"

List children of a leaf namespace (no children):

> NAMESPACE CREATE production.users
OK
> NAMESPACE LIST production.users
(empty array)

Non-existent namespace:

> NAMESPACE LIST nonexistent
(error) NOSUCHNAMESPACE No such namespace: 'nonexistent'

Reserved name:

> NAMESPACE LIST name.__internal__
(error) ERR Namespace 'name.__internal__' is reserved for internal use