-
Notifications
You must be signed in to change notification settings - Fork 2
/
xenon-workflow-execution-api.yaml
374 lines (374 loc) · 10.3 KB
/
xenon-workflow-execution-api.yaml
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
openapi: 3.0.1
info:
title: Xenon CWL workflow execution service API
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: /
paths:
/jobs:
get:
summary: list of jobs
description: get a list of all jobs, running, cancelled, or otherwise.
operationId: getJobs
responses:
200:
description: list of jobs
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/job'
example:
- id: afcd1554-9604-11e6-bd3f-080027e8b32a
input:
file1:
class: File
location: whale.txt
log: http://localhost:5000/jobs/afcd1554-9604-11e6-bd3f-080027e8b32a/stderr
name: myjob1
output:
output:
checksum: sha1$6f9bd042bff934443cc65f7ef769613222f7b136
basename: output
location: file:///tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
path: /tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
class: File
size: 9
state: Success
workflow: wc-tool.cwl
post:
summary: submit a new job
description: Submit a new job from a workflow definition.
operationId: postJob
requestBody:
description: Input binding for workflow.
content:
application/json:
schema:
$ref: '#/components/schemas/job-description'
required: true
responses:
201:
description: OK
headers:
Location:
description: uri of the created job
schema:
type: string
format: uri
content:
application/json:
schema:
$ref: '#/components/schemas/job'
example:
id: afcd1554-9604-11e6-bd3f-080027e8b32a
input:
file1:
class: File
location: whale.txt
log: http://localhost:5000/jobs/afcd1554-9604-11e6-bd3f-080027e8b32a/log
name: myjob1
output: {}
state: Running
workflow: wc-tool.cwl
x-codegen-request-body-name: body
/jobs/{jobId}:
get:
summary: Get a job
operationId: getJobById
parameters:
- name: jobId
in: path
description: Job ID
required: true
schema:
type: string
responses:
200:
description: Status of job
content:
application/json:
schema:
$ref: '#/components/schemas/job'
example:
id: afcd1554-9604-11e6-bd3f-080027e8b32a
input:
file1:
class: File
location: whale.txt
log: http://localhost:5000/jobs/afcd1554-9604-11e6-bd3f-080027e8b32a/log
name: myjob1
output:
output:
checksum: sha1$6f9bd042bff934443cc65f7ef769613222f7b136
basename: output
location: file:///tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
path: /tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
class: File
size: 9
state: Success
workflow: wc-tool.cwl
404:
description: Job not found
content: {}
delete:
summary: Delete a job
description: Delete a job, if job is in waiting or running state then job will
be cancelled first.
operationId: deleteJobById
parameters:
- name: jobId
in: path
description: Job ID
required: true
schema:
type: string
responses:
204:
description: Job deleted
content: {}
404:
description: Job not found
content: {}
/jobs/{jobId}/cancel:
post:
summary: Cancel a job
operationId: cancelJobById
parameters:
- name: jobId
in: path
description: Job ID
required: true
schema:
type: string
responses:
200:
description: Job has been cancelled if job was still running or waiting
headers:
Location:
description: uri of the cancelled job
schema:
type: string
format: uri
content:
'*/*':
schema:
$ref: '#/components/schemas/job'
application/json:
example:
id: afcd1554-9604-11e6-bd3f-080027e8b32a
input:
file1:
class: File
location: whale.txt
log: http://localhost:5000/jobs/afcd1554-9604-11e6-bd3f-080027e8b32a/log
name: myjob1
output:
output:
checksum: sha1$6f9bd042bff934443cc65f7ef769613222f7b136
basename: output
location: file:///tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
path: /tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
class: File
size: 9
state: Cancelled
workflow: wc-tool.cwl
404:
description: Job not found
content: {}
/jobs/{jobId}/log:
get:
summary: Log of a job
operationId: getJobLogById
parameters:
- name: jobId
in: path
description: Job ID
required: true
schema:
type: string
responses:
200:
description: Job log
content:
text/plain:
schema:
type: string
302:
description: Job log redirect
headers:
Location:
description: uri of the log of the job
schema:
type: string
format: uri
content:
text/plain:
example: |
[job wc-tool.cwl] /tmp/afcd1554-9604-11e6-bd3f-080027e8b32a$ wc < /tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/stge84d1078-e33f-41c3-8714-aafe955d1b53/whale.txt > /tmp/afcd1554-9604-11e6-bd3f-080027e8b32a/output
Final process status is success
404:
description: Job not found
content: {}
/status:
get:
summary: Get the server status
operationId: getServerStatus
responses:
200:
description: The server status
content:
application/json:
schema:
$ref: '#/components/schemas/status'
example:
waiting: 3
running: 1
successful: 10
errored: 4
/workflows:
get:
summary: A list of available workflows
operationId: getWorkflows
responses:
200:
description: The list of available workflows
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/workflow'
example:
- filename: echo.cwl
path: cwl/echo.cwl
- filename: my_workflow.cwl
path: science/my_workflow.cwl
components:
schemas:
workflow-binding:
type: object
job-description:
required:
- workflow
type: object
properties:
name:
type: string
description: user supplied (non unique) name for this job
example: myjob1
workflow:
type: string
description: location of the workflow
format: uri
example: wc-tool.cwl
input:
$ref: '#/components/schemas/workflow-binding'
example:
name: myjob1
workflow: wc-tool.cwl
input:
file1:
class: File
location: whale.txt
job:
required:
- id
- input
- log
- name
- output
- state
- workflow
type: object
properties:
id:
type: string
format: uri
example: afcd1554-9604-11e6-bd3f-080027e8b32a
name:
type: string
description: user supplied (non unique) name for this job
example: myjob1
workflow:
type: string
description: location of the workflow
format: uri
example: wc-tool.cwl
input:
$ref: '#/components/schemas/workflow-binding'
state:
type: string
example: Running
enum:
- Waiting
- Running
- Success
- Cancelled
- SystemError
- TemporaryFailure
- PermanentFailure
output:
$ref: '#/components/schemas/workflow-binding'
log:
type: string
format: uri
example: http://localhost:5000/jobs/afcd1554-9604-11e6-bd3f-080027e8b32a/log
additionalInfo:
type: object
properties: {}
file:
required:
- id
- type
type: object
properties:
id:
type: string
example: input_file
type:
type: string
example: File
workflow:
required:
- filename
- path
type: object
properties:
filename:
type: string
example: echo.cwl
path:
type: string
example: cwl/echo.cwl
status:
required:
- waiting
- running
- successful
- errored
type: object
properties:
waiting:
type: integer
example: 2
running:
type: integer
example: 2
successful:
type: integer
example: 2
errored:
type: integer
example: 2
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: 'api-key'
security:
- ApiKeyAuth: []