title: Updating multiple records in a RESTful API
body: <p>I would like to know if there is RESTful way to handle updating multiple records with one request where you don't know the ids of the records to update.</p>
  
  <p>Example:</p>
  
  <p>You have resource <code>/jobs</code>. Say you are able list these jobs in the following way <code>GET /jobs?sort=priority&amp;inprogress=false&amp;limit=10</code> This will return you a list of 10 jobs that are not in progress in priority order. </p>
  
  <p>Now say you want change the state of those jobs to inprogress=true. What would be a RESTful way of achieving this? Obviously you could perform a GET and then update each of those individually but you may have another process that has already grabbed those between you doing the GET and making the update. Then you'll get a failed request because those have already been updated, which is the main thing I want to avoid.</p>
  
  <p>Would it be RESTful to perform an update based on filtering like a GET request e.g</p>
  
  <pre><code>PATCH /jobs?sort=priority&amp;inprogress=false&amp;limit=10
  
  {[op:"replace", path:"/inprogress", value:true]}
  </code></pre>
  
  <p>So that this would update the first 10 jobs that are not in progress in priority order, changing them to be inprogress and returning them.</p>
  
  <p>Is this RESTful? Or is there a better way to achieve this in a RESTful way?</p>