NAMESPACE LIST
Lists the child namespaces under a given path or lists root-level namespaces when no path is provided.
Syntax
Section titled “Syntax”NAMESPACE LIST [namespace]Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
namespace | string | No | Dot-separated hierarchical path to list children of (e.g. production.). When omitted, root-level namespaces are listed. |
Return Value
Section titled “Return Value”Array of bulk strings: each element is the name of a child namespace. Returns an empty array when no children exist.
Behavior
Section titled “Behavior”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.
Errors
Section titled “Errors”| Error Code | Description |
|---|---|
NOSUCHNAMESPACE | The given namespace path does not exist. |
ERR | The namespace path contains the reserved __internal__ leaf. |
Examples
Section titled “Examples”List root-level namespaces:
> NAMESPACE LIST1) "global"List children of a namespace:
> NAMESPACE CREATE production.usersOK
> NAMESPACE CREATE production.ordersOK
> NAMESPACE LIST production1) "users"2) "orders"List children of a leaf namespace (no children):
> NAMESPACE CREATE production.usersOK
> 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