diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d3f17d061..6e03fdde5 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -13,6 +13,7 @@ import About from "./pages/About"; import Downloads from "./pages/Downloads"; import Error from "./pages/Error"; import Help from "./pages/Help"; +import OLS3Help from "./pages/OLS3Help"; import Home from "./pages/home/Home"; import OntologiesPage from "./pages/ontologies/OntologiesPage"; import OntologyPage from "./pages/ontologies/OntologyPage"; @@ -76,6 +77,7 @@ class App extends React.Component { /> } /> + } /> } /> } /> diff --git a/frontend/src/pages/Help.tsx b/frontend/src/pages/Help.tsx index 2ebe9d823..075d7ae02 100644 --- a/frontend/src/pages/Help.tsx +++ b/frontend/src/pages/Help.tsx @@ -1,6 +1,6 @@ +import { Source } from "@mui/icons-material"; import { Fragment } from "react"; -import { Banner } from "../components/Banner"; -import DataTable from "../components/DataTable"; +import { Link } from "react-router-dom"; import Header from "../components/Header"; export default function Help() { @@ -9,1622 +9,37 @@ export default function Help() {
+
OLS 4 Documentation
{ - // process.env.REACT_APP_APIURL && ( - // - // - // - // ) - } -
Documentation
-

- 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. - -

- - Migrating to the OLS4 API should be as simple as replacing  - ols with ols4 in the path. For - example, -
    -
  • - - 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. -

-
Overview
-
HTTP verbs
-

This API supports the following HTTP verbs.

- {data.verb}, - }, - { - name: "Usage", - sortable: false, - selector: (data) => {data.usage}, - }, - ]} - data={[ - { - verb: GET, - usage: "Used to retrieve a resource", - }, - ]} - /> -
- HTTP status codes -
-

- This API tries to adhere as closely as possible to standard HTTP and - REST conventions in its use of HTTP status codes. -

- {data.status}, - }, - { - name: "Usage", - sortable: false, - selector: (data) => {data.usage}, - }, - ]} - data={[ - { - status: 200 OK, - usage: "The request completed successfully", - }, - { - status: 400 Bad Request, - usage: - "The request was malformed. The response body will include an error providing further information.", - }, - { - status: 404 Not Found, - usage: "The requested resource did not exist", - }, - ]} - /> -
Errors
-

- 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: -

- - The HTTP error that occurred, e.g.  - Bad Request - - ), - }, - { - path: "message", - type: "String", - description: "A description of the cause of the error", - }, - { - path: "path", - type: "String", - description: "The path to which the request was made", - }, - { - path: "status", - type: "Number", - description: ( - <> - The HTTP status code, e.g.  - 400 - - ), - }, - { - path: "timestamp", - type: "Number", - description: - "The time, in milliseconds, at which the error occurred", - }, - ]} - /> -

- 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"
-}`}
-          
-
-
Hypermedia
-

- 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. -

-
- Listing resources -
-

- 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. -

-
Paging resources
-

- Links will be provided in the response to navigate the resources. -

-
Sample request
- - $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies?page=1&size=1' -i - -
Response structure
- -
Sample response
- -
-            {`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
-  }
-}`}
-          
-
-
Links
- -
Resources
-
API
-

- The api endpoint provides the entry point into the service. -

-
Accessing the API
-

- A GET request is used to - access the API -

-
Sample request
- - $ curl -L 'http://www.ebi.ac.uk/ols4/api/' -i -H 'Accept: - application/json' - -
Response structure
- -
Sample response
- -
-            {`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"
-    }
-  }
-}`}
-          
-
-
Links
- -
Ontologies
-

- The Ontologies resources is used to list ontologies in OLS -

-
Listing ontologies
-

- A GET request will list all - of the OLS ontologies. -

-
Sample request
- - $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies' -i -H 'Accept: - application/json' - -
Response structure
-

- The response is paginated where the individual ontology resources are - in the _embedded.ontologies -  field. -

-
Ontology
-
- Retrieve an ontology -
-
Request structure
- - GET /api/ontologies/{ontology} - - -
Sample request
- - $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/efo' -i -H - 'Accept: application/json' - -
Sample response
- -
-            {`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"
-    }
-  }
-}`}
-          
-
-
Links
- -
Roots terms
-
Request structure
- - GET /api/ontologies/{ontology}/terms/roots - - -
Terms
-

- The terms resources is used to list terms (or classes) in OLS from a - particular ontology -

-
- Listing ontology terms -
-
Request structure
- - GET /api/ontologies/{ontology}/terms - - -
- Request parameters (optional) -
- -
Sample request
- - $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms' -i -H - 'Accept: application/json' - -
Response structure
-

- The response is paginated where the individual term resources are in - the _embedded.terms field. -

-
Term
-
Retrieve a term
-
Request structure
- - GET /api/ontologies/{ontology}/terms/{iri} - - -
Sample request
- - $ curl -L - 'http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226' - -i -H 'Accept: application/json' - -
Sample response
- -
-            {`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"
-    }
-  }
-}`}
-          
-
-
Links
- -
- Parent/child relationships for terms -
-

- 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. -

-
Request structure
- - GET /api/ontologies/{ontology}/parents?id={id} - - -
Sample requests
- -
-            {`$ 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'
-`}
-          
-
-
Sample response
- -
-            {`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 - } -}`} -
-
-
Other related terms
-

- 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. -

-
Request structure
- - GET /api/ontologies/{ontology_id}/terms/{term_iri}/{property_iri} - -
Sample request
- -
-            {`$ 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'`}
-          
-
-
- Term matching across ontologies -
-

- It is possible to search for terms across ontologies using the - requests and responses as defined in this section. -

-
Sample requests
- -
-            {`$ 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'`}
-          
-
-
Sample response
- -
-            {`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
-  }
-}`}
-          
-
-
- Terms based on defining ontology -
-

- 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. -

-
Sample requests
- -
-            {`$ 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'`}
-          
-
-
Sample response
- -
-            {`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
-  }
-}`}
-          
-
-
- Properties and individuals -
-

- You can access property (relationships) and ontology individuals - (instances) following similar methods to terms. -

-
Retrieve a property
-
Request structure
- - GET /api/ontologies/{ontology}/properties/{iri} - - -
Sample request
- -
-            {`$ 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'`}
-          
-
-
Sample response
- -
-            {`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"
-    }
-  }
-}`}
-          
-
-
- Property matching across ontologies -
-

- 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. -

-
Sample requests
- -
-            {`$ 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'`}
-          
-
-
- Properties based on defining ontology -
-

- Similar to terms, users may want to only access properties that are - related to a particular ontology. See Terms based on defining - ontology. -

-
Sample requests
- -
-            {`$ 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'`}
-          
-
-
- Retrieve an individual -
-
Request structure
- - GET /api/ontologies/{ontology}/individuals/{iri} - - -
Sample request
- -
-            {`$ 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'`}
-          
-
-
Sample response
- -
-            {`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"
-    }
-  }
-}`}
-          
-
-
- Individual matching across ontologies -
-

- 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. -

-
Sample requests
- -
-            {`$ 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'`}
-          
-
-
- Individual based on defining ontology -
-

- Similar to terms, users may want to only access individuals that are - related to a particular ontology. See Terms based on defining - ontology. -

-
Sample requests
- -
-            {`$ 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'`}
-          
-
-
Search
-
Search terms
-

- 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. -

-
Request structure
- - 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. -

-
Request structure
- - GET /api/search?q={q}&queryFields=label,synonym - - - Restrict a search to a set of ontologies e.g.  - ontology=uberon,ma - - ), - }, - { - parameter: "type", - description: - "Restrict a search to an entity type, one of {class,property,individual,ontology}", - }, - { - parameter: "slim", - description: - "Restrict a search to an particular set of slims by name", - }, - { - parameter: "fieldList", - description: - "Specifcy the fields to return, the defaults are {iri,label,short_form,obo_id,ontology_name,ontology_prefix,description,type}", - }, - { - parameter: "exact", - description: "Set to true for exact matches", - }, - { - parameter: "groupField", - description: "Set to true to group results by unique id (IRI)", - }, - { - parameter: "obsoletes", - description: - "Set to true to include obsoleted terms in the results", - }, - { - parameter: "local", - description: - "Set to true to only return terms that are in a defining ontology e.g. Only return matches to gene ontology terms in the gene ontology, and exclude ontologies where those terms are also referenced", - }, - { - parameter: "childrenOf", - description: - "You can restrict a search to children of a given term. Supply a list of IRI for the terms that you want to search under", - }, - { - parameter: "allChildrenOf", - description: - "You can restrict a search to all children of a given term. Supply a list of IRI for the terms that you want to search under (subclassOf/is-a plus any hierarchical/transitive properties like 'part of' or 'develops from')", - }, - { - parameter: "rows", - description: "How many results per page", - }, - { - parameter: "start", - description: "The results page number", - }, - ]} - /> -
Select terms
-

- 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. -

-
Request structure
- - GET /api/select?ontology={ontology} - - - Restrict a search to a set of ontologies e.g.  - ontology=uberon,ma - - ), - }, - { - parameter: "type", - description: - "Restrict a search to an entity type, one of {class,property,individual,ontology}", - }, - { - parameter: "slim", - description: - "Restrict a search to an particular set of slims by name", - }, - { - parameter: "fieldList", - description: - "Specifcy the fields to return, the defaults are {iri,label,short_form,obo_id,ontology_name,ontology_prefix,description,type}", - }, - { - parameter: "obsoletes", - description: - "Set to true to include obsoleted terms in the results", - }, - { - parameter: "local", - description: - "Set to true to only return terms that are in a defining ontology e.g. Only return matches to gene ontology terms in the gene ontology, and exclude ontologies where those terms are also referenced", - }, - { - parameter: "childrenOf", - description: - "You can restrict a search to all children of a given term. Supply a list of IRI for the terms that you want to search under (subclassOf/is-a relation only)", - }, - { - parameter: "allChildrenOf", - description: - "You can restrict a search to all children of a given term. Supply a list of IRI for the terms that you want to search under (subclassOf/is-a plus any hierarchical/transitive properties like 'part of' or 'develops from')", - }, - { - parameter: "rows", - description: "How many results per page", - }, - { - parameter: "start", - description: "The results page number", - }, - ]} - /> -
Suggest terms
-

- 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. -

-
Request structure
- - GET /api/suggest?ontology={ontology} - - - Restrict a search to a set of ontologies e.g.  - ontology=uberon,ma - - ), - }, - { - parameter: "rows", - description: "How many results per page", - }, - { - parameter: "start", - description: "The results page number", - }, - ]} - />
); } -const columnsPathTypeDesc = [ - { - name: "Path", - sortable: false, - selector: (data: any) => {data.path}, - }, - { - name: "Type", - sortable: false, - selector: (data: any) => {data.type}, - }, - { - name: "Description", - sortable: false, - selector: (data: any) => {data.description}, - }, -]; - -const columnsRelDesc = [ - { - name: "Relation", - sortable: false, - selector: (data: any) => {data.relation}, - }, - { - name: "Description", - sortable: false, - selector: (data: any) => {data.description}, - }, -]; - -const columnsParamDesc = [ - { - name: "Parameter", - sortable: false, - selector: (data: any) => {data.parameter}, - }, - { - name: "Description", - sortable: false, - selector: (data: any) => {data.description}, - }, -]; diff --git a/frontend/src/pages/OLS3Help.tsx b/frontend/src/pages/OLS3Help.tsx new file mode 100644 index 000000000..421c9022a --- /dev/null +++ b/frontend/src/pages/OLS3Help.tsx @@ -0,0 +1,1590 @@ +import { Source } from "@mui/icons-material"; +import { Fragment } from "react"; +import { Link } from "react-router-dom"; +import { Banner } from "../components/Banner"; +import DataTable from "../components/DataTable"; +import Header from "../components/Header"; + +export default function OLS3Help() { + document.title = "Ontology Lookup Service (OLS)"; + return ( + +
+
+
Documentation
+

+ 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. + +

+
Overview
+
HTTP verbs
+

This API supports the following HTTP verbs.

+ {data.verb}, + }, + { + name: "Usage", + sortable: false, + selector: (data) => {data.usage}, + }, + ]} + data={[ + { + verb: GET, + usage: "Used to retrieve a resource", + }, + ]} + /> +
+ HTTP status codes +
+

+ This API tries to adhere as closely as possible to standard HTTP and + REST conventions in its use of HTTP status codes. +

+ {data.status}, + }, + { + name: "Usage", + sortable: false, + selector: (data) => {data.usage}, + }, + ]} + data={[ + { + status: 200 OK, + usage: "The request completed successfully", + }, + { + status: 400 Bad Request, + usage: + "The request was malformed. The response body will include an error providing further information.", + }, + { + status: 404 Not Found, + usage: "The requested resource did not exist", + }, + ]} + /> +
Errors
+

+ 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: +

+ + The HTTP error that occurred, e.g.  + Bad Request + + ), + }, + { + path: "message", + type: "String", + description: "A description of the cause of the error", + }, + { + path: "path", + type: "String", + description: "The path to which the request was made", + }, + { + path: "status", + type: "Number", + description: ( + <> + The HTTP status code, e.g.  + 400 + + ), + }, + { + path: "timestamp", + type: "Number", + description: + "The time, in milliseconds, at which the error occurred", + }, + ]} + /> +

+ 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"
+}`}
+          
+
+
Hypermedia
+

+ 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. +

+
+ Listing resources +
+

+ 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. +

+
Paging resources
+

+ Links will be provided in the response to navigate the resources. +

+
Sample request
+ + $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies?page=1&size=1' -i + +
Response structure
+ +
Sample response
+ +
+            {`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
+  }
+}`}
+          
+
+
Links
+ +
Resources
+
API
+

+ The api endpoint provides the entry point into the service. +

+
Accessing the API
+

+ A GET request is used to + access the API +

+
Sample request
+ + $ curl -L 'http://www.ebi.ac.uk/ols4/api/' -i -H 'Accept: + application/json' + +
Response structure
+ +
Sample response
+ +
+            {`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"
+    }
+  }
+}`}
+          
+
+
Links
+ +
Ontologies
+

+ The Ontologies resources is used to list ontologies in OLS +

+
Listing ontologies
+

+ A GET request will list all + of the OLS ontologies. +

+
Sample request
+ + $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies' -i -H 'Accept: + application/json' + +
Response structure
+

+ The response is paginated where the individual ontology resources are + in the _embedded.ontologies +  field. +

+
Ontology
+
+ Retrieve an ontology +
+
Request structure
+ + GET /api/ontologies/{ontology} + + +
Sample request
+ + $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/efo' -i -H + 'Accept: application/json' + +
Sample response
+ +
+            {`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"
+    }
+  }
+}`}
+          
+
+
Links
+ +
Roots terms
+
Request structure
+ + GET /api/ontologies/{ontology}/terms/roots + + +
Terms
+

+ The terms resources is used to list terms (or classes) in OLS from a + particular ontology +

+
+ Listing ontology terms +
+
Request structure
+ + GET /api/ontologies/{ontology}/terms + + +
+ Request parameters (optional) +
+ +
Sample request
+ + $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/efo/terms' -i -H + 'Accept: application/json' + +
Response structure
+

+ The response is paginated where the individual term resources are in + the _embedded.terms field. +

+
Term
+
Retrieve a term
+
Request structure
+ + GET /api/ontologies/{ontology}/terms/{iri} + + +
Sample request
+ + $ curl -L + 'http://www.ebi.ac.uk/ols4/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226' + -i -H 'Accept: application/json' + +
Sample response
+ +
+            {`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"
+    }
+  }
+}`}
+          
+
+
Links
+ +
+ Parent/child relationships for terms +
+

+ 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. +

+
Request structure
+ + GET /api/ontologies/{ontology}/parents?id={id} + + +
Sample requests
+ +
+            {`$ 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'
+`}
+          
+
+
Sample response
+ +
+            {`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": [
+          {
+            "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
+              }
+            ]
+          }
+        ],
+        "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
+  }
+}`}
+          
+
+
Other related terms
+

+ 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. +

+
Request structure
+ + GET /api/ontologies/{ontology_id}/terms/{term_iri}/{property_iri} + +
Sample request
+ +
+            {`$ 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'`}
+          
+
+
+ Term matching across ontologies +
+

+ It is possible to search for terms across ontologies using the + requests and responses as defined in this section. +

+
Sample requests
+ +
+            {`$ 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'`}
+          
+
+
Sample response
+ +
+            {`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
+  }
+}`}
+          
+
+
+ Terms based on defining ontology +
+

+ 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. +

+
Sample requests
+ +
+            {`$ 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'`}
+          
+
+
Sample response
+ +
+            {`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
+  }
+}`}
+          
+
+
+ Properties and individuals +
+

+ You can access property (relationships) and ontology individuals + (instances) following similar methods to terms. +

+
Retrieve a property
+
Request structure
+ + GET /api/ontologies/{ontology}/properties/{iri} + + +
Sample request
+ +
+            {`$ 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'`}
+          
+
+
Sample response
+ +
+            {`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"
+    }
+  }
+}`}
+          
+
+
+ Property matching across ontologies +
+

+ 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. +

+
Sample requests
+ +
+            {`$ 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'`}
+          
+
+
+ Properties based on defining ontology +
+

+ Similar to terms, users may want to only access properties that are + related to a particular ontology. See Terms based on defining + ontology. +

+
Sample requests
+ +
+            {`$ 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'`}
+          
+
+
+ Retrieve an individual +
+
Request structure
+ + GET /api/ontologies/{ontology}/individuals/{iri} + + +
Sample request
+ +
+            {`$ 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'`}
+          
+
+
Sample response
+ +
+            {`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"
+    }
+  }
+}`}
+          
+
+
+ Individual matching across ontologies +
+

+ 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. +

+
Sample requests
+ +
+            {`$ 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'`}
+          
+
+
+ Individual based on defining ontology +
+

+ Similar to terms, users may want to only access individuals that are + related to a particular ontology. See Terms based on defining + ontology. +

+
Sample requests
+ +
+            {`$ 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'`}
+          
+
+
Search
+
Search terms
+

+ 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. +

+
Request structure
+ + 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. +

+
Request structure
+ + GET /api/search?q={q}&queryFields=label,synonym + + + Restrict a search to a set of ontologies e.g.  + ontology=uberon,ma + + ), + }, + { + parameter: "type", + description: + "Restrict a search to an entity type, one of {class,property,individual,ontology}", + }, + { + parameter: "slim", + description: + "Restrict a search to an particular set of slims by name", + }, + { + parameter: "fieldList", + description: + "Specifcy the fields to return, the defaults are {iri,label,short_form,obo_id,ontology_name,ontology_prefix,description,type}", + }, + { + parameter: "exact", + description: "Set to true for exact matches", + }, + { + parameter: "groupField", + description: "Set to true to group results by unique id (IRI)", + }, + { + parameter: "obsoletes", + description: + "Set to true to include obsoleted terms in the results", + }, + { + parameter: "local", + description: + "Set to true to only return terms that are in a defining ontology e.g. Only return matches to gene ontology terms in the gene ontology, and exclude ontologies where those terms are also referenced", + }, + { + parameter: "childrenOf", + description: + "You can restrict a search to children of a given term. Supply a list of IRI for the terms that you want to search under", + }, + { + parameter: "allChildrenOf", + description: + "You can restrict a search to all children of a given term. Supply a list of IRI for the terms that you want to search under (subclassOf/is-a plus any hierarchical/transitive properties like 'part of' or 'develops from')", + }, + { + parameter: "rows", + description: "How many results per page", + }, + { + parameter: "start", + description: "The results page number", + }, + ]} + /> +
Select terms
+

+ 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. +

+
Request structure
+ + GET /api/select?ontology={ontology} + + + Restrict a search to a set of ontologies e.g.  + ontology=uberon,ma + + ), + }, + { + parameter: "type", + description: + "Restrict a search to an entity type, one of {class,property,individual,ontology}", + }, + { + parameter: "slim", + description: + "Restrict a search to an particular set of slims by name", + }, + { + parameter: "fieldList", + description: + "Specifcy the fields to return, the defaults are {iri,label,short_form,obo_id,ontology_name,ontology_prefix,description,type}", + }, + { + parameter: "obsoletes", + description: + "Set to true to include obsoleted terms in the results", + }, + { + parameter: "local", + description: + "Set to true to only return terms that are in a defining ontology e.g. Only return matches to gene ontology terms in the gene ontology, and exclude ontologies where those terms are also referenced", + }, + { + parameter: "childrenOf", + description: + "You can restrict a search to all children of a given term. Supply a list of IRI for the terms that you want to search under (subclassOf/is-a relation only)", + }, + { + parameter: "allChildrenOf", + description: + "You can restrict a search to all children of a given term. Supply a list of IRI for the terms that you want to search under (subclassOf/is-a plus any hierarchical/transitive properties like 'part of' or 'develops from')", + }, + { + parameter: "rows", + description: "How many results per page", + }, + { + parameter: "start", + description: "The results page number", + }, + ]} + /> +
Suggest terms
+

+ 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. +

+
Request structure
+ + GET /api/suggest?ontology={ontology} + + + Restrict a search to a set of ontologies e.g.  + ontology=uberon,ma + + ), + }, + { + parameter: "rows", + description: "How many results per page", + }, + { + parameter: "start", + description: "The results page number", + }, + ]} + /> +
+ + ); +} + +const columnsPathTypeDesc = [ + { + name: "Path", + sortable: false, + selector: (data: any) => {data.path}, + }, + { + name: "Type", + sortable: false, + selector: (data: any) => {data.type}, + }, + { + name: "Description", + sortable: false, + selector: (data: any) => {data.description}, + }, +]; + +const columnsRelDesc = [ + { + name: "Relation", + sortable: false, + selector: (data: any) => {data.relation}, + }, + { + name: "Description", + sortable: false, + selector: (data: any) => {data.description}, + }, +]; + +const columnsParamDesc = [ + { + name: "Parameter", + sortable: false, + selector: (data: any) => {data.parameter}, + }, + { + name: "Description", + sortable: false, + selector: (data: any) => {data.description}, + }, +];