inpho / inphosite

The InPhO API
https://inphoproject.org
15 stars 5 forks source link

Search API #144

Open dunn opened 10 years ago

dunn commented 10 years ago

Maybe I'm overlooking something obvious, but if I don't know the entity ID of an entry, how can I find it using the API? In other words, shouldn't I be able to send an API request for "Baier" and receive an ID (or list of possible IDs) for that string?

So far the only way I can mimic this behavior is by doing curl 'https://inpho.cogs.indiana.edu/entity?redirect=true&q=Baier' and parsing the response. Or if I know the exact name, I can follow the redirect and look at the location in the header with curl -IL 'https://inpho.cogs.indiana.edu/entity?redirect=true&q=Annette%20Baier'

But this is a messy workaround. How do applications usually request data from InPhO without someone first manually figuring out the IDs corresponding to the relevant entities?

colinallen commented 10 years ago

Good point. We will consider ways of implementing this. In the mean time one can fetch the full list of entities at https://inpho.cogs.indiana.edu/entity.json and do one's own string matching on that.

dunn commented 10 years ago

Oh thank you, I overlooked the base entity document, that's very useful.