http://myservice/api/v1/phones/search?q= http://myservice/api/v1/phones/search?q=
Where q is the complex query expression. Have the following questions
1) Since advanced search involves a lengthy query expression, the URI will not fit in a GET call. Is it alright to implement the search API via POST request and still maintain the RESTfulness?
2) I have come across the following implementations for the advanced search:
- 1st approach - Send the complete infix expression for the query expression.
 
PHONENAME STARTSWITH AR AND ( PHONETYPE = 4G OR PHONECOLOR = RED )
- 2nd approach - Constructing entire query expression in the form of a json.
 - 3rd approach - Alternative way to implement the query expression as a json.
 
eg.
{"and":[
   {"field":"PHONENAME","value":"AR","comparator":"STARTSWITH"},
   "or":[
   {"field":"PHONETYPE","value":"4G","comparator":"EQUALS"},
   {"field":"PHONECOLOR","value":"RED","comparator":"EQUALS"}]
]}
Which approach would be considered more RESTful out of the three? Suggestions for any other approaches are welcome :)