Class: HatchetSdkRest::StepRunApi

Inherits:
Object
  • Object
show all
Defined in:
lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ StepRunApi

Returns a new instance of StepRunApi.



19
20
21
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_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/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#step_run_get(tenant, step_run, opts = {}) ⇒ StepRun

Get step run Get a step run by id

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 28

def step_run_get(tenant, step_run, opts = {})
  data, _status_code, _headers = step_run_get_with_http_info(tenant, step_run, opts)
  data
end

#step_run_get_schema(tenant, step_run, opts = {}) ⇒ Object

Get step run schema Get the schema for a step run

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

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

    the optional parameters

Returns:

  • (Object)


113
114
115
116
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 113

def step_run_get_schema(tenant, step_run, opts = {})
  data, _status_code, _headers = step_run_get_schema_with_http_info(tenant, step_run, opts)
  data
end

#step_run_get_schema_with_http_info(tenant, step_run, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get step run schema Get the schema for a step run

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 124

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

  if @api_client.config.client_side_validation && tenant.to_s.length < 36
    fail ArgumentError, 'invalid value for "tenant" when calling StepRunApi.step_run_get_schema, the character length must be greater than or equal to 36.'
  end

  # verify the required parameter 'step_run' is set
  if @api_client.config.client_side_validation && step_run.nil?
    fail ArgumentError, "Missing the required parameter 'step_run' when calling StepRunApi.step_run_get_schema"
  end
  if @api_client.config.client_side_validation && step_run.to_s.length > 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_get_schema, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && step_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_get_schema, the character length must be greater than or equal to 36.'
  end

  # resource path
  local_var_path = '/api/v1/tenants/{tenant}/step-runs/{step-run}/schema'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'step-run' + '}', CGI.escape(step_run.to_s))

  # 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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.step_run_get_schema",
    :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: StepRunApi#step_run_get_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#step_run_get_with_http_info(tenant, step_run, opts = {}) ⇒ Array<(StepRun, Integer, Hash)>

Get step run Get a step run by id

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

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

    the optional parameters

Returns:

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

    StepRun data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 39

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

  if @api_client.config.client_side_validation && tenant.to_s.length < 36
    fail ArgumentError, 'invalid value for "tenant" when calling StepRunApi.step_run_get, the character length must be greater than or equal to 36.'
  end

  # verify the required parameter 'step_run' is set
  if @api_client.config.client_side_validation && step_run.nil?
    fail ArgumentError, "Missing the required parameter 'step_run' when calling StepRunApi.step_run_get"
  end
  if @api_client.config.client_side_validation && step_run.to_s.length > 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_get, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && step_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_get, the character length must be greater than or equal to 36.'
  end

  # resource path
  local_var_path = '/api/v1/tenants/{tenant}/step-runs/{step-run}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'step-run' + '}', CGI.escape(step_run.to_s))

  # 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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.step_run_get",
    :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: StepRunApi#step_run_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#step_run_list_archives(step_run, opts = {}) ⇒ StepRunArchiveList

List archives for step run List archives for a step run

Parameters:

  • step_run (String)

    The step run id

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The number to skip

  • :limit (Integer)

    The number to limit by

Returns:



199
200
201
202
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 199

def step_run_list_archives(step_run, opts = {})
  data, _status_code, _headers = step_run_list_archives_with_http_info(step_run, opts)
  data
end

#step_run_list_archives_with_http_info(step_run, opts = {}) ⇒ Array<(StepRunArchiveList, Integer, Hash)>

List archives for step run List archives for a step run

Parameters:

  • step_run (String)

    The step run id

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The number to skip

  • :limit (Integer)

    The number to limit by

Returns:

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

    StepRunArchiveList data, response status code and response headers



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 211

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

  if @api_client.config.client_side_validation && step_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_list_archives, the character length must be greater than or equal to 36.'
  end

  # resource path
  local_var_path = '/api/v1/step-runs/{step-run}/archives'.sub('{' + 'step-run' + '}', CGI.escape(step_run.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.step_run_list_archives",
    :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: StepRunApi#step_run_list_archives\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#step_run_list_events(step_run, opts = {}) ⇒ StepRunEventList

List events for step run List events for a step run

Parameters:

  • step_run (String)

    The step run id

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The number to skip

  • :limit (Integer)

    The number to limit by

Returns:



276
277
278
279
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 276

def step_run_list_events(step_run, opts = {})
  data, _status_code, _headers = step_run_list_events_with_http_info(step_run, opts)
  data
end

#step_run_list_events_with_http_info(step_run, opts = {}) ⇒ Array<(StepRunEventList, Integer, Hash)>

List events for step run List events for a step run

Parameters:

  • step_run (String)

    The step run id

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The number to skip

  • :limit (Integer)

    The number to limit by

Returns:

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

    StepRunEventList data, response status code and response headers



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 288

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

  if @api_client.config.client_side_validation && step_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_list_events, the character length must be greater than or equal to 36.'
  end

  # resource path
  local_var_path = '/api/v1/step-runs/{step-run}/events'.sub('{' + 'step-run' + '}', CGI.escape(step_run.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.step_run_list_events",
    :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: StepRunApi#step_run_list_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#step_run_update_cancel(tenant, step_run, opts = {}) ⇒ StepRun

Attempts to cancel a step run Attempts to cancel a step run

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

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

    the optional parameters

Returns:



352
353
354
355
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 352

def step_run_update_cancel(tenant, step_run, opts = {})
  data, _status_code, _headers = step_run_update_cancel_with_http_info(tenant, step_run, opts)
  data
end

#step_run_update_cancel_with_http_info(tenant, step_run, opts = {}) ⇒ Array<(StepRun, Integer, Hash)>

Attempts to cancel a step run Attempts to cancel a step run

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

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

    the optional parameters

Returns:

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

    StepRun data, response status code and response headers



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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 363

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

  if @api_client.config.client_side_validation && tenant.to_s.length < 36
    fail ArgumentError, 'invalid value for "tenant" when calling StepRunApi.step_run_update_cancel, the character length must be greater than or equal to 36.'
  end

  # verify the required parameter 'step_run' is set
  if @api_client.config.client_side_validation && step_run.nil?
    fail ArgumentError, "Missing the required parameter 'step_run' when calling StepRunApi.step_run_update_cancel"
  end
  if @api_client.config.client_side_validation && step_run.to_s.length > 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_update_cancel, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && step_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_update_cancel, the character length must be greater than or equal to 36.'
  end

  # resource path
  local_var_path = '/api/v1/tenants/{tenant}/step-runs/{step-run}/cancel'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'step-run' + '}', CGI.escape(step_run.to_s))

  # 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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.step_run_update_cancel",
    :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: StepRunApi#step_run_update_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#step_run_update_rerun(tenant, step_run, rerun_step_run_request, opts = {}) ⇒ StepRun

Rerun step run Reruns a step run

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

  • rerun_step_run_request (RerunStepRunRequest)

    The input to the rerun

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

    the optional parameters

Returns:



438
439
440
441
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 438

def step_run_update_rerun(tenant, step_run, rerun_step_run_request, opts = {})
  data, _status_code, _headers = step_run_update_rerun_with_http_info(tenant, step_run, rerun_step_run_request, opts)
  data
end

#step_run_update_rerun_with_http_info(tenant, step_run, rerun_step_run_request, opts = {}) ⇒ Array<(StepRun, Integer, Hash)>

Rerun step run Reruns a step run

Parameters:

  • tenant (String)

    The tenant id

  • step_run (String)

    The step run id

  • rerun_step_run_request (RerunStepRunRequest)

    The input to the rerun

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

    the optional parameters

Returns:

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

    StepRun data, response status code and response headers



450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
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
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 450

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

  if @api_client.config.client_side_validation && tenant.to_s.length < 36
    fail ArgumentError, 'invalid value for "tenant" when calling StepRunApi.step_run_update_rerun, the character length must be greater than or equal to 36.'
  end

  # verify the required parameter 'step_run' is set
  if @api_client.config.client_side_validation && step_run.nil?
    fail ArgumentError, "Missing the required parameter 'step_run' when calling StepRunApi.step_run_update_rerun"
  end
  if @api_client.config.client_side_validation && step_run.to_s.length > 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_update_rerun, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && step_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "step_run" when calling StepRunApi.step_run_update_rerun, the character length must be greater than or equal to 36.'
  end

  # verify the required parameter 'rerun_step_run_request' is set
  if @api_client.config.client_side_validation && rerun_step_run_request.nil?
    fail ArgumentError, "Missing the required parameter 'rerun_step_run_request' when calling StepRunApi.step_run_update_rerun"
  end
  # resource path
  local_var_path = '/api/v1/tenants/{tenant}/step-runs/{step-run}/rerun'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'step-run' + '}', CGI.escape(step_run.to_s))

  # 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']) unless header_params['Accept']
  # 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(rerun_step_run_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.step_run_update_rerun",
    :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: StepRunApi#step_run_update_rerun\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#workflow_run_list_step_run_events(tenant, workflow_run, opts = {}) ⇒ StepRunEventList

List events for all step runs for a workflow run List events for all step runs for a workflow run

Parameters:

  • tenant (String)

    The tenant id

  • workflow_run (String)

    The workflow run id

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

    the optional parameters

Options Hash (opts):

  • :last_id (Integer)

    Last ID of the last event

Returns:



534
535
536
537
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 534

def workflow_run_list_step_run_events(tenant, workflow_run, opts = {})
  data, _status_code, _headers = workflow_run_list_step_run_events_with_http_info(tenant, workflow_run, opts)
  data
end

#workflow_run_list_step_run_events_with_http_info(tenant, workflow_run, opts = {}) ⇒ Array<(StepRunEventList, Integer, Hash)>

List events for all step runs for a workflow run List events for all step runs for a workflow run

Parameters:

  • tenant (String)

    The tenant id

  • workflow_run (String)

    The workflow run id

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

    the optional parameters

Options Hash (opts):

  • :last_id (Integer)

    Last ID of the last event

Returns:

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

    StepRunEventList data, response status code and response headers



546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
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
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb', line 546

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

  if @api_client.config.client_side_validation && tenant.to_s.length < 36
    fail ArgumentError, 'invalid value for "tenant" when calling StepRunApi.workflow_run_list_step_run_events, the character length must be greater than or equal to 36.'
  end

  # verify the required parameter 'workflow_run' is set
  if @api_client.config.client_side_validation && workflow_run.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_run' when calling StepRunApi.workflow_run_list_step_run_events"
  end
  if @api_client.config.client_side_validation && workflow_run.to_s.length > 36
    fail ArgumentError, 'invalid value for "workflow_run" when calling StepRunApi.workflow_run_list_step_run_events, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && workflow_run.to_s.length < 36
    fail ArgumentError, 'invalid value for "workflow_run" when calling StepRunApi.workflow_run_list_step_run_events, the character length must be greater than or equal to 36.'
  end

  # resource path
  local_var_path = '/api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/step-run-events'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'workflow-run' + '}', CGI.escape(workflow_run.to_s))

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

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

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']

  new_options = opts.merge(
    :operation => :"StepRunApi.workflow_run_list_step_run_events",
    :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: StepRunApi#workflow_run_list_step_run_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end