I have a resource that can be represented in one of two ways:
- Big Serial Number, or
- Small Serial Number
Is it closer adherence to REST principles to:
- A: have a query string specify the type (https://acme.org/api/widget/aaa-111-aaa?type=big vs https://acme.org/api/widget/aaa?type=small), or
- B: have query strings specify the type as search parameters (https://acme.org/api/widget?serial=aaa-111-aaa?type=big vs https://acme.org/api/widget?serial=aaa?type=small), or
- C: in the URI (https://acme.org/api/widget/big/aaa-111-aaa vs https://acme.org/api/widget/small/aaa), or
- D: something else (ex: headers)?
To me, it seems like having it in the URI (option C) specifies an entirely different resource, and in this case, they should represent the exact same resource. Is option A the best way to represent this?