Delete Body vs /delete POST endpoint vs.... #754
Unanswered
adamkorynta
asked this question in
General Aesthetics
Replies: 1 comment 1 reply
-
My preference is that we implement the expected/least surprising thing and then add any extra cool features on top. So a boring single item delete that uses http.DELETE and then if you want a bulk delete or some other operation it sits at its own url and uses POST. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The REST specification does not include a body for the Delete HTTP method. If we want to perform bulk delete operations, I see suggestions to either put a content body in anyways, or create a new endpoint and perform the action via POST and rely on naming. There's plenty of back-and-forth discourse on there on the topic. Wondering if CDA developers have a preference.
Ex. 1 - Delete Body
DELETE /turbine/changes/<location>?office=<office>
Ex. 2 - Post Delete Endpoint
POST /turbine/changes/bulk-delete/<location>?office=<office>
Time Window Delete
We'd still want to include a time window delete (required by java client), but I'm guessing a bulk delete would be useful to a broader audience.
DELETE /turbine/changes/<location>?office=<office>&start=<start-date>&end=<end-date>
Beta Was this translation helpful? Give feedback.
All reactions