Hello,
What's the best way retrieve complex queries from a REST service?
Suppose I want to get X collections, apply filters and equations to each one, combine the collections using some other operation and return one result, everything in one request.
It is just too complex (and big) to put everything in the querystring since I could combine more than 300 collections (plus the operators and filters to each one).
I thought about using POST to send a XML object describing the query to something like:
http://mydomain/collections/complexQuery
It would return an unique ID and then I could use GET to retrieve the complexQuery result:
http://mydomain/collections/complexQuery/{queryId}
Jason S:
That's the idea. The POST will take an XML representation of the query, with the "where" parameters already (they can be too many). The query will be executed only when the GET arrives. I could let the query object available just for some time and delete it later.
Is this a good solution? Am I still RESTful doing this?