Open scottsfarley93 opened 7 years ago
This is implemented for the occurrences method:
http://apidev.neotomadb.org/v1/data/occurrences?taxonname=Microtus
-vs-
http://apidev.neotomadb.org/v1/data/occurrences?taxonname=Microtus&nametype=base
This is not implemented in the datasets
methods, but we've added it to the feature list.
Note that this does not assign cf
or type
taxa if this is appended at the level equivalent to the call itself, only at levels below.
Also not there's no Microtus all on its own in the DB.
Yeah this looks exactly like what I was thinking of!
Searching for too large of a group makes it die in an application error. Can we add a rule along the lines of "if you're search for a taxon with more than X children then success of API call = false"?
Thanks @scottsfarley93 , more generally we're discussing issues of how we return very large responses (as noted elsewhere). It might be worth having a two-part system:
This doesn't really answer what happens if people want to make a very big call though.
Tagging @spatialit so he's in the loop as well.
Are there resources other than the datasets resource this should be added to?
Right now datasets
and occurrences
are the only resources that provide searching by taxon, as far as I know. If you're talking about the summary API service, then we should start a new issue.
I think it would be really helpful if we could aggregate API responses to higher level taxa. For example, if I search for picea records, I would get everything identified to the genus picea, but also everything everything that was identified to a more specific level (picea abies, Picea abies subsp. abies, Picea cf. P. glauca, etc).
I see this being helpful for both visualization and modeling. Obviously, it could result in some very large responses, like if someone searched for all of Plantae, and I'm not sure how we would deal with that. Ideally it could just be a flag in the query string on all the endpoints that include a taxonname/taxonid field to turn on or off the aggregation.