Open sckott opened 10 years ago
Hi Scott, Thanks for the feedback. That is very helpful. It would be great (for me at least) if you could expand a bit on what you mean by "write methods" in the first bullet point. Were you thinking about methods for submitting entirely new studies, methods for annotating trees from published studies, or something else? I know that there are lots of potential pieces of information that someone might want to associate with a tree, but having a few examples of the types of data that you think folks would want to write would be very helpful.
@mtholder Sorry, by write methods, I meant POST
/PUT
, so being able to submit data, and not just get data. I was simply thinking of submitting data in general. Hard to know what would be most useful for the community. I imagine submitting annotations to trees would be of use, e.g., an R user may generate a new tree with node age estimates that could be submitted, or traits associated with nodes or tips that could be submitted.
Submitting new studies and updating existing studies via the API are documented here:
https://github.com/OpenTreeOfLife/api.opentreeoflife.org/blob/master/docs/README.md
Great, thanks @leto
Fuzzy search on node/tip names: Don't know if this is built in, but would be awesome to have.
We do currently support this in the TNRS, for example:
curl 'http://ec2-54-203-194-13.us-west-2.compute.amazonaws.com/taxomachine/ext/TNRS/graphdb/autocompleteBoxQuery' -H 'Content-Type: application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' --data-binary '{"queryString":"arac","contextName":"Animals"}'
As suggested by the name autcompleteBoxQuery, this is tailored to user experience we wanted for taxon search in the main webapp. But we can definitely get there from here..
Nice, good to hear @jimallman
There is another query that is tailored for sets of names occurring in the same tree:
curl 'http://ec2-54-203-194-13.us-west-2.compute.amazonaws.com/taxomachine/ext/TNRS/graphdb/c http://ec2-54-203-194-13.us-west-2.compute.amazonaws.com/taxomachine/ext/TNRS/graphdb/autocompleteBoxQueryontextQueryForNames' -H 'Content-Type: application/json' -d '{"queryString":"arachnids, insects, crustaceans"}'
On Fri, Jan 31, 2014 at 2:37 PM, Scott Chamberlain <notifications@github.com
wrote:
Nice, good to hear @jimallman https://github.com/jimallman
Reply to this email directly or view it on GitHubhttps://github.com/OpenTreeOfLife/api.opentreeoflife.org/issues/47#issuecomment-33834855 .
@kcranston asked about our (ropensci) thoughts on the API. Our perspective is of course from working in R...here goes:
study_id='4,5,6'
orstudy_id=4&study_id=5&study_id=6
instead of haivng to request 4, 5 and 6 in 3 separate calls): This may be harder on your side, but the APIs we work with that allow passing in of multiple identifiers in a single call (e.g., the PLOS altmetrics API) make for faster data acquisition.