VertNet / api

Codebase for the new module-based VertNet app. API module
1 stars 0 forks source link

Query object schema #6

Open jotegui opened 8 years ago

jotegui commented 8 years ago

Not a priority issue right now, but something to think about for v2.

The current way of building queries is a bit redundant in terms of query parameters

[http://api-module.vertnet-portal.appspot.com/api/v1/search?q={"q":"noturus placidus"}](http://api-module.vertnet-portal.appspot.com/api/v1/search?q={"q":"noturus placidus"})

Why are query parameters (query string, limit, cursor...) enclosed in a JSON object with the argument name q? Wouldn't it be better to rename either the outer or inner q to another term? Also, should we allow x-www-form-urlencoded style of passing parameters (search?q=Noturus+placidus&l=20) apart from JSON?