Configure the database (persisted in metastore.yaml `config:`): `root` (rename the database
const url = 'https://example.com/datanotes/operations/configure_database/';const options = { method: 'POST', headers: { 'X-Datanotes-Actor': '{"harness":"my-script","model":"","session":"s-1"}', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"root":null,"default_catalog":null,"default_schema":null,"default_partition":null,"default_filename":null,"archive_folder":null,"timezone":null,"history":null,"autolink":null}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datanotes/operations/configure_database/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Datanotes-Actor: {"harness":"my-script","model":"","session":"s-1"}' \ --data '{ "root": null, "default_catalog": null, "default_schema": null, "default_partition": null, "default_filename": null, "archive_folder": null, "timezone": null, "history": null, "autolink": null }'Configure the database (persisted in metastore.yaml config:): root (rename the database
folder; links follow; revert by renaming back), default_catalog, default_schema,
default_partition (“” = flat) and default_filename (date formats for new time-based tables),
archive_folder, timezone (IANA; completes date-times written without offset), history
(transaction log for every table: true in a database the engine creates, false when
config lacks it, as in a metastore from before 3.0.0; change it only on the user’s request), autolink (the text a write
puts in a body links the notes it mentions; on by default). Returns describe_database.
Renaming root moves the folder (links to its notes are rewritten; the tables’ archive and
exclude folders inside it follow); the move is listed in the journal as move_database (undo
and time travel read older entries with the new paths) and cannot be undone. Settings changes are
not journaled (no migration_id, nothing for undo_migration): to revert, call it again with the
previous values.
The metastore changes only through operations: never edit metastore.yaml by hand (no validation).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”JSON: on whose behalf the write is made, recorded in the journal (harness, model, session).
Example
{"harness":"my-script","model":"","session":"s-1"}Request Body
Section titled “Request Body”object
Responses
Section titled “Responses”Done.
The database: configuration, catalogs, schemas, tables, views and bases.
object
Database folder in the vault.
Path of metastore.yaml (catalogs, schemas, tables, views).
Folder of the operation journal.
Database configuration.
object
Date format of row sub-folders; empty = flat.
Date format of row file names.
IANA time zone; empty = values stored as given.
Transaction log (time travel) on by default.
Automatic links in the text writes put in bodies (on by default).
Tables and views by catalog and schema.
object
What the catalog holds (comment_on).
Present (true) on the default catalog.
object
What the schema holds (comment_on).
object
Catalog.schema.table
Row count.
Rows whose front matter cannot be read, when there are any: not in row_count, since every read leaves them out. check_table lists them (code unreadable).
Key/value labels of the table, when it has any.
object
What has no description, when something has none (a table defined before descriptions were required): fill them with alter_table and alter_column.
object
True when the table itself has no description.
The columns without a description.
object
Bases (shared columns) and the tables that extend each one.
object
The bases this base builds on, in order.
Column names the base declares.
Qualified tables extending it.
What has no description, when something has none (a base defined before descriptions were required): define_base fills them.
object
True when the base has no comment.
The base’s columns without a description.
Example generated
{ "root": "example", "metastore": "example", "journal": "example", "config": { "default_catalog": "example", "default_schema": "example", "default_partition": "example", "default_filename": "example", "archive_folder": "example", "timezone": "example", "history": true, "autolink": true }, "catalogs": [ { "catalog": "example", "description": "example", "default": true, "schemas": [ { "schema": "example", "description": "example", "tables": [ { "name": "example", "qualified": "example", "row_count": 1, "unreadable_count": 1, "description": "example", "tags": { "additionalProperty": "example" }, "missing_descriptions": { "table": true, "columns": [ "example" ] } } ], "views": [ { "name": "example", "qualified": "example", "description": "example" } ] } ] } ], "bases": [ { "name": "example", "description": "example", "bases": [ "example" ], "columns": [ "example" ], "tables": [ "example" ], "missing_descriptions": { "base": true, "columns": [ "example" ] } } ]}Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Missing or wrong bearer token.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Unexpected error.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}