Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] BioPortal 4.0: How to efficiently query classes and their superclasses

Paul R Alexander palexander at
Tue Oct 1 10:55:09 PDT 2013


If you request the classes call with the attribute `parents` included, you will get back parent classes. This can cause the output to explode if you are working with an ontology that assigns many parents to single classes.

Here is an example:

You can add other attributes of interest in the `include` parameter as well (prefLabel, for example).

If adding `include=all` to your request does not increase the amount of content you see, then it is likely a bug. Typically, we try to provide information we think users would like to see and oftentimes what is hidden is data used for internal NCBO processing.

I'm glad you like working with the system. Ease of use and clarity for developers was one of our overarching goals for BioPortal 4.


On Oct 1, 2013, at 2:41 AM, Erik Fäßler <erik.faessler at> wrote:

> Dear all,
> before BioPortal 4.0 went available, I was working with the BioPortal SPARQL endpoint to retrieve classes together with their superclasses to be able to store the taxonomical graph. This was done simply be the respective SPARQL query where I could query the classIri and the superClassIri, so I always knew which class had which super class(es).
> With the new API, I'm not sure how to do that in an efficient manner. That is, I see how I can get all classes of an ontology quite easily and I also see the link to the parents. But since it is only a link, I would have to issue a new HTTP query for each class in the ontology. This will take some time and cause load for the HTTP server on side of BioPortal.
> Thus I'd like to ask whether there is a more concise method of getting classes and their respective super classes.
> Beside of this, I'd like to thank you very much for the new API, it is very clear and easy to use. Especially if you have to learn SPARQL first when using the SPARQL endpoint ;-)
> Only thing that occurred to me with the new API is that the documentation says there would be default attributes which would be given and if one wanted to get all attributes, one had to define this separately. It seems, however, that I always get all attributes without asking for them. This can easily be seen when clicking on the example links in the documentation. But also when querying programmatically without setting any header (other than the API key) and without setting any REST parameters, I always retrieve all attributes in the responses.
> Best regards,
> 	Erik
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at

More information about the bioontology-support mailing list