Class: SwaggerClient::ExecutionsControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_client/api/executions_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ExecutionsControllerApi

Returns a new instance of ExecutionsControllerApi.



19
20
21
# File 'lib/swagger_client/api/executions_controller_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/swagger_client/api/executions_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_latest_executions_by_config_ids_using_get(opts = {}) ⇒ Array<Object>

Retrieves an ad-hoc collection of executions based on a number of user-supplied parameters. Either executionIds or pipelineConfigIds must be supplied in order to return any results. If both are supplied, an exception will be thrown.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :pipeline_config_ids (String)

    A comma-separated list of pipeline configuration IDs to retrieve recent executions for. Either this OR pipelineConfigIds must be supplied, but not both.

  • :execution_ids (String)

    A comma-separated list of executions to retrieve. Either this OR pipelineConfigIds must be supplied, but not both.

  • :limit (Integer)

    The number of executions to return per pipeline configuration. Ignored if executionIds parameter is supplied. If this value is missing, it is defaulted to 1.

  • :statuses (String)

    A comma-separated list of execution statuses to filter by. Ignored if executionIds parameter is supplied. If this value is missing, it is defaulted to all statuses.

  • :expand (BOOLEAN)

    Expands each execution object in the resulting list. If this value is missing, it is defaulted to true. (default to true)

Returns:

  • (Array<Object>)


30
31
32
33
# File 'lib/swagger_client/api/executions_controller_api.rb', line 30

def get_latest_executions_by_config_ids_using_get(opts = {})
  data, _status_code, _headers = get_latest_executions_by_config_ids_using_get_with_http_info(opts)
  data
end

#get_latest_executions_by_config_ids_using_get_with_http_info(opts = {}) ⇒ Array<(Array<Object>, Fixnum, Hash)>

Retrieves an ad-hoc collection of executions based on a number of user-supplied parameters. Either executionIds or pipelineConfigIds must be supplied in order to return any results. If both are supplied, an exception will be thrown.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :pipeline_config_ids (String)

    A comma-separated list of pipeline configuration IDs to retrieve recent executions for. Either this OR pipelineConfigIds must be supplied, but not both.

  • :execution_ids (String)

    A comma-separated list of executions to retrieve. Either this OR pipelineConfigIds must be supplied, but not both.

  • :limit (Integer)

    The number of executions to return per pipeline configuration. Ignored if executionIds parameter is supplied. If this value is missing, it is defaulted to 1.

  • :statuses (String)

    A comma-separated list of execution statuses to filter by. Ignored if executionIds parameter is supplied. If this value is missing, it is defaulted to all statuses.

  • :expand (BOOLEAN)

    Expands each execution object in the resulting list. If this value is missing, it is defaulted to true.

Returns:

  • (Array<(Array<Object>, Fixnum, Hash)>)

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



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/swagger_client/api/executions_controller_api.rb', line 43

def get_latest_executions_by_config_ids_using_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ExecutionsControllerApi.get_latest_executions_by_config_ids_using_get ...'
  end
  # resource path
  local_var_path = '/executions'

  # query parameters
  query_params = {}
  query_params[:'pipelineConfigIds'] = opts[:'pipeline_config_ids'] if !opts[:'pipeline_config_ids'].nil?
  query_params[:'executionIds'] = opts[:'execution_ids'] if !opts[:'execution_ids'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'statuses'] = opts[:'statuses'] if !opts[:'statuses'].nil?
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Object>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ExecutionsControllerApi#get_latest_executions_by_config_ids_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_for_pipeline_executions_by_trigger_using_get(application, opts = {}) ⇒ Array<Object>

Search for pipeline executions using a combination of criteria. The returned list is sorted by buildTime (trigger time) in reverse order so that newer executions are first in the list.

Parameters:

  • application

    Only includes executions that are part of this application. If this value is &quot;*&quot;, results will include executions of all applications.

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

    the optional parameters

Options Hash (opts):

  • :trigger_types (String)

    Only includes executions that were triggered by a trigger with a type that is equal to a type provided in this field. The list of trigger types should be a comma-delimited string. If this value is missing, results will includes executions of all trigger types.

  • :pipeline_name (String)

    Only includes executions that with this pipeline name.

  • :event_id (String)

    Only includes executions that were triggered by a trigger with this eventId.

  • :trigger (String)

    Only includes executions that were triggered by a trigger that matches the subset of fields provided by this value. This value should be a base64-encoded string of a JSON representation of a trigger object. The comparison succeeds if the execution trigger contains all the fields of the input trigger, the fields are of the same type, and each value of the field &quot;matches&quot;. The term &quot;matches&quot; is specific for each field&#39;s type: - For Strings: A String value in the execution&#39;s trigger matches the input trigger&#39;s String value if the former equals the latter (case-insensitive) OR if the former matches the latter as a regular expression. - For Maps: A Map value in the execution&#39;s trigger matches the input trigger&#39;s Map value if the former contains all keys of the latter and their values match. - For Collections: A Collection value in the execution&#39;s trigger matches the input trigger&#39;s Collection value if the former has a unique element that matches each element of the latter. - Every other value is compared using the Java &quot;equals&quot; method (Groovy &quot;&#x3D;&#x3D;&quot; operator)

  • :trigger_time_start_boundary (Integer)

    Only includes executions that were built at or after the given time, represented as a Unix timestamp in ms (UTC). This value must be &gt;&#x3D; 0 and &lt;&#x3D; the value of [triggerTimeEndBoundary], if provided. If this value is missing, it is defaulted to 0. (default to 0)

  • :trigger_time_end_boundary (Integer)

    Only includes executions that were built at or before the given time, represented as a Unix timestamp in ms (UTC). This value must be &lt;&#x3D; 9223372036854775807 (Long.MAX_VALUE) and &gt;&#x3D; the value of [triggerTimeStartBoundary], if provided. If this value is missing, it is defaulted to 9223372036854775807.

  • :statuses (String)

    Only includes executions with a status that is equal to a status provided in this field. The list of statuses should be given as a comma-delimited string. If this value is missing, includes executions of all statuses. Allowed statuses are: NOT_STARTED, RUNNING, PAUSED, SUSPENDED, SUCCEEDED, FAILED_CONTINUE, TERMINAL, CANCELED, REDIRECT, STOPPED, SKIPPED, BUFFERED.

  • :start_index (Integer)

    Sets the first item of the resulting list for pagination. The list is 0-indexed. This value must be &gt;&#x3D; 0. If this value is missing, it is defaulted to 0. (default to 0)

  • :size (Integer)

    Sets the size of the resulting list for pagination. This value must be &gt; 0. If this value is missing, it is defaulted to 10. (default to 10)

  • :reverse (BOOLEAN)

    Reverses the resulting list before it is paginated. If this value is missing, it is defaulted to false. (default to false)

  • :expand (BOOLEAN)

    Expands each execution object in the resulting list. If this value is missing, it is defaulted to false. (default to false)

Returns:

  • (Array<Object>)


98
99
100
101
# File 'lib/swagger_client/api/executions_controller_api.rb', line 98

def search_for_pipeline_executions_by_trigger_using_get(application, opts = {})
  data, _status_code, _headers = search_for_pipeline_executions_by_trigger_using_get_with_http_info(application, opts)
  data
end

#search_for_pipeline_executions_by_trigger_using_get_with_http_info(application, opts = {}) ⇒ Array<(Array<Object>, Fixnum, Hash)>

Search for pipeline executions using a combination of criteria. The returned list is sorted by buildTime (trigger time) in reverse order so that newer executions are first in the list.

Parameters:

  • application

    Only includes executions that are part of this application. If this value is &quot;*&quot;, results will include executions of all applications.

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

    the optional parameters

Options Hash (opts):

  • :trigger_types (String)

    Only includes executions that were triggered by a trigger with a type that is equal to a type provided in this field. The list of trigger types should be a comma-delimited string. If this value is missing, results will includes executions of all trigger types.

  • :pipeline_name (String)

    Only includes executions that with this pipeline name.

  • :event_id (String)

    Only includes executions that were triggered by a trigger with this eventId.

  • :trigger (String)

    Only includes executions that were triggered by a trigger that matches the subset of fields provided by this value. This value should be a base64-encoded string of a JSON representation of a trigger object. The comparison succeeds if the execution trigger contains all the fields of the input trigger, the fields are of the same type, and each value of the field &quot;matches&quot;. The term &quot;matches&quot; is specific for each field&#39;s type: - For Strings: A String value in the execution&#39;s trigger matches the input trigger&#39;s String value if the former equals the latter (case-insensitive) OR if the former matches the latter as a regular expression. - For Maps: A Map value in the execution&#39;s trigger matches the input trigger&#39;s Map value if the former contains all keys of the latter and their values match. - For Collections: A Collection value in the execution&#39;s trigger matches the input trigger&#39;s Collection value if the former has a unique element that matches each element of the latter. - Every other value is compared using the Java &quot;equals&quot; method (Groovy &quot;&#x3D;&#x3D;&quot; operator)

  • :trigger_time_start_boundary (Integer)

    Only includes executions that were built at or after the given time, represented as a Unix timestamp in ms (UTC). This value must be &gt;&#x3D; 0 and &lt;&#x3D; the value of [triggerTimeEndBoundary], if provided. If this value is missing, it is defaulted to 0.

  • :trigger_time_end_boundary (Integer)

    Only includes executions that were built at or before the given time, represented as a Unix timestamp in ms (UTC). This value must be &lt;&#x3D; 9223372036854775807 (Long.MAX_VALUE) and &gt;&#x3D; the value of [triggerTimeStartBoundary], if provided. If this value is missing, it is defaulted to 9223372036854775807.

  • :statuses (String)

    Only includes executions with a status that is equal to a status provided in this field. The list of statuses should be given as a comma-delimited string. If this value is missing, includes executions of all statuses. Allowed statuses are: NOT_STARTED, RUNNING, PAUSED, SUSPENDED, SUCCEEDED, FAILED_CONTINUE, TERMINAL, CANCELED, REDIRECT, STOPPED, SKIPPED, BUFFERED.

  • :start_index (Integer)

    Sets the first item of the resulting list for pagination. The list is 0-indexed. This value must be &gt;&#x3D; 0. If this value is missing, it is defaulted to 0.

  • :size (Integer)

    Sets the size of the resulting list for pagination. This value must be &gt; 0. If this value is missing, it is defaulted to 10.

  • :reverse (BOOLEAN)

    Reverses the resulting list before it is paginated. If this value is missing, it is defaulted to false.

  • :expand (BOOLEAN)

    Expands each execution object in the resulting list. If this value is missing, it is defaulted to false.

Returns:

  • (Array<(Array<Object>, Fixnum, Hash)>)

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



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/swagger_client/api/executions_controller_api.rb', line 118

def search_for_pipeline_executions_by_trigger_using_get_with_http_info(application, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ExecutionsControllerApi.search_for_pipeline_executions_by_trigger_using_get ...'
  end
  # verify the required parameter 'application' is set
  if @api_client.config.client_side_validation && application.nil?
    fail ArgumentError, "Missing the required parameter 'application' when calling ExecutionsControllerApi.search_for_pipeline_executions_by_trigger_using_get"
  end
  # resource path
  local_var_path = '/applications/{application}/executions/search'.sub('{' + 'application' + '}', application.to_s)

  # query parameters
  query_params = {}
  query_params[:'triggerTypes'] = opts[:'trigger_types'] if !opts[:'trigger_types'].nil?
  query_params[:'pipelineName'] = opts[:'pipeline_name'] if !opts[:'pipeline_name'].nil?
  query_params[:'eventId'] = opts[:'event_id'] if !opts[:'event_id'].nil?
  query_params[:'trigger'] = opts[:'trigger'] if !opts[:'trigger'].nil?
  query_params[:'triggerTimeStartBoundary'] = opts[:'trigger_time_start_boundary'] if !opts[:'trigger_time_start_boundary'].nil?
  query_params[:'triggerTimeEndBoundary'] = opts[:'trigger_time_end_boundary'] if !opts[:'trigger_time_end_boundary'].nil?
  query_params[:'statuses'] = opts[:'statuses'] if !opts[:'statuses'].nil?
  query_params[:'startIndex'] = opts[:'start_index'] if !opts[:'start_index'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'reverse'] = opts[:'reverse'] if !opts[:'reverse'].nil?
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Object>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ExecutionsControllerApi#search_for_pipeline_executions_by_trigger_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end