Skip to content

Commit

Permalink
Merge pull request #532 from EBISPOT/issue-527
Browse files Browse the repository at this point in the history
issue-527: add sample responses
  • Loading branch information
serjoshua authored Oct 3, 2023
2 parents 36a3bb2 + 132d5c9 commit 46dd167
Showing 1 changed file with 267 additions and 10 deletions.
277 changes: 267 additions & 10 deletions frontend/src/pages/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ Content-Type: application/json
 field.
</p>
<div className="text-xl text-petrol-600 font-bold my-3">Ontology</div>
<div className="text-xl font-bold italic my-3">Retrieve an ontology</div>
<div className="text-xl font-bold italic my-3">
Retrieve an ontology
</div>
<div className="text-lg text-petrol-600 my-3">Request structure</div>
<code className="break-words">
GET&nbsp;/api/ontologies/&#123;ontology&#125;
Expand Down Expand Up @@ -546,7 +548,9 @@ Content-Length: 3386
The terms resources is used to list terms (or classes) in OLS from a
particular ontology
</p>
<div className="text-xl font-bold italic my-3">Listing ontology terms</div>
<div className="text-xl font-bold italic my-3">
Listing ontology terms
</div>
<div className="text-lg text-petrol-600 my-3">Request structure</div>
<code className="break-words">
GET&nbsp;/api/ontologies/&#123;ontology&#125;/terms
Expand Down Expand Up @@ -805,6 +809,118 @@ $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/hierarchicalAncestors?id=
`}
</pre>
</Banner>
<div className="text-lg text-petrol-600 my-3">Sample response</div>
<Banner type="code">
<pre>
{`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
}
}`}
</pre>
</Banner>
<div className="text-xl font-bold italic my-3">Other related terms</div>
<p className="mb-2">
In cases where a term has a direct relation to another term (single
Expand All @@ -815,7 +931,7 @@ $ curl -L 'http://www.ebi.ac.uk/ols4/api/ontologies/go/hierarchicalAncestors?id=
<code className="break-words">
GET&nbsp;/api/ontologies/&#123;ontology_id&#125;/terms/&#123;term_iri&#125;/&#123;property_iri&#125;
</code>
<div className="text-lg text-petrol-600 my-3">Sample requests</div>
<div className="text-lg text-petrol-600 my-3">Sample request</div>
<Banner type="code">
<pre>
{`$ 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'`}
Expand Down Expand Up @@ -1030,6 +1146,100 @@ Content-Length: 3052
},
]}
/>
<div className="text-lg text-petrol-600 my-3">Sample request</div>
<Banner type="code">
<pre>
{`$ 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'`}
</pre>
</Banner>
<div className="text-lg text-petrol-600 my-3">Sample response</div>
<Banner type="code">
<pre>
{`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"
}
}
}`}
</pre>
</Banner>
<div className="text-xl font-bold italic my-3">
Property matching across ontologies
</div>
Expand Down Expand Up @@ -1063,17 +1273,13 @@ $ curl -L 'http://www.ebi.ac.uk/ols4/api/properties?iri=http://www.ebi.ac.uk/efo
$ 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'`}
</pre>
</Banner>
<div className="text-xl font-bold italic my-3">Retrieve an individual</div>
<div className="text-xl font-bold italic my-3">
Retrieve an individual
</div>
<div className="text-lg text-petrol-600 my-3">Request structure</div>
<code className="break-words">
GET&nbsp;/api/ontologies/&#123;ontology&#125;/individuals/&#123;iri&#125;
</code>
<div className="text-lg text-petrol-600 my-3">Sample requests</div>
<Banner type="code">
<pre>
{`$ 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'`}
</pre>
</Banner>
<DataTable
columns={columnsParamDesc}
data={[
Expand All @@ -1088,6 +1294,57 @@ $ curl -L 'http://www.ebi.ac.uk/ols4/api/properties/findByIdAndIsDefiningOntolog
},
]}
/>
<div className="text-lg text-petrol-600 my-3">Sample request</div>
<Banner type="code">
<pre>
{`$ 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'`}
</pre>
</Banner>
<div className="text-lg text-petrol-600 my-3">Sample response</div>
<Banner type="code">
<pre>
{`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"
}
}
}`}
</pre>
</Banner>
<div className="text-xl font-bold italic my-3">
Individual matching across ontologies
</div>
Expand Down

0 comments on commit 46dd167

Please sign in to comment.