From 0e7705bb96a4f7a8a85618de3823d7f1980f2c99 Mon Sep 17 00:00:00 2001 From: Marc Villain Date: Tue, 3 Nov 2026 06:51:10 +0100 Subject: [PATCH] docs: writes on every table after the methods table --- docs/writes.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/writes.md b/docs/writes.md index 22550f9..4285b8c 100644 --- a/docs/writes.md +++ b/docs/writes.md @@ -16,6 +16,13 @@ procedures: { `write: true` allows create, update and delete of every visible column. A list allows only the columns named. Generated and identity columns are never writable, and neither is a key on update. +| Method | Path | Does | Answers | +|---|---|---|---| +| POST | `/tags` | creates one row, or an array of rows | 201 | +| PATCH | `/tags/4` | updates one row | 204, or 200 with the row | +| DELETE | `/tags/4` | deletes one row | 204, or 200 with the row | +| PATCH, DELETE | `/steps?priority=lt.3` | by filter, only where `bulk: true` | 204, or 200 with the rows | + ## Writes on every table For an API that writes everywhere, set `write` once, beside `expose`: @@ -36,13 +43,6 @@ It applies to every exposed table; views stay read-only until their resource all What is never writable stays so: hidden and sensitive columns, generated columns, and keys on update; a bulk request still needs a filter. Who may write is decided by your `authorize` hook, which receives every write with its action: see [Security](./security.md#hooks). -| Method | Path | Does | Answers | -|---|---|---|---| -| POST | `/tags` | creates one row, or an array of rows | 201 | -| PATCH | `/tags/4` | updates one row | 204, or 200 with the row | -| DELETE | `/tags/4` | deletes one row | 204, or 200 with the row | -| PATCH, DELETE | `/steps?priority=lt.3` | by filter, only where `bulk: true` | 204, or 200 with the rows | - ## Getting the rows back Without a `Prefer` header a write answers with no body. `Prefer: return=representation` answers the written rows, read back with the request's `select`, so embeds work too.