When working here, we have a box serving XML feeds for business partners. Requests for our channels are configured by specifying the parameters and values ββof the query string. Some of these parameters are necessary, but many of them are not.
For example, we require that all requests specify a GUID to identify the partner, and the request can either be for the "get the latest" or "search" action:
To search: http: //services.null.ext/? Id = [GUID] & q = [Search Keywords]
Recent data in the category: http: //services.null.ext/? Id = [GUID] & category = [ID]
Structuring a RESTful URL scheme for these parameters is easy:
Search: http: //services.null.ext/ [GUID] / search / [Keywords]
Last: http: //services.null.ext/ [GUID] / latest / category / [ID]
But how should we handle a dozen additional parameters that we have? Many of them are mutually exclusive, and many of them are necessary in combinations. Very quickly, the number of possible paths becomes extremely complex.
What are the recommended methods for matching URLs with complex query strings for friendlier / REST / ful / paths?
(I'm interested in conventions, schemes, templates, etc. Not specific technologies for implementing URL rewriting on a web server or within.)
core
source share