This repository was archived by the owner on Aug 27, 2024. It is now read-only.
generated from VEuPathDB/example-async-compute-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.raml
445 lines (414 loc) · 11.8 KB
/
api.raml
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
#%RAML 1.0 Extension
extends: https://raw.githubusercontent.com/VEuPathDB/docs-api-schema/v2.0.2/libraries/base-service.raml
title: Example Async JaxRS Container Service
version: 1.0.0
mediaType: application/json
uses:
error: https://raw.githubusercontent.com/VEuPathDB/docs-api-schema/v2.0.2/libraries/errors.raml
lib: schema/library.raml
#
# Top-level endpoint returns list of compute options and serves as a parent to plugin endpoints
#
/computes:
displayName: Available Plugins
get:
responses:
200:
body:
application/json:
type: array
items:
type: lib.PluginOverview
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Begin Plugin Endpoint Definitions #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
/example:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.ExamplePluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/{file}:
uriParameters:
file:
type: string
description: MUST be one of "meta", "tabular", "statistics".
post:
body:
application/json: lib.ExamplePluginRequest
responses:
200:
body:
text/plain: any
/betadiv:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.BetaDivPluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/{file}:
uriParameters:
file:
type: string
description: MUST be one of "meta", "tabular", "statistics".
post:
body:
application/json: lib.BetaDivPluginRequest
responses:
200:
body:
text/plain: any
/alphadiv:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.AlphaDivPluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/{file}:
uriParameters:
file:
type: string
description: MUST be one of "meta", "tabular", "statistics".
post:
body:
application/json: lib.AlphaDivPluginRequest
responses:
200:
body:
text/plain: any
/rankedabundance:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.RankedAbundancePluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/{file}:
uriParameters:
file:
type: string
description: MUST be one of "meta", "tabular", "statistics".
post:
body:
application/json: lib.RankedAbundancePluginRequest
responses:
200:
body:
text/plain: any
/differentialabundance:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.DifferentialAbundancePluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/statistics:
post:
body:
application/json: lib.DifferentialAbundancePluginRequest
responses:
200:
body:
application/json: lib.DifferentialAbundanceStatsResponse
/correlationassayassay:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.CorrelationAssayAssayPluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/statistics:
post:
body:
application/json: lib.CorrelationAssayAssayPluginRequest
responses:
200:
body:
application/json: lib.CorrelationStatsResponse
/correlationassaymetadata:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.CorrelationAssayMetadataPluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/statistics:
post:
body:
application/json: lib.CorrelationAssayMetadataPluginRequest
responses:
200:
body:
application/json: lib.CorrelationStatsResponse
/correlationassayself:
post:
queryParameters:
autostart:
type: boolean
required: false
default: true
body:
application/json: lib.CorrelationAssaySelfPluginRequest
responses:
200:
body:
application/json: lib.JobResponse
/statistics:
post:
body:
application/json: lib.CorrelationAssaySelfPluginRequest
responses:
200:
body:
application/json: lib.CorrelationStatsResponse
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# End Plugin Endpoint Definitions #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
/expire-compute-jobs:
get:
description: Expire jobs based on criteria
queryParameters:
job-id:
type: string
study-id:
type: string
plugin-name:
type: string
admin-auth-token:
type: string
responses:
200:
body:
application/json:
type: lib.ExpiredJobsResponse
/internal-jobs:
get:
responses:
200:
body:
application/json:
type: lib.InternalJob[]
/{job-id}:
uriParameters:
job-id:
type: string
minLength: 32
maxLength: 32
pattern: '^[\dA-Fa-f]{32}$'
get:
responses:
200:
description: |
Success
The target job exists and its status returned.
body:
application/json:
type: lib.InternalJob
# NOTE: jobs endpoint is NOT publicly exposed for this service
/jobs:
/{job-id}:
uriParameters:
job-id:
type: string
minLength: 32
maxLength: 32
pattern: '^[\dA-Fa-f]{32}$'
delete:
description: Deletes a target job by ID
responses:
204:
description: Success
404:
description: Not Found
body:
application/json:
type: error.NotFoundError
500:
description: Server Error
body:
application/json:
type: error.ServerError
get:
description: Gets the status of the target job.
responses:
200:
description: |
Success
The target job exists and its status returned.
body:
application/json:
type: lib.JobResponse
examples:
queued:
strict: true
value:
jobID: 9ab9a5886d6abb9ebc82a40f770a1db3
status: queued
queuePosition: 3
in-progress:
strict: true
value:
jobID: 9ab9a5886d6abb9ebc82a40f770a1db3
status: in-progress
complete:
strict: true
value:
jobID: 9ab9a5886d6abb9ebc82a40f770a1db3
status: complete
failed:
strict: true
value:
jobID: 9ab9a5886d6abb9ebc82a40f770a1db3
status: failed
expired:
strict: true
value:
jobID: 9ab9a5886d6abb9ebc82a40f770a1db3
status: expired
404:
description: |
Not Found
The target `{job-id}` was not found.
body:
application/json:
type: error.NotFoundError
500:
description: |
Internal Server Error
An unexpected exception was thrown while attempting to process
the request.
body:
application/json:
type: error.ServerError
/files:
get:
description: |
Lists the files available for a completed job.
responses:
200:
description: |
Success
The job has completed and has files available.
body:
application/json:
type: string[]
example:
- output
403:
description: |
Forbidden
The job has not yet completed and thus cannot yet be queried for
files.
body:
application/json:
type: error.ForbiddenError
404:
description: |
Not Found
The target `{job-id}` was not found.
body:
application/json:
type: error.NotFoundError
500:
description: |
Internal Server Error
An unexpected exception was thrown while attempting to process
the request.
body:
application/json:
type: error.ServerError
/{file-name}:
uriParameters:
file-name:
type: string
minLength: 1
get:
description: |
Returns the target file from a completed job.
responses:
200:
description: |
Success
The job has completed and the target file exists to return.
headers:
Content-Disposition:
type: string
example:
value: attachment; filename=output.txt
body:
text/plain:
type: any
example: dlrow olleh
403:
description: |
Forbidden
The job has not yet completed and thus cannot yet be queried for
files.
body:
application/json:
type: error.ForbiddenError
404:
description: |
Not Found
Either the target `{job-id}` was not found or no file with the
name `{file-name}` exists.
body:
application/json:
type: error.NotFoundError
500:
description: |
Internal Server Error
An unexpected exception was thrown while attempting to process
the request.
body:
application/json:
type: error.ServerError