title: REST API - Endpoint syntax - get item by property - not by id
body: <p>I'm implementing my first REST API, and I have a question about the syntax of the URL endpoints.</p>
  
  <p>I know that I should use these endpoint for get, create, update and delete:</p>
  
  <ul>
  <li><p>Get list of items<br>
  Method: <code>GET</code>, Url: <code>/api/items</code></p></li>
  <li><p>Get item by id<br>
  Method: <code>GET</code>, Url: <code>/api/items/:id</code></p></li>
  <li><p>Add item (new item data in the request body)<br>
  Method: <code>POST</code>, Url: <code>/api/items</code></p></li>
  <li><p>Modify item (modified item data in the request body)<br>
  Method: <code>PUT</code>, Url: <code>/api/items/:id</code></p></li>
  <li><p>Delete item<br>
  Method: <code>DELETE</code>, Url: <code>/api/items/:id</code></p></li>
  </ul>
  
  <p>But lets say the interface of item is</p>
  
  <pre><code>interface item
  {
    id: string;
    name: string;
  }
  </code></pre>
  
  <p>What should be the request url for getting an item by it's name?<br>
  I can't use Method: <code>GET</code>, Url: <code>/api/items/:name</code>, because this will match the get-by-id request. So how should I syntax this endpoint?</p>