title: Should a REST API select on a ID or a name field?
body: <p>I'm designing a REST API and trying to decide which is the more correct way of returning a single resource:</p>
  
  <pre><code>/resource/{id}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>/resource/{name}
  </code></pre>
  
  <p>The ID would be immutable, so I'm thinking that it would be better to select by it, but name would be more friendly looking. What is the best practice? I've seen both used before "in the wild".</p>