Using REST principles, 404 seems to be used to indicate that an entity does not exist. However, how can clients distinguish this case from hitting an incorrect endpoint alt
you came to the right endpoint, but that entity doesn't exist
If there is no resource identified by the URL, how could it be the right endpoint? The only possible scenario I could think of is that the entity has been deleted, in which case 410 Gone is the correct response.
Remember that if you are following RESTful principles then the URL should have been provided by the server and if so, why is the server handing out invalid URLs?