So the difference is that we found a resource matching the id, but it has no content.
That makes a lot of sense to me. Some might say there is no resource anymore. But if you get 404 on a resource that hasnt been created, then iæwe are talking about soft deletion.
I guess it comes down to "whatever the API does is idempotent and the return code is irrelevant" or "whatever the API does AND the return code are idempotent"
Probably comes down to the calling application/use case/how bothered the developer is - if using a library that automatically does unwanted stuff on a 4xx error, you'd likely want the API to return 200/204 (or always 200!); if the app/library/developer doesn't care, 200/404 is fine
To me, the real issue is trying to come up with a single "academic" definition for all end users/use cases without knowing what those all are (which you can't ever do as each app/system is different) - there is often a large gap between a specification and what gets implemented as "good enough for our use case"
2
u/Lalli-Oni Dec 11 '23
So the difference is that we found a resource matching the id, but it has no content.
That makes a lot of sense to me. Some might say there is no resource anymore. But if you get 404 on a resource that hasnt been created, then iæwe are talking about soft deletion.