This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 221
/
workflows.yaml
369 lines (357 loc) · 10.8 KB
/
workflows.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
WorkflowJSON:
type: object
required: [name]
description: A workflow object
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
name:
description: The name of the workflow.
type: string
example: HelloWorldWorkflow
description:
type: string
description: Description of the workflow
tags:
description: Tag for workflow
type: array
items:
type: string
is_valid:
description: Is this workflow able to be run?
type: boolean
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
execution_id:
$ref: '#/components/schemas/Uuid'
start:
description: ID of the starting action
$ref: '#/components/schemas/Uuid'
actions:
description: Action nodes in workflow
type: array
items:
$ref: "#/components/schemas/Action"
branches:
description: Edges connecting nodes in workflow
type: array
items:
$ref: '#/components/schemas/Branch'
conditions:
description: Condition nodes in workflow
type: array
items:
$ref: '#/components/schemas/Condition'
transforms:
description: Transform nodes in workflow
type: array
items:
$ref: '#/components/schemas/Transform'
triggers:
description: Trigger nodes in workflow
type: array
items:
$ref: '#/components/schemas/Trigger'
workflow_variables:
description: The environment variables for this workflow
type: array
items:
$ref: '#/components/schemas/WorkflowVariable'
_walkoff_type:
type: string
description: Workflow type for json decoder
permissions:
type: array
nullable: true
items:
type: object
access_level:
type: integer
nullable: true
creator:
type: integer
description: The User ID of the creator of the global variable
WorkflowMetaData:
type: object
required: [id_, name]
description: A workflow metadata object
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
name:
description: The name of the workflow.
type: string
example: HelloWorldWorkflow
description:
type: string
description: Description of the workflow
tags:
description: Tag for workflow
type: array
items:
type: string
is_valid:
description: Is this workflow able to be run?
type: boolean
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
Action:
type: object
required: [app_name, app_version, label, name, position]
description: Encapsulation of executing an action in an app.
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
description: The ID of the object. If updating a workflow and the Action object already exists, ID is required. Otherwise, this ID must be UUID4.
parallelized:
type: boolean
default: false
app_name:
description: The app to which the action belongs
type: string
example: CyberAnalytics
app_version:
description: The version of the app to which the action belongs
type: string
example: 1.0.0
name:
description: The name of the function this Action will take
type: string
example: pause
label:
description: User-specified label for the action
type: string
example: action1
minLength: 1
is_valid:
description: are the parameters of this action valid?
type: boolean
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
parallel_parameter:
description: Alternative parameter to parallelize the action on
$ref: '#/components/schemas/Parameter'
parameters:
description: The input parameters to the action
type: array
items:
$ref: '#/components/schemas/Parameter'
priority:
description: The priority for this Action, which will be compared to other Actions with the same parent Action, descending, i.e. 5 is the highest priority.
type: integer
minimum: 1
maximum: 5
default: 3
position:
description: Position object representing various fields of the position of the Action in the playbook editor.
$ref: '#/components/schemas/Position'
_walkoff_type:
type: string
description: Workflow type for json decoder
Branch:
type: object
required: [source_id, destination_id]
description: Object representing an edge connecting two nodes in a Workflow
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
source_id:
description: The source node ID for this Branch
$ref: '#/components/schemas/Uuid'
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
destination_id:
description: The destination node ID for this Branch, if the conditions evaluate to True
$ref: '#/components/schemas/Uuid'
_walkoff_type:
type: string
description: Workflow type for json decoder
Parameter:
type: object
nullable: true
required: [name, variant]
description: Object used for passing parameters into actions. The variety of parameter must be provided.
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
name:
type: string
example: regex
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
parallelized:
type: boolean
default: false
value:
description: The value of the argument OR The ID of the action whose output should be used
variant:
type: string
enum: [STATIC_VALUE, ACTION_RESULT, WORKFLOW_VARIABLE, GLOBAL]
_walkoff_type:
type: string
description: Workflow type for json decoder
Condition:
type: object
required: [label, conditional]
description: Takes data and checks it against a condition given by its action Optionally filters the data before checking.
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
description: The ID of the object. If updating a workflow and the Condition object already exists, ID is required. Otherwise, do not include it.
app_name:
type: string
enum: [Builtin]
app_version:
description: The version of the app to which the action belongs
type: string
example: 1.0.0
name:
type: string
enum: [Condition]
label:
description: User-specified label for the condition
type: string
example: condition1
is_valid:
description: are the contents of this condition valid?
type: boolean
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
conditional:
type: string
example: "if Pre_Hello_World_Action == 5: return Hello_World_Action"
position:
description: Position object representing various fields of the position of the Action in the playbook editor.
$ref: '#/components/schemas/Position'
_walkoff_type:
type: string
description: Workflow type for json decoder
Transform:
type: object
required: [label, transform]
description: Filters or otherwise transforms the data given to it
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
description: The ID of the object. If updating a workflow and the Transform object already exists, ID is required. Otherwise, do not include it.
app_name:
type: string
enum: [Builtin]
app_version:
description: The version of the app to which the action belongs
type: string
example: 1.0.0
name:
type: string
enum: [Transform]
label:
description: The user defined name of the transform
type: string
example: transform
is_valid:
description: are the contents of this transform valid?
type: boolean
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
transform:
description: The transform to apply to the result of its parent Action
type: string
example: "result = input.get('Walkoff')"
position:
description: Position object representing various fields of the position of the Action in the playbook editor.
$ref: '#/components/schemas/Position'
_walkoff_type:
type: string
description: Workflow type for json decoder
Trigger:
type: object
required: [label]
description: Halts execution of workflow pending an external trigger
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
description: The ID of the object. If updating a workflow and the trigger object already exists, ID is required. Otherwise, do not include it.
app_name:
type: string
enum: [Builtin]
app_version:
description: The version of the app to which the action belongs
type: string
example: 1.0.0
name:
type: string
enum: [Trigger]
label:
description: The user defined name of the trigger
type: string
example: Wait for Approval
is_valid:
description: are the contents of this trigger valid?
type: boolean
errors:
$ref: '#/components/schemas/ExecutionElementErrors'
trigger_schema:
description: Schema to validate sent data with
type: object
position:
description: Position object representing various fields of the position of the Action in the playbook editor.
$ref: '#/components/schemas/Position'
_walkoff_type:
type: string
description: Workflow type for json decoder
Position:
type: object
required: [x, y]
description: Various specifications for how the Action is displayed in the playbook editor
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
x:
type: number
description: The X coordinate for the Action
y:
type: number
description: The Y coordinate for the Action
_walkoff_type:
type: string
description: Workflow type for json decoder
WorkflowVariable:
type: object
required: [name, value]
description: A workflow variable object that is available in the workflow scope
additionalProperties: false
properties:
id_:
$ref: '#/components/schemas/Uuid'
name:
type: string
description: The name of the workflow variable
value:
description: The value of the workflow variable
description:
type: string
description: Description of the workflow variable
_walkoff_type:
type: string
description: Workflow type for json decoder
CopyWorkflow:
type: object
properties:
playbook_id:
$ref: '#/components/schemas/Uuid'
workflow_name:
type: string
ExecutionElementErrors:
description: Errors attached to this ExecutionElement
type: array
items:
type: string