Skip to content

The operation journal, newest first: `total` (the matching operations) and `migrations`, each with

POST
/datanotes/operations/list_migrations/
curl --request POST \
--url https://example.com/datanotes/operations/list_migrations/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "limit": null, "op": null, "table": null, "since": null, "before": null, "auth": null }'

The operation journal, newest first: total (the matching operations) and migrations, each with migration_id (for undo_migration), op, summary, table (when it was about one), executed_at, notes_changed, files_changed, undone, undoes, files_failed, by (the agent), and members (a batch’s operations) or batch (the batch of an operation). Filters: op (e.g. “update_rows”), table (substring of the table name, e.g. “personal.tasks.task”), since (ISO date), auth (only the operations made with this credential: owner or a token’s name), before (ISO date-time: only the operations strictly before it; pass the executed_at of the oldest one you read to page back). Each operation has actor (auth, session, harness, model, as recorded). limit default 50. The journal is kept in the engine’s store, outside the vault (store:journal/); entries older than 90 days are dropped.

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
limit
Any of:
integer
op
Any of:
string
table
Any of:
string
since
Any of:
string
before
Any of:
string
auth
Any of:
string

Done.

Media typeapplication/json
object
total
required

Matching operations (before limit).

integer
migrations
required

Newest first.

Array<object>
object
migration_id
required
string
op
required
string
summary
required
string
table

The table (or schema, or catalog) the operation was about, by its qualified name.

string
executed_at
required

ISO date-time.

string
notes_changed
required
integer
files_changed
required

Files created, moved, deleted or rewritten.

integer
undone
required
boolean
undoes

Operation this one undid.

string
files_failed
required
integer
by

Harness / model of the agent.

string
actor

Who ran it, as recorded: the credential (owner or a token’s name), the agent’s session, harness and model.

object
auth
string
session
string
harness
string
model
string
members

Operations of a batch.

Array<string>
batch

Batch this operation belongs to.

string
settings

For op set_engine_settings: each setting changed, with its value before and after; a secret has neither, and redacted true (an address has them without its credentials).

Array<object>
object
name
required
string
before
after
redacted
boolean

Example generated

{
"total": 1,
"migrations": [
{
"migration_id": "example",
"op": "example",
"summary": "example",
"table": "example",
"executed_at": "example",
"notes_changed": 1,
"files_changed": 1,
"undone": true,
"undoes": "example",
"files_failed": 1,
"by": "example",
"actor": {
"auth": "example",
"session": "example",
"harness": "example",
"model": "example"
},
"members": [
"example"
],
"batch": "example",
"settings": [
{
"name": "example",
"before": "example",
"after": "example",
"redacted": true
}
]
}
]
}

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