Difference between revisions of "BioPortal REST services"

From NCBO Wiki
Jump to navigation Jump to search
Line 11: Line 11:
 
* '''Example''': http://rest.bioontology.org/bioportal/ontologies
 
* '''Example''': http://rest.bioontology.org/bioportal/ontologies
  
==  Find a specific ontology based on a version id ==
+
==  Get a specific ontology based on a version id ==
 
* '''Signature''':  ./ontologies/{ontology version id}
 
* '''Signature''':  ./ontologies/{ontology version id}
 
* '''Example''':  http://rest.bioontology.org/bioportal/ontologies/39002
 
* '''Example''':  http://rest.bioontology.org/bioportal/ontologies/39002
Line 20: Line 20:
 
* '''Example''': http://rest.bioontology.org/bioportal/ontologies/download/39002
 
* '''Example''': http://rest.bioontology.org/bioportal/ontologies/download/39002
  
==  Find all versions of an ontology form a virtual ontology id ==
+
==  Get all versions of an ontology form a virtual ontology id ==
 
* '''Signature''': ./ontologies/versions/{ontology id}
 
* '''Signature''': ./ontologies/versions/{ontology id}
 
* '''Example''': http://rest.bioontology.org/bioportal/ontologies/versions/1104
 
* '''Example''': http://rest.bioontology.org/bioportal/ontologies/versions/1104
Line 60: Line 60:
 
=  Hierarchy Services =
 
=  Hierarchy Services =
  
==  Find parents of a given concept in a specific ontology version ==
+
==  Get parents of a given concept in a specific ontology version ==
 
* '''Signature''': ./concepts/parents/{ontlogyVersionId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./concepts/parents/{ontlogyVersionId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/parents/13578/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/parents/13578/Melanoma
Line 102: Line 102:
 
</success>
 
</success>
  
==  Find parents of a given concept in the latest version of a given ontology ==
+
==  Get parents of a given concept in the latest version of a given ontology ==
 
* '''Signature''': ./virtual/parents/{ontlogyId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./virtual/parents/{ontlogyId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/parents/1032/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/parents/1032/Melanoma
Line 144: Line 144:
 
</success>
 
</success>
  
==  Find children of a given concept in a specific ontology version ==
+
==  Get children of a given concept in a specific ontology version ==
 
* '''Signature''': ./concepts/children/{ontlogyVersionId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./concepts/children/{ontlogyVersionId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/children/13578/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/children/13578/Melanoma
Line 184: Line 184:
 
</success>
 
</success>
  
==  Find children of a given concept in the latest version of a given ontology ==
+
==  Get children of a given concept in the latest version of a given ontology ==
 
* '''Signature''': ./virtual/children/{ontlogyId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./virtual/children/{ontlogyId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/children/1032/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/children/1032/Melanoma
Line 224: Line 224:
 
</success>
 
</success>
  
==  Find paths to root from a concept in a specific ontology version ==
+
==  Get paths to root from a concept in a specific ontology version ==
 
* '''Signature''': ./concepts/rootpath/{ontologyVersionId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./concepts/rootpath/{ontologyVersionId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/rootpath/13578/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/rootpath/13578/Melanoma
Line 247: Line 247:
 
<string>Path</string>
 
<string>Path</string>
 
<string>
 
<string>
Findings_and_Disorders_Kind.Diseases_Disorders_and_Findings.Diseases_and_Disorders.Neoplasm.Neoplasm_by_Morphology.Melanocytic_Neoplasm
+
Getings_and_Disorders_Kind.Diseases_Disorders_and_Getings.Diseases_and_Disorders.Neoplasm.Neoplasm_by_Morphology.Melanocytic_Neoplasm
 
</string>
 
</string>
 
</entry>
 
</entry>
Line 259: Line 259:
 
<string>Path</string>
 
<string>Path</string>
 
<string>
 
<string>
Findings_and_Disorders_Kind.Diseases_Disorders_and_Findings.Diseases_and_Disorders.Neoplasm.Neoplasm_by_Special_Category.Common_Neoplasm
+
Getings_and_Disorders_Kind.Diseases_Disorders_and_Getings.Diseases_and_Disorders.Neoplasm.Neoplasm_by_Special_Category.Common_Neoplasm
 
</string>
 
</string>
 
</entry>
 
</entry>
Line 268: Line 268:
 
</success>
 
</success>
  
==  Find paths to root from a concept in the latest version of a given ontology  ==
+
==  Get paths to root from a concept in the latest version of a given ontology  ==
 
* '''Signature''': ./virtual/rootpath/{ontologyId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./virtual/rootpath/{ontologyId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/rootpath/1032/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/rootpath/1032/Melanoma
Line 312: Line 312:
 
</success>
 
</success>
  
==  Find paths to leaves from a concept in a specific ontology version ==
+
==  Get paths to leaves from a concept in a specific ontology version ==
 
* '''Signature''': ./concepts/leafpath/{ontologyVersionId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./concepts/leafpath/{ontologyVersionId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/leafpath/13578/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/leafpath/13578/Melanoma
Line 356: Line 356:
 
</success>
 
</success>
  
==  Find paths to leaves from a concept in the latest version of a given ontology  ==
+
==  Get paths to leaves from a concept in the latest version of a given ontology  ==
 
* '''Signature''': ./virtual/leafpath/{ontologyId}/{conceptId}[?{optional args}]
 
* '''Signature''': ./virtual/leafpath/{ontologyId}/{conceptId}[?{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/leafpath/1032/Melanoma
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/leafpath/1032/Melanoma
Line 396: Line 396:
 
</success>
 
</success>
  
==  Find siblings of a given concept in a specific ontology version ==
+
==  Get siblings of a given concept in a specific ontology version ==
 
* '''Signature''': ./concepts/siblings/{ontlogyVersionId}/{conceptId}?level=<level>[&{optional args}]
 
* '''Signature''': ./concepts/siblings/{ontlogyVersionId}/{conceptId}?level=<level>[&{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/siblings/13578/Melanoma?level=1
 
* '''Example''': http://rest.bioontology.org/bioportal/concepts/siblings/13578/Melanoma?level=1
Line 437: Line 437:
 
</success>
 
</success>
 
   
 
   
==  Find siblings of a given concept in the latest version of a given ontology ==
+
==  Get siblings of a given concept in the latest version of a given ontology ==
 
* '''Signature''': ./virtual/siblings/{ontlogyId}/{conceptId}?level=<level>[&{optional args}]
 
* '''Signature''': ./virtual/siblings/{ontlogyId}/{conceptId}?level=<level>[&{optional args}]
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/siblings/1032/Melanoma?level=1
 
* '''Example''': http://rest.bioontology.org/bioportal/virtual/siblings/1032/Melanoma?level=1

Revision as of 16:01, 21 April 2009

This page documents the signatures for NCBO (and, more specifically, BioPortal) REST services. This list may not be exhaustive.

Note: Signatures for BioPortal services have changed in BioPortal 2.0.4 release on January 13th, 2009. This page has the new service URLs. If you have any questions, please contact BioPortal Support.

The prefix for all service URLs in the table below is http://rest.bioontology.org/bioportal/

Services to access ontologies and ontology versions

List all the latest version of ontologies

Get a specific ontology based on a version id

Download an ontology file

Get all versions of an ontology form a virtual ontology id

Get latest version of an ontology id

List all ontology categories id

Concept services

Get concept id

Get all root concepts for an ontology id

Get concept for latest ontology version id

Search services

Search BioPortal

Hierarchy Services

Get parents of a given concept in a specific ontology version

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/virtual/parents/MSH/C0025202 </accessedResource> <accessDate>2009-04-21 10:55:33.494 PDT</accessDate> <list> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0206769</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0206754</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> </list> </success>

Get parents of a given concept in the latest version of a given ontology

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/concepts/parents/13578/Melanoma </accessedResource> <accessDate>2009-04-21 10:28:43.964 PDT</accessDate> <list> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Common_Neoplasm</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Diseases_and_Disorders</id> <relations> <entry> <string>Level</string> <int>4</int> </entry> </relations> </classBean> </list> </success>

Get children of a given concept in a specific ontology version

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/concepts/children/13578/Melanoma </accessedResource> <accessDate>2009-04-21 11:02:03.238 PDT</accessDate> <list> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Non-Cutaneous_Melanoma</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Recurrent_Melanoma</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> </list> </success>

Get children of a given concept in the latest version of a given ontology

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/virtual/children/MSH/C0025202 </accessedResource> <accessDate>2009-04-21 11:04:26.733 PDT</accessDate> <list> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0149722</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0206735</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> </list> </success>

Get paths to root from a concept in a specific ontology version

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/concepts/rootpath/13578/Melanoma </accessedResource> <accessDate>2009-04-21 11:06:23.439 PDT</accessDate> <list> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Melanoma</id> <relations> <entry> <string>Path</string> <string> Getings_and_Disorders_Kind.Diseases_Disorders_and_Getings.Diseases_and_Disorders.Neoplasm.Neoplasm_by_Morphology.Melanocytic_Neoplasm </string> </entry> </relations> </classBean> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Melanoma</id> <relations> <entry> <string>Path</string> <string> Getings_and_Disorders_Kind.Diseases_Disorders_and_Getings.Diseases_and_Disorders.Neoplasm.Neoplasm_by_Special_Category.Common_Neoplasm </string> </entry> </relations> </classBean> </list> </success>

Get paths to root from a concept in the latest version of a given ontology

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/virtual/rootpath/MSH/C0025202 </accessedResource> <accessDate>2009-04-21 11:08:05.811 PDT</accessDate> <list> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0025202</id> <relations> <entry> <string>Path</string> <string> C1256739.C1256741.C0012674.C0027651.C0027652.C0206769 </string> </entry> </relations> </classBean> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0025202</id> <relations> <entry> <string>Path</string> <string> C1256739.C1256741.C0012674.C0027651.C0027652.C0027658.C0206093.C0206754 </string> </entry> </relations> </classBean> </list> </success>

Get paths to leaves from a concept in a specific ontology version

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/concepts/leafpath/13578/Melanoma </accessedResource> <accessDate>2009-04-21 11:10:04.386 PDT</accessDate> <list> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Melanoma</id> <relations> <entry> <string>Path</string> <string> Regressing_Non-Cutaneous_Melanoma.Regressing_Melanoma </string> </entry> </relations> </classBean> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Melanoma</id> <relations> <entry> <string>Path</string> <string> Regressing_Melanoma_of_the_Skin.Regressing_Melanoma </string> </entry> </relations> </classBean> </list> </success>

Get paths to leaves from a concept in the latest version of a given ontology

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/virtual/leafpath/MSH/C0025202 </accessedResource> <accessDate>2009-04-21 11:11:56.348 PDT</accessDate> <list> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0025202</id> <relations> <entry> <string>Path</string> <string>C0025205</string> </entry> </relations> </classBean> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0025202</id> <relations> <entry> <string>Path</string> <string>C0206735</string> </entry> </relations> </classBean> </list> </success>

Get siblings of a given concept in a specific ontology version

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/concepts/siblings/13578/Melanoma </accessedResource> <accessDate>2009-04-21 11:15:13.427 PDT</accessDate> <list> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Common_Germ_Cell_Neoplasm</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> <classBean> <ontologyVersionId>13578</ontologyVersionId> <id>Common_Hematopoietic_Neoplasm</id> <relations> <entry> <string>Level</string> <int>1</int> </entry> </relations> </classBean> </list> </success>

Get siblings of a given concept in the latest version of a given ontology

<?xml version="1.0" encoding="UTF-8" ?> <success> <accessedResource> /bioportal/virtual/siblings/MSH/C0206093 </accessedResource> <accessDate>2009-04-21 11:30:12.183 PDT</accessDate> <list> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0206720</id> <relations> <entry> <string>Level</string> <int>2</int> </entry> </relations> </classBean> <classBean> <ontologyVersionId>MSH</ontologyVersionId> <id>C0206727</id> <relations> <entry> <string>Level</string> <int>2</int> </entry> </relations> </classBean> </list> </success>