title: REST best practice for accessing a resource using two attributes
body: <p>I have unique RESTful resources which can only be identified in the system with two attributes.
  What I want to know is what is the best practice approach to do this. </p>
  
  <p>The resource is identified with an id attribute (which is not unique) and a name attribute (which also is not unique), however the combination of both attributes is unique.</p>
  
  <p>Currently our URI looks like this, but this doesn't seem right:</p>
  
  <pre><code>http://www.domain.com/somepath/myresource?firstid=1&amp;secondid=aname
  </code></pre>
  
  <p>I was thinking would it be better to combine the two attributes such as 'firstid-aname' as this seems to describe the permanency of the resource. e.g. so that you get a URI:</p>
  
  <pre><code>http://www.domain.com/somepath/myresource/firstid-aname
  </code></pre>
  
  <p>Or would it be better to do something like this, which I've seen else where:</p>
  
  <pre><code>http://www.domain.com/somepath/myresource;firstid=1;secondid=aname
  </code></pre>
  
  <p>Any suggestions would be greatly appreciated.
  Thanks</p>