Hi,
I have a problem I'm working on to develop a REST API to access a resource that has multiple 'levels' to it and am looking for suggestions to best handle it.
As a contrived example, the resources are specified using other qualifiers:
/myresource/state/{state}/region/{region}/customer/{customer}
In this scenario the customer is not a unique value. That is for a different region or state, the {customer} value could be re-used. This is not something that can be changed, and in actuality the 3 specifiers come from a 3rd party. So to get the correct customer you need the 3 pieces of information.
Should the 2 higher level specifiers be changed to query parameters to simplify the endpoint and still provide some insight into the call? Or another suggestion was to take the 3 values and Base64 encode them and use that as the final ID to the resource so it would become /myresource/customer/{base64-encoded-value}?
Thanks.
Les