What it does
Delete every row a filter matches, without reading their ids first. where, any and search work as in query_table. expect_count, the number of rows you expect, is required: when the filter matches another number, nothing is deleted (409 validation_failed reason count_mismatch, with matched). At most 500 rows per call; a call without where, any or search is refused. Deleted rows cannot be brought back. Answers matched, deleted and the ids.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
namerequired | string | The table. |
where | object | Filters by column, as in query_table: the rows to delete. |
any | array of objects | A list of where filters, of which at least one must match. |
search | string | Text to find in the table's searchable columns. |
visibility | one of: shared, private, all | Only for an own_and_shared table. shared: rows that belong to no member. private: your own private rows (the owner: every member's). all, the default: everything you may read, so the shared rows plus your own. |
expect_countrequired | integer | How many rows the filter should match. |
site_id | string | Only for a site shared with you (whoami lists them): read or change that site's data as its member. |
Example
Call delete_rows with these arguments:
{
"name": "tasks",
"where": {
"status": "parked"
},
"expect_count": 3
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Count, find and change many rowsYour agent answers questions about a table without reading every row.