title: Upsert (update or insert) of resources with generated URIs in REST?
body: <p>My data access layer supports the upsert operations (Spring Data's <code>CrudRepository.save()</code>), when the id field is not set a new record is inserted and when the id field is set it is updated.</p>
  
  <p>I am wondering how to justify the additional effort required to create two separate REST methods (both on the backend and the frontend side):</p>
  
  <ul>
  <li>POST /users, for creating a new user (and generating the URI of the newly created resource)</li>
  <li>PUT /users/{id}, for updating the existing users</li>
  </ul>
  
  <p>over creating just one REST method:</p>
  
  <ul>
  <li>POST /users</li>
  </ul>
  
  <p>Are there any benefits of having two seperate methods other than being more RESTful?</p>