back to query /// home
Add a new row to a table.
{
"action": "insert",
"table": "items",
"data": {
"name": "New Widget",
"category_id": 3,
"price": 24.99,
"status": "draft"
}
}
| Field | Type | Required | Notes |
|---|---|---|---|
action |
string | yes | must be "insert" |
table |
string | yes | target table |
data |
object | yes | column value pairs to insert |
{
"success": true,
"data": 42,
"rows_affected": 1
}
data is the auto increment ID of the newly inserted row (last_insert_id).
data. if theres nothing left after stripping you get an error (cant insert nothing lol)created_by set to your user IDpinned_to set to your user ID (unless you have rwa permission and explicitly set it to someone else)created_at handled by SQL defaultsr, rg and ro will give you a nice 403