Class: Conductor::Http::Api::WorkflowBulkResourceApi
- Inherits:
-
Object
- Object
- Conductor::Http::Api::WorkflowBulkResourceApi
- Defined in:
- lib/conductor/http/api/workflow_bulk_resource_api.rb
Overview
WorkflowBulkResourceApi - Bulk operations on workflows
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = nil) ⇒ WorkflowBulkResourceApi
constructor
A new instance of WorkflowBulkResourceApi.
-
#pause_workflow(workflow_ids) ⇒ BulkResponse
Pause workflows in bulk.
-
#restart(workflow_ids, use_latest_definitions: false) ⇒ BulkResponse
Restart workflows in bulk.
-
#resume_workflow(workflow_ids) ⇒ BulkResponse
Resume workflows in bulk.
-
#retry(workflow_ids) ⇒ BulkResponse
Retry workflows in bulk.
-
#terminate(workflow_ids, reason: nil, trigger_failure_workflow: false) ⇒ BulkResponse
Terminate workflows in bulk.
Constructor Details
#initialize(api_client = nil) ⇒ WorkflowBulkResourceApi
Returns a new instance of WorkflowBulkResourceApi.
12 13 14 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 12 def initialize(api_client = nil) @api_client = api_client || ApiClient.new end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
10 11 12 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 10 def api_client @api_client end |
Instance Method Details
#pause_workflow(workflow_ids) ⇒ BulkResponse
Pause workflows in bulk
19 20 21 22 23 24 25 26 27 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 19 def pause_workflow(workflow_ids) @api_client.call_api( '/workflow/bulk/pause', 'PUT', body: workflow_ids, return_type: 'BulkResponse', return_http_data_only: true ) end |
#restart(workflow_ids, use_latest_definitions: false) ⇒ BulkResponse
Restart workflows in bulk
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 46 def restart(workflow_ids, use_latest_definitions: false) @api_client.call_api( '/workflow/bulk/restart', 'POST', query_params: { useLatestDefinitions: use_latest_definitions }, body: workflow_ids, return_type: 'BulkResponse', return_http_data_only: true ) end |
#resume_workflow(workflow_ids) ⇒ BulkResponse
Resume workflows in bulk
32 33 34 35 36 37 38 39 40 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 32 def resume_workflow(workflow_ids) @api_client.call_api( '/workflow/bulk/resume', 'PUT', body: workflow_ids, return_type: 'BulkResponse', return_http_data_only: true ) end |
#retry(workflow_ids) ⇒ BulkResponse
Retry workflows in bulk
60 61 62 63 64 65 66 67 68 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 60 def retry(workflow_ids) @api_client.call_api( '/workflow/bulk/retry', 'POST', body: workflow_ids, return_type: 'BulkResponse', return_http_data_only: true ) end |
#terminate(workflow_ids, reason: nil, trigger_failure_workflow: false) ⇒ BulkResponse
Terminate workflows in bulk
75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/conductor/http/api/workflow_bulk_resource_api.rb', line 75 def terminate(workflow_ids, reason: nil, trigger_failure_workflow: false) query_params = { triggerFailureWorkflow: trigger_failure_workflow } query_params[:reason] = reason if reason @api_client.call_api( '/workflow/bulk/terminate', 'POST', query_params: query_params, body: workflow_ids, return_type: 'BulkResponse', return_http_data_only: true ) end |