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] Question on API

Michael Dorf mdorf at stanford.edu
Wed Sep 25 10:42:37 PDT 2019


Hi Joseph,

Thanks for contacting us. You can use the Classes REST service to extract the info you need. You’ll need to call this service within an iterator, incrementing the parameter “page” on every pass until the response includes an empty array inside the “collection” attribute. BioPortal has a set of eight “BioPortal standard properties" that we attempt to populate for each class, regardless of the type of ontology (OWL vs OBO vs SKOS). The set of standard properties are:

ID
Preferred Name
Synonyms
Definitions
CUI
Semantic Types
Obsolete
Parents

If you need anything other than these eight, the directive “display=properties” will give you the full “unmapped” collection of the key-value pairs of all attributes and values for a given class. Here is the call you will need to make (you need to add “apikey=your_api_key” as an additional parameter:

http://data.bioontology.org/ontologies/CPT/classes?page=1&display=prefLabel,synonym,definition,cui,semanticType,obsolete,properties

We have a number of sample code examples in various programming languages located here:

https://github.com/ncbo/ncbo_rest_sample_code

Thanks and let us know if you require further assistance.

Michael





----------------------------------------------------
Michael Dorf
Chief Software Architect
The National Center for Biomedical Ontology
Stanford Biomedical Informatics Research
mdorf at stanford.edu<mailto:mdorf at stanford.edu>
O: 650-723-0357
M: 650-995-4374
----------------------------------------------------


On Sep 25, 2019, at 1:05 AM, Joseph Chiang <outlook_7BFD4CB7316257C7 at outlook.com<mailto:outlook_7BFD4CB7316257C7 at outlook.com>> wrote:

Dear Sir/Madam,

I am new to your API.
Is there a way to extract all the classes for a given ontology like CPT.  I need a way to extract ‘Preferred Name, Synonyms, ID, altLabel’  from all classes under a given ontology like CPT.

I don’t see a method to extract all classes unless I have to start from root and traverse each child to get the info.

A sample code will be cool.

Thanks
Joe

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

_______________________________________________
bioontology-support mailing list
bioontology-support at lists.stanford.edu<mailto:bioontology-support at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20190925/53f19394/attachment-0001.html>


More information about the bioontology-support mailing list