Remove a column from the schema and every row. Previous values are journaled; revert with
const url = 'https://example.com/datanotes/operations/drop_column/';const options = { method: 'POST', headers: { 'X-Datanotes-Actor': '{"harness":"my-script","model":"","session":"s-1"}', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"table":"example","column":"example","dry_run":false}'};
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/drop_column/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Datanotes-Actor: {"harness":"my-script","model":"","session":"s-1"}' \ --data '{ "table": "example", "column": "example", "dry_run": false }'Remove a column from the schema and every row. Previous values are journaled; revert with
undo_migration. Refused while a CHECK, ref_where or ref_by of any table reads the column
(directly or through a link): the conflicts name them; drop or change them first.
The schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).
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 Bodyrequired
Section titled “Request Bodyrequired”object
The column’s name.
Responses
Section titled “Responses”Done.
Result of a write operation. A refusal (ok false) is answered with HTTP 422, a failed write with 500, so a 2xx body has ok true.
object
True when the operation was applied (or, on a dry run, would be).
The operation, by the name it was called with (e.g. insert_row, create_table, recompute_columns).
True when nothing was written (preview).
Journal id of the applied operation: pass it to undo_migration. Absent on a dry run.
Notes whose front matter or body were written.
Files created.
Files moved or renamed.
Files deleted or archived.
Links rewritten in other notes.
Reasons the operation was refused (empty on success).
object
Note or file path.
Why the operation cannot proceed.
Rows that would break the table’s rules (empty on success).
The violations of one row.
object
Row note path.
What is wrong with this row.
object
The column the violation is about (every code but check and unreadable).
The item of a list column that breaks the rule, from 0.
The CHECK’s name (code check).
Kind of violation.
Agent-readable explanation.
The offending value, when there is one.
Files that could not be written (empty on success).
object
Vault path.
What went wrong.
Set when a write failed partway (failed): true when the engine put back what it had written, so nothing is left written; false when that rollback failed too (failed names the files left, and undo_migration on migration_id retries it).
Front matter edits per note (planned, or made).
object
Note path.
Front matter keys set, with their new values.
object
Front matter keys removed.
True when the note body changes too.
Paths of notes created.
Files moved: from → to.
object
Paths deleted (or archived).
Files rewritten whole, e.g. metastore.yaml for DDL.
Transaction-log commits written (tables with history on).
object
Qualified table.
New log version.
Log operation, e.g. WRITE.
Links the write added to the text it wrote: the notes the text mentions by name (automatic links). Present when there is one.
A link the write added in place of a mention.
object
The note the link was written into.
The mention, as written.
Vault path of the note it links.
The link written in place of the mention.
Mentions left as text because the engine is not sure which note they name. Present when there is one: read the candidates and the context, then link the right one with update_row and autolink: false, or leave the text.
A mention left as text: more than one note could be meant.
object
The note the mention is in.
The mention, as written.
Same_name: several notes have this name; adjacent: names of different notes side by side, which may be one name; overlap: names of notes overlap; part_of_name: a capitalized word next to it suggests a longer name; sentence_start: a one-word name at the start of a sentence, a line, a list item or a label, where its capital says nothing.
Vault paths of the notes it may name.
The line around the mention.
What to do: read the candidates, then link the right one with update_row and autolink: false, or leave the text.
Example
{ "violations": [ { "violations": [ { "code": "required" } ] } ], "ambiguous_mentions": [ { "reason": "same_name" } ]}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"}Unknown table, view, migration, note or folder.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Ambiguous table name: it matches several tables (paths or tables lists them).
object
The tables’ folders the name matches.
The qualified tables the name matches.
Example generated
{ "error": "example", "paths": [ "example" ], "tables": [ "example" ]}Refused (validation failures, conflicts, an unmet expect): nothing written. Same body as 200, with ok: false and the reasons.
Result of a write operation. A refusal (ok false) is answered with HTTP 422, a failed write with 500, so a 2xx body has ok true.
object
True when the operation was applied (or, on a dry run, would be).
The operation, by the name it was called with (e.g. insert_row, create_table, recompute_columns).
True when nothing was written (preview).
Journal id of the applied operation: pass it to undo_migration. Absent on a dry run.
Notes whose front matter or body were written.
Files created.
Files moved or renamed.
Files deleted or archived.
Links rewritten in other notes.
Reasons the operation was refused (empty on success).
object
Note or file path.
Why the operation cannot proceed.
Rows that would break the table’s rules (empty on success).
The violations of one row.
object
Row note path.
What is wrong with this row.
object
The column the violation is about (every code but check and unreadable).
The item of a list column that breaks the rule, from 0.
The CHECK’s name (code check).
Kind of violation.
Agent-readable explanation.
The offending value, when there is one.
Files that could not be written (empty on success).
object
Vault path.
What went wrong.
Set when a write failed partway (failed): true when the engine put back what it had written, so nothing is left written; false when that rollback failed too (failed names the files left, and undo_migration on migration_id retries it).
Front matter edits per note (planned, or made).
object
Note path.
Front matter keys set, with their new values.
object
Front matter keys removed.
True when the note body changes too.
Paths of notes created.
Files moved: from → to.
object
Paths deleted (or archived).
Files rewritten whole, e.g. metastore.yaml for DDL.
Transaction-log commits written (tables with history on).
object
Qualified table.
New log version.
Log operation, e.g. WRITE.
Links the write added to the text it wrote: the notes the text mentions by name (automatic links). Present when there is one.
A link the write added in place of a mention.
object
The note the link was written into.
The mention, as written.
Vault path of the note it links.
The link written in place of the mention.
Mentions left as text because the engine is not sure which note they name. Present when there is one: read the candidates and the context, then link the right one with update_row and autolink: false, or leave the text.
A mention left as text: more than one note could be meant.
object
The note the mention is in.
The mention, as written.
Same_name: several notes have this name; adjacent: names of different notes side by side, which may be one name; overlap: names of notes overlap; part_of_name: a capitalized word next to it suggests a longer name; sentence_start: a one-word name at the start of a sentence, a line, a list item or a label, where its capital says nothing.
Vault paths of the notes it may name.
The line around the mention.
What to do: read the candidates, then link the right one with update_row and autolink: false, or leave the text.
Example
{ "violations": [ { "violations": [ { "code": "required" } ] } ], "ambiguous_mentions": [ { "reason": "same_name" } ]}Unexpected error ({error}), or a write that failed partway and could not be rolled back: rolled_back: false, failed lists the files left (undo_migration on migration_id retries the rollback).
Result of a write operation. A refusal (ok false) is answered with HTTP 422, a failed write with 500, so a 2xx body has ok true.
object
True when the operation was applied (or, on a dry run, would be).
The operation, by the name it was called with (e.g. insert_row, create_table, recompute_columns).
True when nothing was written (preview).
Journal id of the applied operation: pass it to undo_migration. Absent on a dry run.
Notes whose front matter or body were written.
Files created.
Files moved or renamed.
Files deleted or archived.
Links rewritten in other notes.
Reasons the operation was refused (empty on success).
object
Note or file path.
Why the operation cannot proceed.
Rows that would break the table’s rules (empty on success).
The violations of one row.
object
Row note path.
What is wrong with this row.
object
The column the violation is about (every code but check and unreadable).
The item of a list column that breaks the rule, from 0.
The CHECK’s name (code check).
Kind of violation.
Agent-readable explanation.
The offending value, when there is one.
Files that could not be written (empty on success).
object
Vault path.
What went wrong.
Set when a write failed partway (failed): true when the engine put back what it had written, so nothing is left written; false when that rollback failed too (failed names the files left, and undo_migration on migration_id retries it).
Front matter edits per note (planned, or made).
object
Note path.
Front matter keys set, with their new values.
object
Front matter keys removed.
True when the note body changes too.
Paths of notes created.
Files moved: from → to.
object
Paths deleted (or archived).
Files rewritten whole, e.g. metastore.yaml for DDL.
Transaction-log commits written (tables with history on).
object
Qualified table.
New log version.
Log operation, e.g. WRITE.
Links the write added to the text it wrote: the notes the text mentions by name (automatic links). Present when there is one.
A link the write added in place of a mention.
object
The note the link was written into.
The mention, as written.
Vault path of the note it links.
The link written in place of the mention.
Mentions left as text because the engine is not sure which note they name. Present when there is one: read the candidates and the context, then link the right one with update_row and autolink: false, or leave the text.
A mention left as text: more than one note could be meant.
object
The note the mention is in.
The mention, as written.
Same_name: several notes have this name; adjacent: names of different notes side by side, which may be one name; overlap: names of notes overlap; part_of_name: a capitalized word next to it suggests a longer name; sentence_start: a one-word name at the start of a sentence, a line, a list item or a label, where its capital says nothing.
Vault paths of the notes it may name.
The line around the mention.
What to do: read the candidates, then link the right one with update_row and autolink: false, or leave the text.
object
What went wrong, for a person or an agent.
Example
{ "violations": [ { "violations": [ { "code": "required" } ] } ], "ambiguous_mentions": [ { "reason": "same_name" } ]}A write that failed partway (a file another program holds) and was rolled back: rolled_back: true, nothing written. Send it again later. Same body as 200, with ok: false and failed.
Result of a write operation. A refusal (ok false) is answered with HTTP 422, a failed write with 500, so a 2xx body has ok true.
object
True when the operation was applied (or, on a dry run, would be).
The operation, by the name it was called with (e.g. insert_row, create_table, recompute_columns).
True when nothing was written (preview).
Journal id of the applied operation: pass it to undo_migration. Absent on a dry run.
Notes whose front matter or body were written.
Files created.
Files moved or renamed.
Files deleted or archived.
Links rewritten in other notes.
Reasons the operation was refused (empty on success).
object
Note or file path.
Why the operation cannot proceed.
Rows that would break the table’s rules (empty on success).
The violations of one row.
object
Row note path.
What is wrong with this row.
object
The column the violation is about (every code but check and unreadable).
The item of a list column that breaks the rule, from 0.
The CHECK’s name (code check).
Kind of violation.
Agent-readable explanation.
The offending value, when there is one.
Files that could not be written (empty on success).
object
Vault path.
What went wrong.
Set when a write failed partway (failed): true when the engine put back what it had written, so nothing is left written; false when that rollback failed too (failed names the files left, and undo_migration on migration_id retries it).
Front matter edits per note (planned, or made).
object
Note path.
Front matter keys set, with their new values.
object
Front matter keys removed.
True when the note body changes too.
Paths of notes created.
Files moved: from → to.
object
Paths deleted (or archived).
Files rewritten whole, e.g. metastore.yaml for DDL.
Transaction-log commits written (tables with history on).
object
Qualified table.
New log version.
Log operation, e.g. WRITE.
Links the write added to the text it wrote: the notes the text mentions by name (automatic links). Present when there is one.
A link the write added in place of a mention.
object
The note the link was written into.
The mention, as written.
Vault path of the note it links.
The link written in place of the mention.
Mentions left as text because the engine is not sure which note they name. Present when there is one: read the candidates and the context, then link the right one with update_row and autolink: false, or leave the text.
A mention left as text: more than one note could be meant.
object
The note the mention is in.
The mention, as written.
Same_name: several notes have this name; adjacent: names of different notes side by side, which may be one name; overlap: names of notes overlap; part_of_name: a capitalized word next to it suggests a longer name; sentence_start: a one-word name at the start of a sentence, a line, a list item or a label, where its capital says nothing.
Vault paths of the notes it may name.
The line around the mention.
What to do: read the candidates, then link the right one with update_row and autolink: false, or leave the text.
Example
{ "violations": [ { "violations": [ { "code": "required" } ] } ], "ambiguous_mentions": [ { "reason": "same_name" } ]}