- The OLS4 API should function identically to the OLS3 API. If you find - any cases where the OLS4 API does not function the same as the OLS3 - API, please open an issue on our - - issue tracker. - -
--
-
-
-
- http://www.ebi.ac.uk/ols/api/ontologies -
- ( - before) -
- -
-
- http://www.ebi.ac.uk/ols4/api/ontologies -
- ( - after) -
-
- We are currently in the process of making shiny new documentation - pages, but in the meantime you can refer to the old documentation - below. -
-This API supports the following HTTP verbs.
-- This API tries to adhere as closely as possible to standard HTTP and - REST conventions in its use of HTTP status codes. -
-- Whenever an error response (status code >= 400) is returned, the - body will contain a JSON object that describes the problem. The error - object has the following structure: -
-- For example, a request that attempts to apply a non-existent tag to a - resource will produce a - 400 Bad Request response: -
-- {`HTTP/1.1 404 Not Found -Content-Type: application/json;charset=UTF-8 -Content-Length: 153 -{ - "timestamp" : 1554117059039, - "status" : 404, - "error" : "Not Found", - "message" : "Resource not found", - "path" : "/ols4/api/ontologies/foobar" -}`} --
- This API uses hypermedia and resources include links to other - resources in their responses. Responses are in - - Hypertext Application Language (HAL) - - format. Links can be found beneath the - _links key. Users of the API should - not create URIs themselves, instead they should use the - above-described links to navigate from resource to resource. -
-- Requests that return multiple resources will be paginated to 20 items - by default. You can change the number of items returned using - the size parameter up to a - maximum of 500 for a single request. The API also supports the - page parameter for accessing a - specific page of items. -
-- Links will be provided in the response to navigate the resources. -
-- {`HTTP/1.1 200 OK -Content-Type: application/json -{ - "_links" : { - "first" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies?page=0&size=1" - }, - "prev" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies?page=0&size=1" - }, - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies" - }, - "next" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies?page=2&size=1" - }, - "last" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies?page=140&size=1" - } - }, - "_embedded" : { - ... - }, - "page" : { - "size" : 1, - "totalElements" : 141, - "totalPages" : 141, - "number" : 1 - } -}`} --
- The api endpoint provides the entry point into the service. -
-- A GET request is used to - access the API -
-- {`HTTP/1.1 200 OK -Content-Type: application/json -{ - "_links" : { - "ontologies" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies" - }, - "individuals" : { - "href" : "http://www.ebi.ac.uk/ols4/api/individuals" - }, - "terms" : { - "href" : "http://www.ebi.ac.uk/ols4/api/terms" - }, - "properties" : { - "href" : "http://www.ebi.ac.uk/ols4/api/properties" - }, - "profile" : { - "href" : "http://www.ebi.ac.uk/ols4/api/profile" - } - } -}`} --
- The Ontologies resources is used to list ontologies in OLS -
-- A GET request will list all - of the OLS ontologies. -
-- The response is paginated where the individual ontology resources are - in the _embedded.ontologies - field. -
-
- GET /api/ontologies/{ontology}
-
- - {`HTTP/1.1 200 OK -Content-Type: application/json -Content-Length: 3386 - -{ - "ontologyId" : "efo", - "loaded" : "2019-04-01T10:31:42.870+0000", - "updated" : "2019-04-01T10:31:42.870+0000", - "status" : "LOADED", - "message" : "", - "version" : null, - "numberOfTerms" : 22669, - "numberOfProperties" : 328, - "numberOfIndividuals" : 0, - "config" : { - "id" : "http://www.ebi.ac.uk/efo/efo.owl", - "versionIri" : "http://www.ebi.ac.uk/efo/releases/2019-03-18/efo.owl", - "title" : "Experimental Factor Ontology", - "namespace" : "efo", - "preferredPrefix" : "EFO", - "description" : "The Experimental Factor Ontology (EFO) provides a systematic description of many experimental variables available in EBI databases, and for external projects such as the NHGRI GWAS catalogue. It combines parts of several biological ontologies, such as anatomy, disease and chemical compounds. The scope of EFO is to support the annotation, analysis and visualization of data handled by many groups at the EBI and as the core ontology for the Centre for Therapeutic Validation (CTTV)", - "homepage" : "http://www.ebi.ac.uk/efo", - "version" : "2.106", - "mailingList" : "efo-users@lists.sourceforge.net", - "creators" : [ ], - "annotations" : { - "license" : [ "www.apache.org/licenses/LICENSE-2.0" ], - "creator" : [ "Gautier Koscielny", "Simon Jupp", "Jon Ison", "Laura Huerta Martinez", "Helen Parkinson", "Eleanor Williams", "James Malone", "Zoe May Pendlington", "Trish Whetzel", "Sirarat Sarntivijai", "Catherine Leroy", "Ele Holloway", "Tomasz Adamusiak", "Emma Kate Hastings", "Olamidipupo Ajigboye", "Paola Roncaglia", "Natalja Kurbatova", "Dani Welter", "Drashtti Vasant" ], - "rights" : [ "Copyright [2014] EMBL - European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. " ], - "format-version" : [ "1.4" ], - "comment" : [ "2019-03-18" ] - }, - "fileLocation" : "http://www.ebi.ac.uk/efo/efo.owl", - "reasonerType" : "OWL2", - "oboSlims" : false, - "labelProperty" : "http://www.w3.org/2000/01/rdf-schema#label", - "definitionProperties" : [ "http://www.ebi.ac.uk/efo/definition" ], - "synonymProperties" : [ "http://www.ebi.ac.uk/efo/alternative_term" ], - "hierarchicalProperties" : [ "http://purl.obolibrary.org/obo/RO_0002202", "http://purl.obolibrary.org/obo/BFO_0000050" ], - "baseUris" : [ "http://www.ebi.ac.uk/efo/EFO_" ], - "hiddenProperties" : [ "http://www.ebi.ac.uk/efo/has_flag" ], - "internalMetadataProperties" : [ "http://www.w3.org/2002/07/owl#versionInfo" ], - "skos" : false - }, - "_links" : { - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo" - }, - "terms" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms" - }, - "properties" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/properties" - }, - "individuals" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/individuals" - } - } -}`} --
- GET /api/ontologies/{ontology}/terms/roots
-
- - The terms resources is used to list terms (or classes) in OLS from a - particular ontology -
-
- GET /api/ontologies/{ontology}/terms
-
- - The response is paginated where the individual term resources are in - the _embedded.terms field. -
-
- GET /api/ontologies/{ontology}/terms/{iri}
-
- - {`HTTP/1.1 200 OK -Content-Disposition: inline;filename=f.txt -Content-Type: application/json -Content-Length: 3624 -{ - "iri" : "http://purl.obolibrary.org/obo/GO_0043226", - "label" : "GO_0043226", - "description" : [ "Organized structure of distinctive morphology and function. Includes the nucleus, mitochondria, plastids, vacuoles, vesicles, ribosomes and the cytoskeleton, and prokaryotic structures such as anammoxosomes and pirellulosomes. Excludes the plasma membrane." ], - "annotation" : { - "hasDbXref" : [ "NIF_Subcellular:sao1539965131", "Wikipedia:Organelle" ], - "hasOBONamespace" : [ "cellular_component" ], - "id" : [ "GO:0043226" ] - }, - "synonyms" : null, - "ontology_name" : "go", - "ontology_prefix" : "GO", - "ontology_iri" : "http://purl.obolibrary.org/obo/go.owl", - "is_obsolete" : false, - "term_replaced_by" : null, - "is_defining_ontology" : true, - "has_children" : true, - "is_root" : false, - "short_form" : "GO_0043226", - "obo_id" : "GO:0043226", - "in_subset" : [ "goslim_chembl", "goslim_generic", "goslim_pir" ], - "obo_definition_citation" : [ { - "definition" : "Organized structure of distinctive morphology and function. Includes the nucleus, mitochondria, plastids, vacuoles, vesicles, ribosomes and the cytoskeleton, and prokaryotic structures such as anammoxosomes and pirellulosomes. Excludes the plasma membrane.", - "oboXrefs" : [ { - "database" : "GOC", - "id" : "go_curators", - "description" : null, - "url" : null - } ] - } ], - "obo_xref" : [ { - "database" : "Wikipedia", - "id" : "Organelle", - "description" : null, - "url" : "http://en.wikipedia.org/wiki/Organelle" - }, { - "database" : "NIF_Subcellular", - "id" : "sao1539965131", - "description" : null, - "url" : "http://www.neurolex.org/wiki/sao1539965131" - } ], - "obo_synonym" : null, - "_links" : { - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226" - }, - "parents" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/parents" - }, - "ancestors" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/ancestors" - }, - "hierarchicalParents" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/hierarchicalParents" - }, - "hierarchicalAncestors" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/hierarchicalAncestors" - }, - "jstree" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/jstree" - }, - "children" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/children" - }, - "descendants" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/descendants" - }, - "hierarchicalChildren" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/hierarchicalChildren" - }, - "hierarchicalDescendants" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/hierarchicalDescendants" - }, - "graph" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/graph" - } - } -}`} --
- The RESTful way to retrieve direct parent/child or all parent/child - (ancestors/descendant) terms is to follow the _links URL on a given - term. There are cases where it is convenient to request parent/child - terms for a given term when you only have the URI or short id. For - these cases we have implemented a convenient endpoint for these that - takes a term id as a parameter. There are methods for all parent/child - relationships as documented in the links sections for term resources. -
-
- GET /api/ontologies/{ontology}/parents?id={id}
-
- - {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/parents?id=GO:0043226' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/children?id=GO:0043226' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/ancestors?id=GO:0043226' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/descendants?id=GO:0043226' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/hierarchicalDescendants?id=GO:0043226' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/hierarchicalAncestors?id=GO:0043226' -i -H 'Accept: application/json' -`} --
- {`HTTP/1.1 200 OK -Content-Type: application/json - -{ - "_embedded": { - "terms": [ - { - "iri": "http://purl.obolibrary.org/obo/GO_0110165", - "lang": "en", - "description": [ - "A part of a cellular organism that is either an immaterial entity or a material entity with granularity above the level of a protein complex but below that of an anatomical system. Or, a substance produced by a cellular organism with granularity above the level of a protein complex." - ], - "synonyms": [], - "annotation": { - "created_by": [ - "kmv" - ], - "creation_date": [ - "2019-08-12T18:01:37Z" - ], - "has_obo_namespace": [ - "cellular_component" - ], - "id": [ - "GO:0110165" - ] - }, - "label": "cellular anatomical entity", - "ontology_name": "go", - "ontology_prefix": "GO", - "ontology_iri": "http://purl.obolibrary.org/obo/go/extensions/go-plus.owl", - "is_obsolete": false, - "term_replaced_by": null, - "is_defining_ontology": true, - "has_children": true, - "is_root": false, - "short_form": "GO_0110165", - "obo_id": "GO:0110165", - "in_subset": [ - "goslim_pir" - ], - "obo_definition_citation": [ + process.env.REACT_APP_APIURL && ( + + + + ) + } +-OLS 3 Documentation{ - "definition": "A part of a cellular organism that is either an immaterial entity or a material entity with granularity above the level of a protein complex but below that of an anatomical system. Or, a substance produced by a cellular organism with granularity above the level of a protein complex.", - "oboXrefs": [ - { - "database": "GOC", - "id": "kmv", - "description": null, - "url": null - } - ] + + OLS 3 Documentation + } - ], - "obo_xref": null, - "obo_synonym": null, - "is_preferred_root": false, - "_links": { - "self": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165?lang=en" - }, - "parents": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/parents" - }, - "ancestors": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/ancestors" - }, - "hierarchicalParents": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/hierarchicalParents" - }, - "hierarchicalAncestors": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/hierarchicalAncestors" - }, - "jstree": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/jstree" - }, - "children": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/children" - }, - "descendants": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/descendants" - }, - "hierarchicalChildren": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/hierarchicalChildren" - }, - "hierarchicalDescendants": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/hierarchicalDescendants" - }, - "graph": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0110165/graph" - } - } - } - ] - }, - "_links": { - "self": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/go/parents?id=GO:0043226&page=0&size=20" - } - }, - "page": { - "size": 20, - "totalElements": 1, - "totalPages": 1, - "number": 0 - } -}`} -
- In cases where a term has a direct relation to another term (single - existential to a named class in OBO), for example a "part of" - relation, the related terms can be accessed directly with this API. -
-
- GET /api/ontologies/{ontology_id}/terms/{term_iri}/{property_iri}
-
- - {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/uberon/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0000016/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000050' -i -H 'Accept: application/json'`} --
- It is possible to search for terms across ontologies using the - requests and responses as defined in this section. -
-- {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms?iri=http://www.ebi.ac.uk/efo/EFO_0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms?short_form=EFO_0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms?obo_id=EFO:0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms?id=EFO:0000001' -i -H 'Accept: application/json'`} --
- {`HTTP/1.1 200 OK -Content-Disposition: inline;filename=f.txt -Content-Type: application/json -Content-Length: 3022 - -{ - "_embedded" : { - "terms" : [ { - "iri" : "http://www.ebi.ac.uk/efo/EFO_0000001", - "label" : "EFO_0000001", - "description" : null, - "annotation" : { - "IAO_0000115" : [ "An experimental factor in Array Express which are essentially the variable aspects of an experiment design which can be used to describe an experiment, or set of experiments, in an increasingly detailed manner. This upper level class is really used to give a root class from which applications can rely on and not be tied to upper ontology classses which do change." ], - "IAO_0000117" : [ "Helen Parkinson", "James Malone", "Tomasz Adamusiak", "Jie Zheng" ], - "MO_definition_citation" : [ "MO:10" ], - "bioportal_provenance" : [ "ExperimentalFactor[accessedResource: MO_10][accessDate: 05-04-2011]" ], - "comment" : [ "Concept naming convention is lower case natural naming with spaces, when necessary captials should be used, for example disease factor, HIV, breast carcinoma, Ewing's sarcoma" ], - "created_by" : [ "Helen Parkinson", "James Malone", "Tomasz Adamusiak" ], - "organizational_class" : [ "true" ] - }, - "synonyms" : [ "ExperimentalFactor" ], - "ontology_name" : "efo", - "ontology_prefix" : "EFO", - "ontology_iri" : "http://www.ebi.ac.uk/efo/efo.owl", - "is_obsolete" : false, - "term_replaced_by" : null, - "is_defining_ontology" : true, - "has_children" : true, - "is_root" : true, - "short_form" : "EFO_0000001", - "obo_id" : "EFO:0000001", - "in_subset" : null, - "obo_definition_citation" : null, - "obo_xref" : null, - "obo_synonym" : null, - "_links" : { - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001" - }, - "children" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/children" - }, - "descendants" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/descendants" - }, - "hierarchicalChildren" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/hierarchicalChildren" - }, - "hierarchicalDescendants" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/hierarchicalDescendants" - }, - "graph" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/graph" - } - } - } ] - }, - "_links" : { - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001" - } - }, - "page" : { - "size" : 20, - "totalElements" : 1, - "totalPages" : 1, - "number" : 0 - } -}`} --
- Where users are interested in a particular ontology, they may also be - interested in retrieving only terms from that ontology. The requests - and reponses in this section defines an API for achieving this. -
-- {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms/findByIdAndIsDefiningOntology/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms/findByIdAndIsDefiningOntology?iri=http://www.ebi.ac.uk/efo/EFO_0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms/findByIdAndIsDefiningOntology?short_form=EFO_0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms/findByIdAndIsDefiningOntology?obo_id=EFO:0000001' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/terms/findByIdAndIsDefiningOntology?id=EFO:0000001' -i -H 'Accept: application/json'`} --
- {`HTTP/1.1 200 OK -Content-Disposition: inline;filename=f.txt -Content-Type: application/json -Content-Length: 3052 - -{ - "_embedded" : { - "terms" : [ { - "iri" : "http://www.ebi.ac.uk/efo/EFO_0000001", - "label" : "EFO_0000001", - "description" : null, - "annotation" : { - "IAO_0000115" : [ "An experimental factor in Array Express which are essentially the variable aspects of an experiment design which can be used to describe an experiment, or set of experiments, in an increasingly detailed manner. This upper level class is really used to give a root class from which applications can rely on and not be tied to upper ontology classses which do change." ], - "IAO_0000117" : [ "Helen Parkinson", "James Malone", "Tomasz Adamusiak", "Jie Zheng" ], - "MO_definition_citation" : [ "MO:10" ], - "bioportal_provenance" : [ "ExperimentalFactor[accessedResource: MO_10][accessDate: 05-04-2011]" ], - "comment" : [ "Concept naming convention is lower case natural naming with spaces, when necessary captials should be used, for example disease factor, HIV, breast carcinoma, Ewing's sarcoma" ], - "created_by" : [ "Helen Parkinson", "James Malone", "Tomasz Adamusiak" ], - "organizational_class" : [ "true" ] - }, - "synonyms" : [ "ExperimentalFactor" ], - "ontology_name" : "efo", - "ontology_prefix" : "EFO", - "ontology_iri" : "http://www.ebi.ac.uk/efo/efo.owl", - "is_obsolete" : false, - "term_replaced_by" : null, - "is_defining_ontology" : true, - "has_children" : true, - "is_root" : true, - "short_form" : "EFO_0000001", - "obo_id" : "EFO:0000001", - "in_subset" : null, - "obo_definition_citation" : null, - "obo_xref" : null, - "obo_synonym" : null, - "_links" : { - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001" - }, - "children" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/children" - }, - "descendants" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/descendants" - }, - "hierarchicalChildren" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/hierarchicalChildren" - }, - "hierarchicalDescendants" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/hierarchicalDescendants" - }, - "graph" : { - "href" : "http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001/graph" - } - } - } ] - }, - "_links" : { - "self" : { - "href" : "http://www.ebi.ac.uk/ols4/api/terms/findByIdAndIsDefiningOntology/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000001" - } - }, - "page" : { - "size" : 20, - "totalElements" : 1, - "totalPages" : 1, - "number" : 0 - } -}`} --
- You can access property (relationships) and ontology individuals - (instances) following similar methods to terms. -
-
- GET /api/ontologies/{ontology}/properties/{iri}
-
- - {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/efo/properties/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000050' -i -H 'Accept: application/json'`} --
- {`HTTP/1.1 200 OK -Content-Type: application/json - -{ - "iri": "http://purl.obolibrary.org/obo/BFO_0000050", - "lang": "en", - "description": [ - "a core relation that holds between a part and its whole" - ], - "synonyms": [ - "part of" - ], - "annotation": { - "EFO_URI": [ - "http://www.ebi.ac.uk/efo/part_of" - ], - "alternative label": [ - "part_of" - ], - "editor note": [ - "Everything is part of itself. Any part of any part of a thing is itself part of that thing. Two distinct things cannot be part of each other.", - "Occurrents are not subject to change and so parthood between occurrents holds for all the times that the part exists. Many continuants are subject to change, so parthood between continuants will only hold at certain times, but this is difficult to specify in OWL. See http://purl.obolibrary.org/obo/ro/docs/temporal-semantics/", - "Occurrents are not subject to change and so parthood between occurrents holds for all the times that the part exists. Many continuants are subject to change, so parthood between continuants will only hold at certain times, but this is difficult to specify in OWL. See https://code.google.com/p/obo-relations/wiki/ROAndTime", - "Parthood requires the part and the whole to have compatible classes: only an occurrent can be part of an occurrent; only a process can be part of a process; only a continuant can be part of a continuant; only an independent continuant can be part of an independent continuant; only an immaterial entity can be part of an immaterial entity; only a specifically dependent continuant can be part of a specifically dependent continuant; only a generically dependent continuant can be part of a generically dependent continuant. (This list is not exhaustive.)\\n\\nA continuant cannot be part of an occurrent: use 'participates in'. An occurrent cannot be part of a continuant: use 'has participant'. A material entity cannot be part of an immaterial entity: use 'has location'. A specifically dependent continuant cannot be part of an independent continuant: use 'inheres in'. An independent continuant cannot be part of a specifically dependent continuant: use 'bearer of'." - ], - "editor preferred term": [ - "is part of" - ], - "example of usage": [ - "my brain is part of my body (continuant parthood, two material entities)", - "my stomach cavity is part of my stomach (continuant parthood, immaterial entity is part of material entity)", - "this day is part of this year (occurrent parthood)" - ], - "has_dbxref": [ - "BFO:0000050", - "OBO_REL:part_of" - ], - "has_obo_namespace": [ - "external", - "quality", - "relationship", - "spatial", - "uberon" - ], - "id": [ - "part_of" - ], - "is homeomorphic for": [ - "http://purl.obolibrary.org/obo/BFO_0000002", - "http://purl.obolibrary.org/obo/BFO_0000003", - "http://purl.obolibrary.org/obo/BFO_0000004", - "http://purl.obolibrary.org/obo/BFO_0000017", - "http://purl.obolibrary.org/obo/BFO_0000019", - "http://purl.obolibrary.org/obo/BFO_0000020", - "http://purl.obolibrary.org/obo/BFO_0000031" - ], - "seeAlso": [ - "http://ontologydesignpatterns.org/wiki/Community:Parts_and_Collections", - "http://ontologydesignpatterns.org/wiki/Submissions:PartOf" - ], - "shorthand": [ - "part_of" - ], - "temporal interpretation": [ - "http://purl.obolibrary.org/obo/RO_0001901" - ] - }, - "label": "part of", - "ontology_name": "efo", - "ontology_prefix": "EFO", - "ontology_iri": "http://www.ebi.ac.uk/efo/efo.owl", - "is_obsolete": false, - "is_defining_ontology": false, - "has_children": false, - "is_root": true, - "short_form": "BFO_0000050", - "obo_id": "BFO:0000050", - "_links": { - "self": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/efo/properties/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000050?lang=en" - } - } -}`} --
- Similar to terms, properties can be found based on id. See Term - matching across ontologies. Here we only provide 2 examples: Both - examples retrieve a property based on its IRI. The first illustrates - finding a property where the IRI is specified as part of the path and - the second illustrates finding a property where the IRI is specified - as a parameter. -
-- {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/properties/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000784' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/properties?iri=http://www.ebi.ac.uk/efo/EFO_0000784' -i -H 'Accept: application/json'`} --
- Similar to terms, users may want to only access properties that are - related to a particular ontology. See Terms based on defining - ontology. -
-- {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/properties/findByIdAndIsDefiningOntology/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000784' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/properties/findByIdAndIsDefiningOntology?iri=http://www.ebi.ac.uk/efo/EFO_0000784' -i -H 'Accept: application/json'`} --
- GET /api/ontologies/{ontology}/individuals/{iri}
-
- - {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/iao/individuals/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FIAO_0000002' -i -H 'Accept: application/json'`} --
- {`HTTP/1.1 200 OK -Content-Type: application/json - -{ - "iri": "http://purl.obolibrary.org/obo/IAO_0000002", - "lang": "en", - "description": [], - "synonyms": [], - "annotation": { - "editor preferred term": [ - "example to be eventually removed" - ] - }, - "type": null, - "label": "example to be eventually removed", - "ontology_name": "iao", - "ontology_prefix": "IAO", - "ontology_iri": "http://purl.obolibrary.org/obo/iao.owl", - "is_obsolete": false, - "is_defining_ontology": false, - "has_children": false, - "is_root": false, - "short_form": "IAO_0000002", - "obo_id": "IAO:0000002", - "in_subset": null, - "_links": { - "self": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/iao/individuals/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FIAO_0000002?lang=en" - }, - "types": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/iao/individuals/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FIAO_0000002/types" - }, - "alltypes": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/iao/individuals/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FIAO_0000002/alltypes" - }, - "jstree": { - "href": "https://www.ebi.ac.uk/ols4/api/ontologies/iao/individuals/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FIAO_0000002/jstree" - } - } -}`} --
- Similar to terms, individuals can be found based on id. See Term - matching across ontologies. Here we only provide 2 examples: Both - examples retrieve an individual based on its IRI. The first - illustrates finding an individual where the IRI is specified as part - of the path and the second illustrates finding an individual where the - IRI is specified as a parameter. -
-- {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/individuals/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FIAO_0000125' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/individuals?iri=http://purl.obolibrary.org/obo/IAO_0000125' -i -H 'Accept: application/json'`} --
- Similar to terms, users may want to only access individuals that are - related to a particular ontology. See Terms based on defining - ontology. -
-- {`$ curl -L 'http://www.ebi.ac.uk/ols4/api/individuals/findByIdAndIsDefiningOntology/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0001901' -i -H 'Accept: application/json' -$ curl -L 'http://www.ebi.ac.uk/ols4/api/individuals/findByIdAndIsDefiningOntology?iri=http://purl.obolibrary.org/obo/RO_0001901' -i -H 'Accept: application/json'`} --
- The search API is independent of the REST API and supports free text - search over the ontologies. The default search is across all textual - fields in the ontology, but results are ranked towards hits in labels, - then synonyms, then definitions, then annotations. -
-
- GET /api/search?q={q}
-
- - You can override the fields that are searched by supplying a - queryFields argument. For example, - to query on labels and synonyms use. -
-
- GET /api/search?q={q}&queryFields=label,synonym
-
- - We provide an additional search endopint that is designed specifically - for selecting ontology terms. This has been tuned specifically to - support applications such as autocomplete. -
-
- GET /api/select?ontology={ontology}
-
- - We also provide a generic suggester endpoint. This endpoint aims to - provide traditional autosuggest based on all the vocabulary in OLS - (all class labels or synonyms). All results from this endpoint are - unique and are not coupled to any particular ontology, however, - searches can be restricted by ontology. -
-
- GET /api/suggest?ontology={ontology}
-
-