-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTranslatorReasonersAPI.yaml
More file actions
275 lines (275 loc) · 8.6 KB
/
Copy pathTranslatorReasonersAPI.yaml
File metadata and controls
275 lines (275 loc) · 8.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
openapi: 3.0.1
info:
description: OpenAPI for NCATS Biomedical Translator Reasoners
version: 0.9.2
title: OpenAPI for NCATS Biomedical Translator Reasoners
contact:
email: edeutsch@systemsbiology.org
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
termsOfService: "{{url}}"
externalDocs:
description: Documentation for the NCATS Biomedical Translator Reasoners web services
url: 'https://github.com/NCATS-Tangerine/NCATS-ReasonerStdAPI'
tags:
- name: predicates
description: Get supported relationships by source and target
externalDocs:
description: Documentation for the reasoner predicates function
url: 'http://reasonerhost.ncats.io/overview.html#predicates'
- name: query
description: Query reasoner using a predefined question type
externalDocs:
description: Documentation for the reasoner query function
url: 'http://reasonerhost.ncats.io/overview.html#query'
paths:
/predicates:
get:
tags:
- predicates
summary: Get supported relationships by source and target
responses:
'200':
description: Predicates by source and target
content:
application/json:
schema:
description: Source map
type: object
additionalProperties:
description: Target map
type: object
additionalProperties:
description: Array of predicates
type: array
items:
type: string
example:
chemical_substance:
gene:
- directly_interacts_with
- decreases_activity_of
/query:
post:
tags:
- query
summary: Query reasoner via one of several inputs
description: ''
operationId: query
requestBody:
description: Query information to be submitted
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Query'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
'400':
description: Invalid status value
x-swagger-router-controller: swagger_server.controllers.query_controller
components:
schemas:
Query:
x-body-name: request_body
type: object
properties:
message:
$ref: '#/components/schemas/Message'
additionalProperties: true
required:
- message
Message:
type: object
properties:
results:
description: List of all returned potential answers for the query posed
type: array
items:
$ref: '#/components/schemas/Result'
query_graph:
type: object
description: >-
QueryGraph object that contains a serialization of a query in the form
of a graph
$ref: '#/components/schemas/QueryGraph'
knowledge_graph:
type: object
description: >-
KnowledgeGraph object that contains all the nodes and edges referenced
in any of the possible answers to the query OR connection information
for a remote knowledge graph
$ref: '#/components/schemas/KnowledgeGraph'
additionalProperties: true
Result:
type: object
description: One of potentially several results or answers for a query
properties:
node_bindings:
type: object
description: List of QNode-KNode bindings.
additionalProperties:
type: array
items:
$ref: '#/components/schemas/NodeBinding'
edge_bindings:
type: object
description: List of QEdge-KEdge bindings.
additionalProperties:
type: array
items:
$ref: '#/components/schemas/EdgeBinding'
required:
- node_bindings
- edge_bindings
NodeBinding:
type: object
properties:
kg_id:
type: string
description: A knowledge-graph node id, i.e. the `id` of a KNode
required:
- kg_id
EdgeBinding:
type: object
properties:
kg_id:
type: string
description: A knowledge-graph edge id, i.e. the `id` of a KEdge
required:
- kg_id
KnowledgeGraph:
type: object
description: >-
A thought graph associated with this result. This will commonly be a
linear path subgraph from one concept to another, but related items aside
of the path may be included.
properties:
nodes:
type: object
description: List of nodes in the KnowledgeGraph
additionalProperties:
$ref: '#/components/schemas/Node'
edges:
type: object
description: List of edges in the KnowledgeGraph
additionalProperties:
$ref: '#/components/schemas/Edge'
additionalProperties: true
required:
- nodes
- edges
QueryGraph:
type: object
description: >-
A graph intended to be the thought path to be followed by a reasoner to
answer the question. This graph is a representation of a question.
properties:
nodes:
type: object
description: List of nodes in the QueryGraph
additionalProperties:
$ref: '#/components/schemas/QNode'
edges:
type: object
description: List of edges in the QueryGraph
additionalProperties:
$ref: '#/components/schemas/QEdge'
additionalProperties: true
required:
- nodes
- edges
QNode:
type: object
description: A node in the QueryGraph
properties:
curie:
oneOf:
- type: string
- type: array
items:
type: string
example: 'OMIM:603903'
description: CURIE identifier for this node
type:
oneOf:
- $ref: '#/components/schemas/BiolinkEntity'
- type: array
items:
$ref: '#/components/schemas/BiolinkEntity'
additionalProperties: true
QEdge:
type: object
description: An edge in the QueryGraph
properties:
type:
oneOf:
- $ref: '#/components/schemas/BiolinkRelation'
- type: array
items:
$ref: '#/components/schemas/BiolinkRelation'
source_id:
type: string
example: 'https://omim.org/entry/603903'
description: Corresponds to the @id of source node of this edge
target_id:
type: string
example: 'https://www.uniprot.org/uniprot/P00738'
description: Corresponds to the @id of target node of this edge
additionalProperties: true
required:
- source_id
- target_id
Node:
type: object
description: A node in the knowledge graph
properties:
name:
type: string
example: Haptoglobin
description: Formal name of the entity
type:
oneOf:
- type: string
- type: array
items:
$ref: '#/components/schemas/BiolinkEntity'
additionalProperties: true
Edge:
type: object
description: An edge in the thought subgraph linking two nodes
properties:
type:
$ref: '#/components/schemas/BiolinkRelation'
source_id:
type: string
example: 'https://omim.org/entry/603903'
description: Corresponds to the @id of source node of this edge
target_id:
type: string
example: 'https://www.uniprot.org/uniprot/P00738'
description: Corresponds to the @id of target node of this edge
additionalProperties: true
required:
- source_id
- target_id
BiolinkEntity:
description: A subclass of category named_thing (snake_case)
type: string
externalDocs:
description: Biolink model entities
url: https://biolink.github.io/biolink-model/docs/NamedThing.html
example: disease
BiolinkRelation:
description: A relation, i.e. child of related_to (snake_case)
type: string
externalDocs:
description: Biolink model relations
url: https://biolink.github.io/biolink-model/docs/related_to.html
example: affects