If a request want to get/delete/update to a resource which isn't exist, what do you prefer to return? 204 or 404?
Sample: api/blog/{id}
can take that requests: GET, DELETE, PUT and api/blog
can take GET and POST.
GET: api/blog
returns list of blogs, GET: api/blog/{id}
returns single blog,PUT: api/blog/{id}
updates single blog and DELETE: api/blog/{id}
deletes single blog.
In my opinion the distinction that matters is whether the request ends up successfully or not.
So generally in most of the cases 404 is the way to go.
I would recommend so, because the HTTP response codes are grouped by, let's say, result. source
For example, the process can be like this:
DELETE
an entity.On 204 again cited from MDN: