forked from CARMIN-org/CARMIN-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcarmin.yaml
478 lines (476 loc) · 13.8 KB
/
carmin.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
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
swagger: '2.0'
info:
version: '1.0.0'
title: CARMIN a Common web API for Remote pipeline INvocation
description: FLI/IAM REST API for exchanging data and remote calling pipelines.
license:
name: MIT License
url: https://opensource.org/licenses/MIT
contact:
name: CARMIN mailing list
url: https://groups.google.com/d/forum/carmin
email: [email protected]
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
apiKey:
type: apiKey
name: apikey
in: header
description: An API key that must be provided by the platform.
security:
- apiKey: []
paths:
/platform:
get:
description:
Returns information about the platform.
https must be supported in the list of the supported protocols.
operationId: getPlatformProperties
security: []
responses:
'200':
description: successful response
schema:
$ref: '#/definitions/PlatformProperties'
default:
$ref: '#/responses/GenericError'
/executions:
get:
description:
list all execution Ids in the platform which are ordered in decreasing submission time.
All the executions that were launched by the user must be returned. It is up to the platform to return executions that the user did not launch.
When studyIdentifier is present, all the executions that the user launched in the study must be returned.
operationId: listExecutions
responses:
'200':
description: successful response
schema:
type: array
items:
$ref: '#/definitions/Execution'
default:
$ref: '#/responses/GenericError'
post:
description:
Initializes an execution. Does not start it. The successful response must contain the execution identifier.
operationId: initExecution
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Execution'
responses:
'200':
description: successful response
schema:
$ref: '#/definitions/Execution'
default:
$ref: '#/responses/GenericError'
/executions/create-and-start:
post:
description:
Initializes an execution and start it. The successful response must contain the execution identifier.
operationId: initAndStartExecution
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Execution'
responses:
'200':
description: successful response
schema:
$ref: '#/definitions/Execution'
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}:
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
get:
description: get information about an execution
operationId: getExecution
responses:
'200':
description: successful response
schema:
$ref: '#/definitions/Execution'
default:
$ref: '#/responses/GenericError'
put:
description:
Modify an execution. Only the name and the timeout of the execution can be modified. Changes to the identifier or the status will raise errors. Changes to the other properties will be ignored.
operationId: updateExecution
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Execution'
responses:
'204':
description: successful response
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}/results:
get:
description: get the result files of the execution
operationId: getExecutionResults
produces:
- application/json
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
- name: protocol
in: query
type: string
description: if not specified the default protocol is https
responses:
'200':
description: successful response
schema:
type: array
items:
type: string
format: url
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}/stdout:
get:
description: get stdout of an execution
operationId: getStdout
produces:
- text/plain
- application/json
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
responses:
'200':
description: successful response
schema:
type: string
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}/stderr:
get:
description: get stderr of an execution
operationId: getStderr
produces:
- text/plain
- application/json
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
responses:
'200':
description: successful response
schema:
type: string
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}/play:
put:
description: play an execution
operationId: playExecution
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
responses:
'204':
description: successful response
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}/kill:
put:
description: kill an execution
operationId: killExecution
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
responses:
'204':
description: successful response
default:
$ref: '#/responses/GenericError'
/executions/{executionIdentifier}/delete:
put:
description:
Delete an execution. This will kill the underlying processes (if possible) and free all resources associated with this execution (depending of the configuration given in as body input).
operationId: deleteExecution
parameters:
- name: executionIdentifier
in: path
required: true
type: string
format: ascii
- name: body
in: body
description: delete configuration
schema:
$ref: '#/definitions/DeleteExecutionConfiguration'
responses:
'204':
description: successful response
default:
$ref: '#/responses/GenericError'
/pipelines:
get:
description:
All the pipelines that the user can execute must be returned.
It is up to the platform to return pipelines that the user cannot execute.
When studyIdentifier is present, all the pipelines that the user can execute in the study must be returned. In this case, execution rights denote the rights to execute the pipeline in the study.
operationId: listPipelines
parameters:
- name: studyIdentifier
in: query
type: string
format: ascii
responses:
'200':
description: successful response
schema:
type: array
items:
$ref: '#/definitions/Pipeline'
default:
$ref: '#/responses/GenericError'
/pipelines/{pipelineIdentifier}:
get:
description: Show the definition of a given pipeline
operationId: getPipeline
parameters:
- name: pipelineIdentifier
in: path
required: true
description: pipeline identifier
type: string
format: ascii
responses:
'200':
description: successful response
schema:
$ref: '#/definitions/Pipeline'
default:
$ref: '#/responses/GenericError'
responses:
GenericError:
description: An functional or internal error occured processing the request
schema:
$ref: '#/definitions/ErrorCodeAndMessage'
definitions:
PlatformProperties:
type: object
required:
- supportedTransferProtocols
- supportedModules
- isKillExecutionSupported
- supportedAPIVersion
properties:
platformName: # not present in 0.2 version, keep it as optional
type: string
description: Name of the platform.
APIErrorCodesAndMessages:
type: array
items:
$ref: '#/definitions/ErrorCodeAndMessage'
supportedTransferProtocols:
type: array
items:
type: string
enum: ["http", "https", "ftp", "sftp", "ftps", "scp", "webdav"]
description:
Protocol names must be URL prefixes (e.g. "http", "https", "ftp", "sftp", "ftps", "scp", "webdav").
supportedModules:
type: array
items:
type: string
enum: ["Processing", "Data", "Management", "Commercial", ]
defaultLimitListExecutions: # not present in 0.2, keep it as optional
type: integer
format: int64
description: The number of Executions returned by getExecutions
email:
type: string
format: email
platformDescription:
type: string
minAuthorizedExecutionTimeout:
type: integer
format: int64
maxAuthorizedExecutionTimeout:
type: integer
format: int64
description: 0 or absent means no max timeout. max has to be greater or equal to the min.
defaultExecutionTimeout:
type: integer
format: int64
isKillExecutionSupported:
type: boolean
unsupportedMethods:
# not present in 0.2, keep it as optional
type: array
items:
type: string
description: List of optional methods that are not supported by the platform. Must be consistent with the "isKillExecutionSupported" property.
defaultStudy:
type: string
format: ascii
supportedAPIVersion:
type: string
format: ascii
additionalProperties: true # allow extensions
Pipeline:
type: object
required:
- identifier
- name
- version
# - parameters optional in 0.2
properties:
identifier:
type: string
format: ascii
name:
type: string
version:
type: string
format: ascii
description:
type: string
canExecute:
type: boolean
description: true if the user who requested the pipeline can execute it
parameters:
type: array
items:
$ref: '#/definitions/PipelineParameter'
errorCodesAndMessages:
type: array
items:
$ref: '#/definitions/ErrorCodeAndMessage'
PipelineParameter:
type: object
required:
- name
- type
- isOptional
- isReturnedValue
properties:
name:
type: string
format: ascii
type:
$ref: '#/definitions/ParameterType'
isOptional:
type: boolean
isReturnedValue:
type: boolean
defaultValue:
description: Default value. It must be consistent with the parameter type.
description:
type: string
ParameterType:
type: string
enum: [File,String,Boolean,Int64,Double,List]
ErrorCodeAndMessage:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int64
message:
type: string
Execution:
type: object
required:
- name
- pipelineIdentifier
- inputValues
properties:
identifier:
type: string
format: ascii
readOnly: true
description: execution id. Must always be present in responses.
name:
type: string
description: execution name
pipelineIdentifier:
type: string
format: ascii
description: which pipeline that started this execution
timeout:
type: integer
format: int64
description: The timeout in seconds until which the execution is killed and deleted with all its files. 0 or absense means no timeout
status:
type: string
enum: [initializing,ready,running,finished,initialization_failed,execution_failed,unknown,killed]
readOnly: true
description: The status of the execution. Must always be present in responses.
inputValues:
type: object
additionalProperties: true
description:
Represents the input as a key/value object. The types should respect the parameters of the pipeline used for the execution.
returnedFiles:
type: object
additionalProperties:
type: array
items:
type: string
format: url
readOnly: true
description: absent when not available (e.g. execution still running). Empty if no returned file is produced
studyIdentifier:
type: string
format: ascii
errorCode:
type: integer
format: int64
readOnly: true
startDate:
type: integer
format: int64
description: Time in seconds since Unix epoch
readOnly: true
endDate:
type: integer
format: int64
description: Time in seconds since Unix epoch
readOnly: true
DeleteExecutionConfiguration:
type: object
required: [deleteFiles]
properties:
deleteFiles:
type: boolean