Class: Falcon::Workflows

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/workflows.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ Workflows

Returns a new instance of Workflows.



35
36
37
# File 'lib/crimson-falcon/api/workflows.rb', line 35

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



33
34
35
# File 'lib/crimson-falcon/api/workflows.rb', line 33

def api_client
  @api_client
end

Instance Method Details

#v1_child_executions_query(opts = {}) ⇒ MsaspecQueryResponse

Search for child executions by providing a FQL filter and paging details. Returns the set of child workflow execution IDs which match the filter criteria

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



45
46
47
48
# File 'lib/crimson-falcon/api/workflows.rb', line 45

def v1_child_executions_query(opts = {})
  data, _status_code, _headers = v1_child_executions_query_with_http_info(opts)
  data
end

#v1_child_executions_query_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Search for child executions by providing a FQL filter and paging details. Returns the set of child workflow execution IDs which match the filter criteria

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:

  • (Array<(MsaspecQueryResponse, Integer, Hash)>)

    MsaspecQueryResponse data, response status code and response headers



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
# File 'lib/crimson-falcon/api/workflows.rb', line 57

def v1_child_executions_query_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.v1_child_executions_query ...'
  end
  pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/)
  if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Workflows.v1_child_executions_query, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/workflows/queries/child-executions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.v1_child_executions_query",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#v1_child_executions_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_activities_combined(opts = {}) ⇒ ActivitiesActivityExternalResponse

Search for activities by name. Returns all supported activities if no filter specified

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



117
118
119
120
# File 'lib/crimson-falcon/api/workflows.rb', line 117

def workflow_activities_combined(opts = {})
  data, _status_code, _headers = workflow_activities_combined_with_http_info(opts)
  data
end

#workflow_activities_combined_with_http_info(opts = {}) ⇒ Array<(ActivitiesActivityExternalResponse, Integer, Hash)>

Search for activities by name. Returns all supported activities if no filter specified

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



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
# File 'lib/crimson-falcon/api/workflows.rb', line 129

def workflow_activities_combined_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_activities_combined ...'
  end
  pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/)
  if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Workflows.workflow_activities_combined, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/workflows/combined/activities/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ActivitiesActivityExternalResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_activities_combined",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_activities_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_activities_content_combined(opts = {}) ⇒ ActivitiesActivityExternalResponse

Search for activities by name. Returns all supported activities if no filter specified

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



189
190
191
192
# File 'lib/crimson-falcon/api/workflows.rb', line 189

def workflow_activities_content_combined(opts = {})
  data, _status_code, _headers = workflow_activities_content_combined_with_http_info(opts)
  data
end

#workflow_activities_content_combined_with_http_info(opts = {}) ⇒ Array<(ActivitiesActivityExternalResponse, Integer, Hash)>

Search for activities by name. Returns all supported activities if no filter specified

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



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
# File 'lib/crimson-falcon/api/workflows.rb', line 201

def workflow_activities_content_combined_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_activities_content_combined ...'
  end
  pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/)
  if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Workflows.workflow_activities_content_combined, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/workflows/combined/activity-content/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ActivitiesActivityExternalResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_activities_content_combined",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_activities_content_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_definitions_action(action_name, body, opts = {}) ⇒ DefinitionsDefinitionEntitiesResponse

Enable or disable a workflow definition, or stop all executions for a definition. When a definition is disabled it will not execute against any new trigger events.

Parameters:

  • action_name (String)

    Specify one of these actions: - &#x60;enable&#x60;: enable the workflow(s) specified in ids. - &#x60;disable&#x60;: disable the workflow(s) specified in ids. - &#x60;cancel&#x60;: cancel all in-flight executions for the workflow specified in ids

  • body (ClientActionRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



259
260
261
262
# File 'lib/crimson-falcon/api/workflows.rb', line 259

def workflow_definitions_action(action_name, body, opts = {})
  data, _status_code, _headers = workflow_definitions_action_with_http_info(action_name, body, opts)
  data
end

#workflow_definitions_action_with_http_info(action_name, body, opts = {}) ⇒ Array<(DefinitionsDefinitionEntitiesResponse, Integer, Hash)>

Enable or disable a workflow definition, or stop all executions for a definition. When a definition is disabled it will not execute against any new trigger events.

Parameters:

  • action_name (String)

    Specify one of these actions: - &#x60;enable&#x60;: enable the workflow(s) specified in ids. - &#x60;disable&#x60;: disable the workflow(s) specified in ids. - &#x60;cancel&#x60;: cancel all in-flight executions for the workflow specified in ids

  • body (ClientActionRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/crimson-falcon/api/workflows.rb', line 269

def workflow_definitions_action_with_http_info(action_name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_definitions_action ...'
  end
  # verify the required parameter 'action_name' is set
  if @api_client.config.client_side_validation && action_name.nil?
    fail ArgumentError, "Missing the required parameter 'action_name' when calling Workflows.workflow_definitions_action"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_definitions_action"
  end
  # resource path
  local_var_path = '/workflows/entities/definition-actions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'action_name'] = action_name

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DefinitionsDefinitionEntitiesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_definitions_action",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_definitions_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_definitions_combined(opts = {}) ⇒ DefinitionsDefinitionExternalResponse

Search workflow definitions based on the provided filter. NOTE: this API has a large response payload. Click on ‘Wait` if the page is unresponsive during loading

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



334
335
336
337
# File 'lib/crimson-falcon/api/workflows.rb', line 334

def workflow_definitions_combined(opts = {})
  data, _status_code, _headers = workflow_definitions_combined_with_http_info(opts)
  data
end

#workflow_definitions_combined_with_http_info(opts = {}) ⇒ Array<(DefinitionsDefinitionExternalResponse, Integer, Hash)>

Search workflow definitions based on the provided filter. NOTE: this API has a large response payload. Click on &#x60;Wait&#x60; if the page is unresponsive during loading

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



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
# File 'lib/crimson-falcon/api/workflows.rb', line 346

def workflow_definitions_combined_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_definitions_combined ...'
  end
  pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/)
  if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Workflows.workflow_definitions_combined, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/workflows/combined/definitions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/yaml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DefinitionsDefinitionExternalResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_definitions_combined",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_definitions_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_definitions_delete(ids, opts = {}) ⇒ DefinitionsDefinitionEntitiesResponse

Accepts a list of workflow definition IDs and deletes those definitions and all their associated versions.

Parameters:

  • ids (Array<String>)

    IDs of the workflow definitions to delete

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



403
404
405
406
# File 'lib/crimson-falcon/api/workflows.rb', line 403

def workflow_definitions_delete(ids, opts = {})
  data, _status_code, _headers = workflow_definitions_delete_with_http_info(ids, opts)
  data
end

#workflow_definitions_delete_with_http_info(ids, opts = {}) ⇒ Array<(DefinitionsDefinitionEntitiesResponse, Integer, Hash)>

Accepts a list of workflow definition IDs and deletes those definitions and all their associated versions.

Parameters:

  • ids (Array<String>)

    IDs of the workflow definitions to delete

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/crimson-falcon/api/workflows.rb', line 412

def workflow_definitions_delete_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_definitions_delete ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling Workflows.workflow_definitions_delete"
  end
  if @api_client.config.client_side_validation && ids.length > 5000
    fail ArgumentError, 'invalid value for "ids" when calling Workflows.workflow_definitions_delete, number of items must be less than or equal to 5000.'
  end

  if @api_client.config.client_side_validation && ids.length < 1
    fail ArgumentError, 'invalid value for "ids" when calling Workflows.workflow_definitions_delete, number of items must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/workflows/entities/definitions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DefinitionsDefinitionEntitiesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_definitions_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_definitions_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_definitions_export(id, opts = {}) ⇒ Array<Integer>

Exports a workflow definition for the given definition ID

Parameters:

  • id (String)

    ID of workflow definitions to return details for

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :sanitize (Boolean)

    whether or not to sanitize PII from workflow before it&#39;s exported (default to true)

Returns:

  • (Array<Integer>)


474
475
476
477
# File 'lib/crimson-falcon/api/workflows.rb', line 474

def workflow_definitions_export(id, opts = {})
  data, _status_code, _headers = workflow_definitions_export_with_http_info(id, opts)
  data
end

#workflow_definitions_export_with_http_info(id, opts = {}) ⇒ Array<(Array<Integer>, Integer, Hash)>

Exports a workflow definition for the given definition ID

Parameters:

  • id (String)

    ID of workflow definitions to return details for

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :sanitize (Boolean)

    whether or not to sanitize PII from workflow before it&#39;s exported (default to true)

Returns:

  • (Array<(Array<Integer>, Integer, Hash)>)

    Array<Integer> data, response status code and response headers



484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/crimson-falcon/api/workflows.rb', line 484

def workflow_definitions_export_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_definitions_export ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling Workflows.workflow_definitions_export"
  end
  if @api_client.config.client_side_validation && id.to_s.length > 40
    fail ArgumentError, 'invalid value for "id" when calling Workflows.workflow_definitions_export, the character length must be smaller than or equal to 40.'
  end

  if @api_client.config.client_side_validation && id.to_s.length < 32
    fail ArgumentError, 'invalid value for "id" when calling Workflows.workflow_definitions_export, the character length must be great than or equal to 32.'
  end

  # resource path
  local_var_path = '/workflows/entities/definitions/export/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id
  query_params[:'sanitize'] = opts[:'sanitize'] if !opts[:'sanitize'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/yaml', 'application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Integer>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_definitions_export",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_definitions_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_definitions_import(data_file, opts = {}) ⇒ DefinitionsDefinitionImportResponse

Imports a workflow definition based on the provided model

Parameters:

  • data_file (File)

    A workflow definition in YAML format to import

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    Workflow name to override

  • :validate_only (Boolean)

    When enabled, prevents saving workflow after validating (default to false)

  • :include_activity_metadata (Boolean)

    When true, populates the definition model with Activity metadata which includes Activity Dependency and Vendor (default to false)

Returns:



549
550
551
552
# File 'lib/crimson-falcon/api/workflows.rb', line 549

def workflow_definitions_import(data_file, opts = {})
  data, _status_code, _headers = workflow_definitions_import_with_http_info(data_file, opts)
  data
end

#workflow_definitions_import_with_http_info(data_file, opts = {}) ⇒ Array<(DefinitionsDefinitionImportResponse, Integer, Hash)>

Imports a workflow definition based on the provided model

Parameters:

  • data_file (File)

    A workflow definition in YAML format to import

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    Workflow name to override

  • :validate_only (Boolean)

    When enabled, prevents saving workflow after validating (default to false)

  • :include_activity_metadata (Boolean)

    When true, populates the definition model with Activity metadata which includes Activity Dependency and Vendor (default to false)

Returns:



561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
# File 'lib/crimson-falcon/api/workflows.rb', line 561

def workflow_definitions_import_with_http_info(data_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_definitions_import ...'
  end
  # verify the required parameter 'data_file' is set
  if @api_client.config.client_side_validation && data_file.nil?
    fail ArgumentError, "Missing the required parameter 'data_file' when calling Workflows.workflow_definitions_import"
  end
  # resource path
  local_var_path = '/workflows/entities/definitions/import/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].nil?
  query_params[:'include_activity_metadata'] = opts[:'include_activity_metadata'] if !opts[:'include_activity_metadata'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['data_file'] = data_file

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DefinitionsDefinitionImportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_definitions_import",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_definitions_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_definitions_update(body, opts = {}) ⇒ ApiResourceIDsResponse

Updates a workflow definition based on the provided model

Parameters:

Options Hash (opts):

  • :validate_only (Boolean)

    When enabled, prevents saving workflow after validating (default to false)

Returns:



623
624
625
626
# File 'lib/crimson-falcon/api/workflows.rb', line 623

def workflow_definitions_update(body, opts = {})
  data, _status_code, _headers = workflow_definitions_update_with_http_info(body, opts)
  data
end

#workflow_definitions_update_with_http_info(body, opts = {}) ⇒ Array<(ApiResourceIDsResponse, Integer, Hash)>

Updates a workflow definition based on the provided model

Parameters:

Options Hash (opts):

  • :validate_only (Boolean)

    When enabled, prevents saving workflow after validating (default to false)

Returns:

  • (Array<(ApiResourceIDsResponse, Integer, Hash)>)

    ApiResourceIDsResponse data, response status code and response headers



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
# File 'lib/crimson-falcon/api/workflows.rb', line 633

def workflow_definitions_update_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_definitions_update ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_definitions_update"
  end
  # resource path
  local_var_path = '/workflows/entities/definitions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/yaml'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiResourceIDsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_definitions_update",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_definitions_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_execute(body, opts = {}) ⇒ ApiResourceIDsResponse

Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s)

Parameters:

  • body (Object)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (Array<String>)

    Definition ID to execute, either a name or an ID can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

  • :source_event_url (String)

    Used to record a URL to the source that led to triggering this workflow

Returns:



697
698
699
700
# File 'lib/crimson-falcon/api/workflows.rb', line 697

def workflow_execute(body, opts = {})
  data, _status_code, _headers = workflow_execute_with_http_info(body, opts)
  data
end

#workflow_execute_internal(body, opts = {}) ⇒ ApiResourceIDsResponse

Executes an on-demand Workflow - internal workflows permitted, the body is JSON used to trigger the execution, the response the execution ID(s)

Parameters:

  • body (Object)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (Array<String>)

    Definition ID to execute, either a name or an ID can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

  • :batch_size (Integer)

    Used to set the batchSize, if unset the default batchSize is used

  • :source_event_url (String)

    Used to record a URL to the source that led to triggering this workflow

Returns:



782
783
784
785
# File 'lib/crimson-falcon/api/workflows.rb', line 782

def workflow_execute_internal(body, opts = {})
  data, _status_code, _headers = workflow_execute_internal_with_http_info(body, opts)
  data
end

#workflow_execute_internal_with_http_info(body, opts = {}) ⇒ Array<(ApiResourceIDsResponse, Integer, Hash)>

Executes an on-demand Workflow - internal workflows permitted, the body is JSON used to trigger the execution, the response the execution ID(s)

Parameters:

  • body (Object)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (Array<String>)

    Definition ID to execute, either a name or an ID can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

  • :batch_size (Integer)

    Used to set the batchSize, if unset the default batchSize is used

  • :source_event_url (String)

    Used to record a URL to the source that led to triggering this workflow

Returns:

  • (Array<(ApiResourceIDsResponse, Integer, Hash)>)

    ApiResourceIDsResponse data, response status code and response headers



798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/crimson-falcon/api/workflows.rb', line 798

def workflow_execute_internal_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_execute_internal ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_execute_internal"
  end
  # resource path
  local_var_path = '/workflows/entities/execute/internal/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'execution_cid'] = @api_client.build_collection_param(opts[:'execution_cid'], :csv) if !opts[:'execution_cid'].nil?
  query_params[:'definition_id'] = @api_client.build_collection_param(opts[:'definition_id'], :csv) if !opts[:'definition_id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'batch_size'] = opts[:'batch_size'] if !opts[:'batch_size'].nil?
  query_params[:'source_event_url'] = opts[:'source_event_url'] if !opts[:'source_event_url'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiResourceIDsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_execute_internal",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_execute_internal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_execute_single_node_v1(body, opts = {}) ⇒ ApiResourceIDsResponse

Executes a single activity node, resulting in an execution where test_mode=true and single_node_execution=true, associated with a definition ID if provided

Parameters:

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (String)

    Definition ID to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

Returns:



867
868
869
870
# File 'lib/crimson-falcon/api/workflows.rb', line 867

def workflow_execute_single_node_v1(body, opts = {})
  data, _status_code, _headers = workflow_execute_single_node_v1_with_http_info(body, opts)
  data
end

#workflow_execute_single_node_v1_with_http_info(body, opts = {}) ⇒ Array<(ApiResourceIDsResponse, Integer, Hash)>

Executes a single activity node, resulting in an execution where test_mode&#x3D;true and single_node_execution&#x3D;true, associated with a definition ID if provided

Parameters:

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (String)

    Definition ID to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

Returns:

  • (Array<(ApiResourceIDsResponse, Integer, Hash)>)

    ApiResourceIDsResponse data, response status code and response headers



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
# File 'lib/crimson-falcon/api/workflows.rb', line 881

def workflow_execute_single_node_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_execute_single_node_v1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_execute_single_node_v1"
  end
  # resource path
  local_var_path = '/workflows/entities/single-node-executions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'execution_cid'] = @api_client.build_collection_param(opts[:'execution_cid'], :csv) if !opts[:'execution_cid'].nil?
  query_params[:'definition_id'] = opts[:'definition_id'] if !opts[:'definition_id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiResourceIDsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_execute_single_node_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_execute_single_node_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_execute_with_http_info(body, opts = {}) ⇒ Array<(ApiResourceIDsResponse, Integer, Hash)>

Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s)

Parameters:

  • body (Object)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (Array<String>)

    Definition ID to execute, either a name or an ID can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

  • :source_event_url (String)

    Used to record a URL to the source that led to triggering this workflow

Returns:

  • (Array<(ApiResourceIDsResponse, Integer, Hash)>)

    ApiResourceIDsResponse data, response status code and response headers



712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/crimson-falcon/api/workflows.rb', line 712

def workflow_execute_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_execute ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_execute"
  end
  # resource path
  local_var_path = '/workflows/entities/execute/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'execution_cid'] = @api_client.build_collection_param(opts[:'execution_cid'], :csv) if !opts[:'execution_cid'].nil?
  query_params[:'definition_id'] = @api_client.build_collection_param(opts[:'definition_id'], :csv) if !opts[:'definition_id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'source_event_url'] = opts[:'source_event_url'] if !opts[:'source_event_url'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiResourceIDsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_execute",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_execution_results(ids, opts = {}) ⇒ ApiExecutionResultsResponse

Get execution result of a given execution

Parameters:

  • ids (Array<String>)

    workflow execution id to return results for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_fields (Array<String>)

    Fields to omit from the response; valid values are (trigger, activities, flows, submodels). When specified, the corresponding node-level details are skipped.

Returns:



944
945
946
947
# File 'lib/crimson-falcon/api/workflows.rb', line 944

def workflow_execution_results(ids, opts = {})
  data, _status_code, _headers = workflow_execution_results_with_http_info(ids, opts)
  data
end

#workflow_execution_results_with_http_info(ids, opts = {}) ⇒ Array<(ApiExecutionResultsResponse, Integer, Hash)>

Get execution result of a given execution

Parameters:

  • ids (Array<String>)

    workflow execution id to return results for.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_fields (Array<String>)

    Fields to omit from the response; valid values are (trigger, activities, flows, submodels). When specified, the corresponding node-level details are skipped.

Returns:

  • (Array<(ApiExecutionResultsResponse, Integer, Hash)>)

    ApiExecutionResultsResponse data, response status code and response headers



954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/crimson-falcon/api/workflows.rb', line 954

def workflow_execution_results_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_execution_results ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling Workflows.workflow_execution_results"
  end
  if @api_client.config.client_side_validation && ids.length > 500
    fail ArgumentError, 'invalid value for "ids" when calling Workflows.workflow_execution_results, number of items must be less than or equal to 500.'
  end

  if @api_client.config.client_side_validation && ids.length < 1
    fail ArgumentError, 'invalid value for "ids" when calling Workflows.workflow_execution_results, number of items must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'skip_fields'].nil? && opts[:'skip_fields'].length > 4
    fail ArgumentError, 'invalid value for "opts[:"skip_fields"]" when calling Workflows.workflow_execution_results, number of items must be less than or equal to 4.'
  end

  # resource path
  local_var_path = '/workflows/entities/execution-results/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :csv)
  query_params[:'skip_fields'] = @api_client.build_collection_param(opts[:'skip_fields'], :csv) if !opts[:'skip_fields'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiExecutionResultsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_execution_results",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_execution_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_executions_action(action_name, body, opts = {}) ⇒ DefinitionsDefinitionEntitiesResponse

Allows a user to resume/retry a failed workflow execution, or cancel/stop a currently running workflow execution

Parameters:

  • action_name (String)

    Specify one of these actions: - &#x60;resume&#x60;: resume/retry the workflow execution(s) specified in ids - &#x60;cancel&#x60;: cancel/stop the workflow execution specified in ids

  • body (ClientActionRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1021
1022
1023
1024
# File 'lib/crimson-falcon/api/workflows.rb', line 1021

def workflow_executions_action(action_name, body, opts = {})
  data, _status_code, _headers = workflow_executions_action_with_http_info(action_name, body, opts)
  data
end

#workflow_executions_action_with_http_info(action_name, body, opts = {}) ⇒ Array<(DefinitionsDefinitionEntitiesResponse, Integer, Hash)>

Allows a user to resume/retry a failed workflow execution, or cancel/stop a currently running workflow execution

Parameters:

  • action_name (String)

    Specify one of these actions: - &#x60;resume&#x60;: resume/retry the workflow execution(s) specified in ids - &#x60;cancel&#x60;: cancel/stop the workflow execution specified in ids

  • body (ClientActionRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/crimson-falcon/api/workflows.rb', line 1031

def workflow_executions_action_with_http_info(action_name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_executions_action ...'
  end
  # verify the required parameter 'action_name' is set
  if @api_client.config.client_side_validation && action_name.nil?
    fail ArgumentError, "Missing the required parameter 'action_name' when calling Workflows.workflow_executions_action"
  end
  # verify enum value
  allowable_values = ["resume", "cancel"]
  if @api_client.config.client_side_validation && !allowable_values.include?(action_name)
    fail ArgumentError, "invalid value for \"action_name\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_executions_action"
  end
  # resource path
  local_var_path = '/workflows/entities/execution-actions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'action_name'] = action_name

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DefinitionsDefinitionEntitiesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_executions_action",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_executions_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_executions_combined(opts = {}) ⇒ ApiExecutionResultsResponse

Search workflow executions based on the provided filter

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



1101
1102
1103
1104
# File 'lib/crimson-falcon/api/workflows.rb', line 1101

def workflow_executions_combined(opts = {})
  data, _status_code, _headers = workflow_executions_combined_with_http_info(opts)
  data
end

#workflow_executions_combined_with_http_info(opts = {}) ⇒ Array<(ApiExecutionResultsResponse, Integer, Hash)>

Search workflow executions based on the provided filter

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:

  • (Array<(ApiExecutionResultsResponse, Integer, Hash)>)

    ApiExecutionResultsResponse data, response status code and response headers



1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
# File 'lib/crimson-falcon/api/workflows.rb', line 1113

def workflow_executions_combined_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_executions_combined ...'
  end
  pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/)
  if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Workflows.workflow_executions_combined, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/workflows/combined/executions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiExecutionResultsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_executions_combined",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_executions_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_get_human_input_v1(ids, opts = {}) ⇒ ModelUserInputReadResponse

Gets one or more specific human inputs by their IDs.

Parameters:

  • ids (Array<String>)

    IDs of human inputs to read

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1170
1171
1172
1173
# File 'lib/crimson-falcon/api/workflows.rb', line 1170

def workflow_get_human_input_v1(ids, opts = {})
  data, _status_code, _headers = workflow_get_human_input_v1_with_http_info(ids, opts)
  data
end

#workflow_get_human_input_v1_with_http_info(ids, opts = {}) ⇒ Array<(ModelUserInputReadResponse, Integer, Hash)>

Gets one or more specific human inputs by their IDs.

Parameters:

  • ids (Array<String>)

    IDs of human inputs to read

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ModelUserInputReadResponse, Integer, Hash)>)

    ModelUserInputReadResponse data, response status code and response headers



1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/crimson-falcon/api/workflows.rb', line 1179

def workflow_get_human_input_v1_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_get_human_input_v1 ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling Workflows.workflow_get_human_input_v1"
  end
  # resource path
  local_var_path = '/workflows/entities/human-inputs/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :csv)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ModelUserInputReadResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_get_human_input_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_get_human_input_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_mock_execute(body, opts = {}) ⇒ ApiResourceIDsResponse

Executes a workflow definition with mocks

Parameters:

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (String)

    Definition ID to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

  • :source_event_url (String)

    Used to record a URL to the source that led to triggering this workflow

  • :validate_only (Boolean)

    When enabled, prevents execution after validating mocks from the request body against the mocked entity&#39;s output schema. Mocks provided in the definition by reference are not validated in any case. (default to false)

  • :skip_validation (Boolean)

    When enabled, skips validating mocks from the request body against the mocked entity&#39;s output schema. Mocks provided in the definition by reference are not validated in any case. (default to false)

  • :ignore_activity_mock_references (Boolean)

    When enabled, treats all activity mocks in the definition as disabled for this mock execution. Mocks provided in the request body are treated normally. (default to false)

Returns:



1241
1242
1243
1244
# File 'lib/crimson-falcon/api/workflows.rb', line 1241

def workflow_mock_execute(body, opts = {})
  data, _status_code, _headers = workflow_mock_execute_with_http_info(body, opts)
  data
end

#workflow_mock_execute_with_http_info(body, opts = {}) ⇒ Array<(ApiResourceIDsResponse, Integer, Hash)>

Executes a workflow definition with mocks

Parameters:

Options Hash (opts):

  • :execution_cid (Array<String>)

    CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used.

  • :definition_id (String)

    Definition ID to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :name (String)

    Workflow name to execute, either a name or an ID, or the definition itself in the request body, can be specified.

  • :key (String)

    Key used to help deduplicate executions, if unset a new UUID is used

  • :depth (Integer)

    Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4.

  • :source_event_url (String)

    Used to record a URL to the source that led to triggering this workflow

  • :validate_only (Boolean)

    When enabled, prevents execution after validating mocks from the request body against the mocked entity&#39;s output schema. Mocks provided in the definition by reference are not validated in any case. (default to false)

  • :skip_validation (Boolean)

    When enabled, skips validating mocks from the request body against the mocked entity&#39;s output schema. Mocks provided in the definition by reference are not validated in any case. (default to false)

  • :ignore_activity_mock_references (Boolean)

    When enabled, treats all activity mocks in the definition as disabled for this mock execution. Mocks provided in the request body are treated normally. (default to false)

Returns:

  • (Array<(ApiResourceIDsResponse, Integer, Hash)>)

    ApiResourceIDsResponse data, response status code and response headers



1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
# File 'lib/crimson-falcon/api/workflows.rb', line 1259

def workflow_mock_execute_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_mock_execute ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_mock_execute"
  end
  # resource path
  local_var_path = '/workflows/entities/mock-executions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'execution_cid'] = @api_client.build_collection_param(opts[:'execution_cid'], :csv) if !opts[:'execution_cid'].nil?
  query_params[:'definition_id'] = opts[:'definition_id'] if !opts[:'definition_id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'source_event_url'] = opts[:'source_event_url'] if !opts[:'source_event_url'].nil?
  query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].nil?
  query_params[:'skip_validation'] = opts[:'skip_validation'] if !opts[:'skip_validation'].nil?
  query_params[:'ignore_activity_mock_references'] = opts[:'ignore_activity_mock_references'] if !opts[:'ignore_activity_mock_references'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiResourceIDsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_mock_execute",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_mock_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_system_definitions_de_provision(body, opts = {}) ⇒ ClientSystemDefinitionCreateResponse

Deprovisions a system definition that was previously provisioned on the target CID

Parameters:

Returns:



1325
1326
1327
1328
# File 'lib/crimson-falcon/api/workflows.rb', line 1325

def workflow_system_definitions_de_provision(body, opts = {})
  data, _status_code, _headers = workflow_system_definitions_de_provision_with_http_info(body, opts)
  data
end

#workflow_system_definitions_de_provision_with_http_info(body, opts = {}) ⇒ Array<(ClientSystemDefinitionCreateResponse, Integer, Hash)>

Deprovisions a system definition that was previously provisioned on the target CID

Parameters:

Returns:



1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
# File 'lib/crimson-falcon/api/workflows.rb', line 1334

def workflow_system_definitions_de_provision_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_system_definitions_de_provision ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_system_definitions_de_provision"
  end
  # resource path
  local_var_path = '/workflows/system-definitions/deprovision/v1'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ClientSystemDefinitionCreateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_system_definitions_de_provision",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_system_definitions_de_provision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_system_definitions_promote(body, opts = {}) ⇒ ClientSystemDefinitionCreateResponse

Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated.

Parameters:

Returns:



1391
1392
1393
1394
# File 'lib/crimson-falcon/api/workflows.rb', line 1391

def workflow_system_definitions_promote(body, opts = {})
  data, _status_code, _headers = workflow_system_definitions_promote_with_http_info(body, opts)
  data
end

#workflow_system_definitions_promote_with_http_info(body, opts = {}) ⇒ Array<(ClientSystemDefinitionCreateResponse, Integer, Hash)>

Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated.

Parameters:

Returns:



1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
# File 'lib/crimson-falcon/api/workflows.rb', line 1400

def workflow_system_definitions_promote_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_system_definitions_promote ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_system_definitions_promote"
  end
  # resource path
  local_var_path = '/workflows/system-definitions/promote/v1'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ClientSystemDefinitionCreateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_system_definitions_promote",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_system_definitions_promote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_system_definitions_provision(body, opts = {}) ⇒ ClientSystemDefinitionCreateResponse

Provisions a system definition onto the target CID by using the template and provided parameters

Parameters:

Returns:



1457
1458
1459
1460
# File 'lib/crimson-falcon/api/workflows.rb', line 1457

def workflow_system_definitions_provision(body, opts = {})
  data, _status_code, _headers = workflow_system_definitions_provision_with_http_info(body, opts)
  data
end

#workflow_system_definitions_provision_with_http_info(body, opts = {}) ⇒ Array<(ClientSystemDefinitionCreateResponse, Integer, Hash)>

Provisions a system definition onto the target CID by using the template and provided parameters

Parameters:

Returns:



1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
# File 'lib/crimson-falcon/api/workflows.rb', line 1466

def workflow_system_definitions_provision_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_system_definitions_provision ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_system_definitions_provision"
  end
  # resource path
  local_var_path = '/workflows/system-definitions/provision/v1'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ClientSystemDefinitionCreateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_system_definitions_provision",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_system_definitions_provision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_triggers_combined(opts = {}) ⇒ TriggersTriggerExternalResponse

Search for triggers by namespaced identifier, i.e. FalconAudit, Detection, or FalconAudit/Detection/Status. Returns all triggers if no filter specified

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

Returns:



1525
1526
1527
1528
# File 'lib/crimson-falcon/api/workflows.rb', line 1525

def workflow_triggers_combined(opts = {})
  data, _status_code, _headers = workflow_triggers_combined_with_http_info(opts)
  data
end

#workflow_triggers_combined_with_http_info(opts = {}) ⇒ Array<(TriggersTriggerExternalResponse, Integer, Hash)>

Search for triggers by namespaced identifier, i.e. FalconAudit, Detection, or FalconAudit/Detection/Status. Returns all triggers if no filter specified

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL query specifying filter parameters.

  • :offset (String)

    Starting pagination offset of records to return.

  • :limit (Integer)

    Maximum number of records to return.

Returns:



1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
# File 'lib/crimson-falcon/api/workflows.rb', line 1536

def workflow_triggers_combined_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_triggers_combined ...'
  end
  # resource path
  local_var_path = '/workflows/combined/triggers/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TriggersTriggerExternalResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_triggers_combined",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_triggers_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_update_human_input_v1(id, body, opts = {}) ⇒ ApiResourceIDsResponse

Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted.

Parameters:

  • id (String)

    ID of human input to provide an input to

  • body (ModelUserInputUpdateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1588
1589
1590
1591
# File 'lib/crimson-falcon/api/workflows.rb', line 1588

def workflow_update_human_input_v1(id, body, opts = {})
  data, _status_code, _headers = workflow_update_human_input_v1_with_http_info(id, body, opts)
  data
end

#workflow_update_human_input_v1_with_http_info(id, body, opts = {}) ⇒ Array<(ApiResourceIDsResponse, Integer, Hash)>

Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted.

Parameters:

  • id (String)

    ID of human input to provide an input to

  • body (ModelUserInputUpdateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiResourceIDsResponse, Integer, Hash)>)

    ApiResourceIDsResponse data, response status code and response headers



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
# File 'lib/crimson-falcon/api/workflows.rb', line 1598

def workflow_update_human_input_v1_with_http_info(id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Workflows.workflow_update_human_input_v1 ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling Workflows.workflow_update_human_input_v1"
  end
  if @api_client.config.client_side_validation && id.to_s.length > 32
    fail ArgumentError, 'invalid value for "id" when calling Workflows.workflow_update_human_input_v1, the character length must be smaller than or equal to 32.'
  end

  if @api_client.config.client_side_validation && id.to_s.length < 32
    fail ArgumentError, 'invalid value for "id" when calling Workflows.workflow_update_human_input_v1, the character length must be great than or equal to 32.'
  end

  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Workflows.workflow_update_human_input_v1"
  end
  # resource path
  local_var_path = '/workflows/entities/human-inputs/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiResourceIDsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Workflows.workflow_update_human_input_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Workflows#workflow_update_human_input_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end