title: RESTApi EndPoint GET Multiple Resources
body: <p>The operation bellow retrieve of all books only the ones that are into the request. It is clearly a <strong>GET</strong> operation.</p>
  
  <p>From your perspective what is better ( pro/cons ) of doing those two bellow:</p>
  
  <ul>
  <li><strong>Note:</strong></li>
  </ul>
  
  <blockquote>
    <p>GET - api/library/2/books/</p>
  </blockquote>
  
  <p>Retrieves all the books from the Library 2.</p>
  
  <ul>
  <li><strong>Using GET:</strong></li>
  </ul>
  
  <blockquote>
    <p>GET - api/library/2/books/3/5/10/33/...../pages</p>
  </blockquote>
  
  <ul>
  <li><strong>Using POST:</strong></li>
  </ul>
  
  <blockquote>
    <p>POST - api/library/2/books/pages</p>
  </blockquote>
  
  <p><strong>Body:</strong></p>
  
  <pre><code>{
      "books_id": [
          2,
          30,
          40,
          20,
          30
      ]
  }
  </code></pre>
  
  <p>I’m in a real doubt here between using <strong>POST</strong> or <strong>GET</strong> methods to implement that. Books Ids on URL will get really messy if there was like 100-200 books to retrieve. I want some enlightenment here.</p>
  
  <p>I'm using PHP to handle the Rest Application and all those methods above are valid.</p>