Vaibhav Gargs wrote:We are developing the RESTful services for search operations. As per REST Specs, since we are fetching the data from the server, it must be GET HTTP Method. But, we have to search on a huge number of parameters and this list can extend in future too.
Your RESTful API should be focused on the
exchange of specific resources. When GET
ing a resource from a server, the client should already know what type of resource it wants the server will provide, and the majority of the parameters which describe the resource should be in the URI's resource path, not query parameters. A quick example:
RESTful:
GET /api/auto/dodge/caliber/2015/parts/engine/cooling/hose/intake&engine=2.2L
Not RESTful:
GET /api/search?category=auto&type=parts&system=engine&subsystem=cooling&item=hose&use=intake&make=dodge&model=caliber&year=2015&engine=2.2L