You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Term detail API endpoint at /api/term according to documentation returns only a label and a textual definition. In reality this is not true. For one, it also returns the @id attribute with the term ID (which is a good thing and should be kept, but is counter to documentation).
Secondly, it also returns relationships. For the example in the docs (basihyal bone), this is the following:
Aside from the fact that it is counter to documentation, I'm wondering why it is missing the is_a or subClassOf relationships?
In principle the relationships of a term are useful information and seem pertinent to a term's detail. However, when introducing such changes that add an attribute with zero or more values (in contrast to one value such as for label and definition) one needs to be aware that they can easily break code that uses the API in a way that expects (and in the documentation is promised!) a simple list of single-valued attributes. See phenoscape/rphenoscape#6 and phenoscape/rphenoscape#8 as an example.
The text was updated successfully, but these errors were encountered:
The link to the API endpoint documentation above is obsolete, but at the now current documentation the same problem remain (documentation incorrect in not mentioning relationships), and the subClassOf/is_a are still not being returned.
$ curl -X GET "http://kb.phenoscape.org/api/term?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0011618" -H "accept: application/json"
The Term detail API endpoint at
/api/term
according to documentation returns only a label and a textual definition. In reality this is not true. For one, it also returns the@id
attribute with the term ID (which is a good thing and should be kept, but is counter to documentation).Secondly, it also returns
relationships
. For the example in the docs (basihyal bone), this is the following:Aside from the fact that it is counter to documentation, I'm wondering why it is missing the
is_a
orsubClassOf
relationships?In principle the relationships of a term are useful information and seem pertinent to a term's detail. However, when introducing such changes that add an attribute with zero or more values (in contrast to one value such as for label and definition) one needs to be aware that they can easily break code that uses the API in a way that expects (and in the documentation is promised!) a simple list of single-valued attributes. See phenoscape/rphenoscape#6 and phenoscape/rphenoscape#8 as an example.
The text was updated successfully, but these errors were encountered: