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.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

#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:



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

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:



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

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:



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

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:



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

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_combined(opts = {}) ⇒ DefinitionsDefinitionExternalResponse

Search workflow definitions 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:



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

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

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:



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

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_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>)


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

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



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

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)

Returns:



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

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)

Returns:



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/crimson-falcon/api/workflows.rb', line 345

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?

  # 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:



406
407
408
409
# File 'lib/crimson-falcon/api/workflows.rb', line 406

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



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/crimson-falcon/api/workflows.rb', line 416

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:



480
481
482
483
# File 'lib/crimson-falcon/api/workflows.rb', line 480

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:



565
566
567
568
# File 'lib/crimson-falcon/api/workflows.rb', line 565

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



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
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# File 'lib/crimson-falcon/api/workflows.rb', line 581

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_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



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
541
542
543
544
545
546
547
548
549
550
551
552
# File 'lib/crimson-falcon/api/workflows.rb', line 495

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

Returns:



645
646
647
648
# File 'lib/crimson-falcon/api/workflows.rb', line 645

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

Returns:

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

    ApiExecutionResultsResponse data, response status code and response headers



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
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/crimson-falcon/api/workflows.rb', line 654

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

  # 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)

  # 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.

Parameters:

  • action_name (String)

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

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

    the optional parameters

Returns:



716
717
718
719
# File 'lib/crimson-falcon/api/workflows.rb', line 716

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.

Parameters:

  • action_name (String)

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

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

    the optional parameters

Returns:



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
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
# File 'lib/crimson-falcon/api/workflows.rb', line 726

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"]
  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:



796
797
798
799
# File 'lib/crimson-falcon/api/workflows.rb', line 796

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



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

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:



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

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



874
875
876
877
878
879
880
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
# File 'lib/crimson-falcon/api/workflows.rb', line 874

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 against definition (default to false)

Returns:



934
935
936
937
# File 'lib/crimson-falcon/api/workflows.rb', line 934

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 against definition (default to false)

Returns:

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

    ApiResourceIDsResponse data, response status code and response headers



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

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?

  # 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:



1014
1015
1016
1017
# File 'lib/crimson-falcon/api/workflows.rb', line 1014

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:



1023
1024
1025
1026
1027
1028
1029
1030
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
# File 'lib/crimson-falcon/api/workflows.rb', line 1023

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:



1080
1081
1082
1083
# File 'lib/crimson-falcon/api/workflows.rb', line 1080

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:



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
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
# File 'lib/crimson-falcon/api/workflows.rb', line 1089

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:



1146
1147
1148
1149
# File 'lib/crimson-falcon/api/workflows.rb', line 1146

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:



1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
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
# File 'lib/crimson-falcon/api/workflows.rb', line 1155

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.

Returns:



1212
1213
1214
1215
# File 'lib/crimson-falcon/api/workflows.rb', line 1212

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.

Returns:



1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/crimson-falcon/api/workflows.rb', line 1221

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?

  # 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:



1271
1272
1273
1274
# File 'lib/crimson-falcon/api/workflows.rb', line 1271

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



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
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
# File 'lib/crimson-falcon/api/workflows.rb', line 1281

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