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.

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.

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"
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}