Skip to content

List every table: `name`, `catalog`, `schema`, `qualified` (`personal.metrics.mood` — use it

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

List every table: name, catalog, schema, qualified (personal.metrics.mood — use it wherever a table is expected; metrics.mood or mood also work when unambiguous), path and, when declared, description, aliases (other words for what it records) and tags. Tables are defined in metastore.yaml (catalog → schema → table): read it freely, but it is read-only for agents and changes only through the schema operations (create_table, add_column, …). Returns {tables, views}: views lists the stored views (same fields, no path): select them like tables. system.information_schema is read with select_rows. A token with read patterns sees only the tables and views it may read.

Call this first to find the table for what the user reports (match their words against name, description and aliases), and before creating tables or columns so you reuse existing ones instead of creating duplicates.

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

Example generated

{}

Done.

Media typeapplication/json
object
tables
required

Every table.

Array<object>
object
name
required
string
catalog
required
string
schema
required
string
qualified
required

Unambiguous name: catalog.schema.table.

string
description

What the table records.

string
aliases
Array<string>
tags

Key/value labels of the table (alter_table tags), when it has any.

object
key
additional properties
string
views
required

Every view.

Array<object>
object
name
required
string
catalog
required
string
schema
required
string
qualified
required
string
description
string
aliases
Array<string>

Example generated

{
"tables": [
{
"name": "example",
"catalog": "example",
"schema": "example",
"qualified": "example",
"description": "example",
"aliases": [
"example"
],
"tags": {
"additionalProperty": "example"
}
}
],
"views": [
{
"name": "example",
"catalog": "example",
"schema": "example",
"qualified": "example",
"description": "example",
"aliases": [
"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"
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}