Hi All
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.
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.
Currently our URI looks like this, but this doesn't seem right:
http://www.domain.com/somepath/myresource?firstid=1&secondid=aname
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:
http://www.domain.com/somepath/myresource/firstid-aname
Or would it be better to do something like this, which I've seen else where:
http://www.domain.com/somepath/myresource;firstid=1;secondid=aname
Any suggestions would be greatly appreciated. Thanks