-
Notifications
You must be signed in to change notification settings - Fork 24
/
smartapi.yml
195 lines (192 loc) · 6.22 KB
/
smartapi.yml
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
openapi: 3.0.3
info:
contact:
email: [email protected]
name: Mark Williams, Shervin Abdollahi
url: https://github.com/NCATSTranslator/Relay
x-role: responsible developer
description: A TRAPI/Reasoner Standard API for Autonomous Relay System (ARS)
termsOfService: "https://github.com/NCATSTranslator/Relay/blob/master/LICENSE"
title: Autonomous Relay System (ARS) TRAPI
version: 1.0.0
x-trapi:
version: 1.5.0
asyncquery: false
operations:
- lookup
x-translator:
infores: "infores:ars"
biolink-version: "3.1.1"
component: ARS
team:
- Link Brokers
servers:
## ITRB Production and Test are deployed manually, based on the staging instance
## ITRB CI / staging is basically deployed manually, from main branches
## - automatic for updates in ARS-trapi-workspace main branch, but those rarely happen
## - we could technically control what branches are used (but right now we don't do this)
## non-ITRB dev: total manual control on updates (what branches of modules are used for updates)
- url: https://ars-prod.transltr.io
description: ITRB Production server
x-maturity: production
- url: https://ars.test.transltr.io
description: ITRB Test server
x-maturity: testing
- url: https://ars.ci.transltr.io/
description: ITRB CI server
x-maturity: staging
- url: https://ars-dev.transltr.io
description: Non-ITRB dev (internal use)
x-maturity: development
tags:
- name: 1.3.0
- name: translator
- name: trapi
paths:
#submit endpoint
/ars/api/submit:
post:
tags:
- Submit
summary: Initiate a TRAPI-format query to ARS and wait to receive a Response
requestBody:
description: Query information to be submitted
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Query'
example:
message:
query_graph:
nodes:
n0:
ids:
- "MONDO:0021117"
categories:
- "biolink:Disease"
n1:
categories:
- "biolink:NamedThing"
edges:
e1:
subject: "n0"
object: "n1"
predicates: ["biolink:risk_affected_by"]
responses:
'201':
description: >-
The initial json response back from submitting the query.
content:
application/json:
schema:
type: string
## agents endpoint
/ars/api/agents:
get:
tags:
- Agents
summary: list all the available agents
responses:
'200':
description: >-
Returns a list of all available agents with the following properties: name, uri, description, contact. registered, updated
## acotrs endpoint
/ars/api/actors:
get:
tags:
- Actors
summary: list all the available actors
responses:
'200':
description: >-
Returns a list of all available actors with the following properties: name, channel, agent, urlRemote, path, active
## messages endpoint
/ars/api/messages/{UUID}:
get:
tags:
- Messages
summary: This endpoint will show the response json from all individual ARAs
parameters:
- description: pk string value received from the initial query response
in: path
name: UUID
required: true
example: "7a0713fb-550b-462e-bde7-18a9de4ccfad"
schema:
type: string
- description: tracing children responses
in: query
name: trace
example: y
schema:
type: string
responses:
'200':
description: >-
Returns a TRAPI-compliant meta-knowledge-graph representation for one KP team's SmartAPI KP APIs (that have x-bte annotation
## filter endpoint
/ars/api/filter/{UUID}:
get:
tags:
- Filters
summary: This endpoint will perform the following filtering on the returned results >- ['hop', 'score', 'node_type', 'spec_node']
parameters:
- description: pk string value to perform the filtering on
in: path
name: UUID
required: true
example: "df1869b5-1be2-49a7-9b5a-88166edfbb78"
schema:
type: string
- name: hop
description: hop level filter
in: query
required: false
example: 3
schema:
type: integer
- name: score
description: score filter i.e. [20,80]
in: query
required: false
schema:
type: string
explode: false
style: form
allowReserved: true
- name: node_type
description: specific node category filter i.e. ['ChemicalEntity','BiologicalEntity']
in: query
required: false
schema:
type: string
explode: false
style: form
allowReserved: true
- name: spec_node
description: specific node curie filter i.e. ['MONDO:0037747','UMLS:C0037937']
in: query
required: false
schema:
type: string
explode: false
style: form
allowReserved: true
responses:
'200':
description: >-
Returns a TRAPI-compliant meta-knowledge-graph representation for one KP team's SmartAPI KP APIs (that have x-bte annotation
components:
schemas:
Query:
description: >-
The Query class is used to package a user request for information. A
Query object consists of a required Message object with optional
additional properties. Additional properties are intended to convey
implementation-specific or query-independent parameters. For example,
an additional property specifying a log level could allow a user to
override the default log level in order to receive more fine-grained
log information when debugging an issue.
x-body-name: request_body
type: object