Rows¶
Row operations on the seatable-html-page-sdk. All methods are asynchronous — await them. The sdk instance below is created and initialized as shown in Initialization.
Response format
Row methods resolve to the underlying HTTP response — the payload is under .data, not the return value itself. For example, listRows gives you the rows via res.data.results and the column metadata via res.data.metadata. The Returns sections below describe the shape of .data.
Single- and multi-select values
Single-select and multi-select fields — including those returned via linked records and lookup formulas — return the option names, not their internal IDs.
List rows¶
listRows
List rows from a specific table, with pagination.
Parameters
tableName- string — name of the target table
start- number — starting index for pagination
limit- number — number of rows to retrieve
Returns .data holds { metadata, results } — results is the array of row objects, metadata the column definitions.
Example
Add rows¶
addRow
Add a new row to the specified table.
Parameters
tableName- string — name of the target table
rowData- object — key-value pairs of column names and values
Returns .data holds { row } — the newly created row object.
Example
const res = await sdk.addRow({
tableName: "Employees",
rowData: {
Name: "Jane Smith",
Age: 28,
Department: "Engineering",
// IDs of records linked in the Manager field
Manager: ["NSPa_fd4SEqRESqOZzRqyg", "eA6rQDuxQyGITmD1hrfyzw"],
},
});
Linked record fields
Set a link column with { "link_column_name": ["linked_row_id1", "linked_row_id2", ...] }.
batchAddRows
Add multiple rows to the specified table in one call.
Parameters
tableName- string — name of the target table
rowsData- array — an array of row objects
Returns .data holds { rows } — the list of created row objects. Each row carries its new _id, which you can use to populate link fields in a follow-up call.
Example
await sdk.batchAddRows({
tableName: "Employees",
rowsData: [
{
Name: "Jane Smith",
Age: 28,
Department: "Engineering",
Manager: ["NSPa_fd4SEqRESqOZzRqyg", "eA6rQDuxQyGITmD1hrfyzw"],
},
{
Name: "Tom",
Age: 24,
Department: "Product Management",
Manager: ["QgK2KMf8Sxad8duPcq6gQA", "bBDbhbzXReSPWpcxq225xA"],
},
],
});
Update rows¶
updateRow
Update an existing row.
Parameters
tableName- string — name of the target table
rowId- string — the unique ID of the row to update
rowData- object — the fields to update
Returns .data holds { success: true, row: {...} }
Example
batchUpdateRows
Update multiple rows in one call.
Parameters
tableName- string — name of the target table
rowsData- array — objects containing a
row_idand the updatedrowdata
Returns .data holds { success: true, rows: [{...}, ...] }
Example
Delete rows¶
deleteRow
Delete a single row.
Parameters
tableName- string — name of the target table
rowId- string — the unique ID of the row to delete
Returns .data holds { success: true }
Example
batchDeleteRows
Delete multiple rows in one call.
Parameters
tableName- string — name of the target table
rowsIds- array — the row IDs to delete
Returns .data holds { success: true }
Example