From b15ce5500bf45a6845ce78a14a5081bc83e3a181 Mon Sep 17 00:00:00 2001 From: "Jeoffrey Fischer [SSW]" <106663901+jeoffreyfischer@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:08:47 +1100 Subject: [PATCH] Update rules/rest-api-design/rule.md Co-authored-by: Daniel Mackay [SSW] <2636640+danielmackay@users.noreply.github.com> --- rules/rest-api-design/rule.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rules/rest-api-design/rule.md b/rules/rest-api-design/rule.md index 39222e48a4..33d818f398 100644 --- a/rules/rest-api-design/rule.md +++ b/rules/rest-api-design/rule.md @@ -55,7 +55,9 @@ This provides a much more consistent API structure when querying both collection ### 3. Idempotent requests -Design `GET`, `PUT` and `DELETE` operations as idempotent, where repeating an action yields the same result as performing it once. This avoids unintended actions from repeated requests. +Design requests as idempotent operations, where repeating an action yields the same result as performing it once. This avoids unintended actions from repeated requests. + +Typically, `GET`, `PUT` and `DELETE` are idempotent by default, but special handling needs to be added to make `POST` requests idempotent. ::: greybox If a `DELETE` request removes a record, re-sending it should not throw errors if the record is already deleted.