Skip to content

Overview

Database of Markdown notes: tables of notes, rows, queries, history, a change feed and the vault’s notes.

Operations: every operation is POST /datanotes/operations/<name>/, its body the operation’s arguments (the same names as the MCP tool of the same name). An unknown argument is refused (400) with the closest real one.

Authentication: every route but GET /, this document and /datanotes/docs needs Authorization: Bearer <token>: the owner’s token (httpServerToken in the settings: everything) or a named token (/datanotes/tokens/create/: reads everything; writes the tables in its write patterns, changes the schema with ddl; the engine’s administration stays the owner’s: 403 otherwise).

Actor: send X-Datanotes-Actor: {"harness": …, "model": …, "session": …} (JSON) to record on whose behalf a write is made; the journal adds the credential (auth: owner, or the named token’s name), which the client cannot claim.

Errors: {error} with 400 (bad input), 401 (missing or wrong token), 403 (a named token beyond its permissions), 404 (unknown table, view, migration or note), 409 (ambiguous table name), 500. A refused write answers 422 (409 for undo) with the operation’s result, ok: false: nothing was written.

Information

  • OpenAPI version: 3.1.0

The owner’s token or a named token.

Security scheme type: http