Skip to content

The direct children of a vault folder: `{folder, folders, files}`, each a vault path, sorted;

POST
/datanotes/operations/list_folder/
curl --request POST \
--url https://example.com/datanotes/operations/list_folder/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "folder": "" }'

The direct children of a vault folder: {folder, folders, files}, each a vault path, sorted; dot-files and dot-folders are left out. folder “” is the vault root. A missing folder is an error.

X-Datanotes-View-As
string

Owner only, on reads only (an operation that only reads, tokens/me/, extensions/, the change stream): the request runs with this named token’s permissions and read scope, and the token’s last_seen does not change. A named token sending it gets 403; a request that is not a read gets 400.

Media typeapplication/json
object
folder

Vault-relative folder; “” is the vault root.

string
""

Done.

Media typeapplication/json
object
folder
required

The folder listed (“” is the vault root).

string
folders
required

Its sub-folders, as vault paths, sorted.

Array<string>
files
required

Its files, as vault paths, sorted.

Array<string>

Example generated

{
"folder": "example",
"folders": [
"example"
],
"files": [
"example"
]
}

Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Missing or wrong bearer token.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

A named token whose read patterns do not cover the table, view or note the request names (such as token cook may not read personal.health.weight). Sets it did not name (listings, bases, search, the graph, the change feed) are filtered instead.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Unknown table, view, migration, note or folder.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Ambiguous table name: it matches several tables (paths or tables lists them).

Media typeapplication/json
object
error
required
string
paths

The tables’ folders the name matches.

Array<string>
tables

The qualified tables the name matches.

Array<string>

Example generated

{
"error": "example",
"paths": [
"example"
],
"tables": [
"example"
]
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}