title: REST: deleting a resource from a collection using an implied ID as an input
body: <p>I have a resource:</p>
  
  <p><code>/items</code></p>
  
  <p>I want to allow users to vote on this resource both up and down</p>
  
  <p><code>POST /items/{item_id}/votes</code> - to create a new vote passing in their + or - vote</p>
  
  <p>I can get votes by (it uses logged in user's ID from access token to store votes with a key <code>[item_id, user_id]</code>):</p>
  
  <p><code>GET /items/{item_id}/votes</code> - to get all votes on an item</p>
  
  <p><code>GET /items/{item_id}/upvotes</code> - to get all up votes on an item</p>
  
  <p><code>GET /items/{item_id}/downvotes</code> - to get all down votes on an item</p>
  
  <p>So <code>votes</code> is a collection, but if I want to delete a vote completely should I use:</p>
  
  <p><code>DELETE /items/{id}/votes</code> ?? and delete based ont eh user's ID - but this resource refers to the collection I don't want to delete the whole collection, I do have enough info with the user_id and item_id to delete the vote but it doesn't seem right to me.</p>
  
  <p>I can't directly refer to the user's vote at the moment so should I add an ID to each vote and:</p>
  
  <p><code>DELETE /items/{item_id}/votes/{vote_id}</code></p>
  
  <p>or maybe just:</p>
  
  <p><code>DELETE /votes/{vote_id)</code></p>
  
  <p>OR maye I don't need an ID on the vote and I can use:</p>
  
  <p><code>DELETE /item/{item_id}/votes/mine/</code> -  to delete an item from the collection using my logged in user_id</p>
  
  <p>So to sumarise; what is the proper way to delete an item from a collection using REST via HTTP methods?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have a feeling that these are the best solution</p>
  
  <p><code>POST /items/{item_id}/votes</code> - to create a new vote using item_id and user_id (from access token)</p>
  
  <p><code>DELETE /item/{item_id}/votes/mine/</code> -  to delete my vote using item_id and user_id (from access token)</p>