From a5af8dc68fa31854e1cb199ddfcef54178f4b254 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Tue, 14 Apr 2020 11:35:32 -0500 Subject: [PATCH] Add return=rep to DELETE section --- api.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api.rst b/api.rst index 9d06e45c8..03c97c96b 100644 --- a/api.rst +++ b/api.rst @@ -1304,14 +1304,24 @@ Deletions To delete rows in a table, use the DELETE verb plus :ref:`h_filter`. For instance deleting inactive users: -.. code-block:: HTTP +.. code-block:: http DELETE /user?active=is.false HTTP/1.1 +Deletions also support :code:`Prefer: return=representation` plus :ref:`v_filter`. + +.. code-block:: HTTP + + DELETE /user?id=eq.1 HTTP/1.1 + Prefer: return=representation + + {"id": 1, "email": "johndoe@email.com"} + .. warning:: Beware of accidentally deleting all rows in a table. To learn to prevent that see :ref:`block_fulltable`. + .. _binary_output: Binary Output