Is your feature request related to a problem? Please describe.
Deleting an item (article, content category, banner, etc.) returns status 204 (NO CONTENT) for both existing and non-existing items. For API users, there is no single API call that can be used to securely delete an item. Two calls are required: first, the item must be retrieved to check whether it exists, and then it can be deleted.
Describe the solution you'd like
- Use distinct status codes, e.g. 404 (NOT EXIST) if we try to DELETE a non-existing item or
- Offer conditional deletes with sending additional header "If-Match: *"
- If the resource exists → delete → 204
- If it doesn’t exist → 412 Precondition Failed
Additional context
- See sample in #45868
- Found #27569, but don't want to overload this old issue