Add table rows
table_append_rowsAppend up to 1000 typed JSON rows. Returns every row ID; strict table rules apply before row effects. The key (the one unique column) compares exact stored text: '100' and '100.0' differ, the number 1 and the string '1' are one key. Before any row is written: a key value that is an object or array or over 1024 bytes, text holding U+0000 or a lone surrogate, or an upsert row without its key, is INVALID_INPUT; a key repeated within the call, or a plain append of a key a stored row holds, is STATE_CONFLICT. To update stored rows instead, pass upsert: true (the match is on the table's key; a table without one is INVALID_INPUT). Add records here rather than rewriting a file: rows are stored once, not copied per change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters. | |
| rows | Yes | At most 1000 rows: each its values by column, or { data, expectedRevision } to refuse (CONFLICT) an upsert match that changed since. | |
| upsert | No | Match each row on the table's key (its one unique: true column) and update the stored row instead of inserting; every row must carry the key. A table without a key refuses NO_TABLE_KEY. | |
| artifactId | Yes | The table: its id, alias or page URL. | |
| expectedWorkspaceRevision | No | Optional: refuse (CONFLICT) a write that widens the schema if the table changed since this workspaceRevision. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| rowIds | Yes | ||
| revisions | Yes |