Class: Nodeum::TasksApi

Inherits:
Object
  • Object
show all
Defined in:
lib/nodeum_sdk/api/tasks_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TasksApi

Returns a new instance of TasksApi.



19
20
21
# File 'lib/nodeum_sdk/api/tasks_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/nodeum_sdk/api/tasks_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_task(task_body, opts = {}) ⇒ Task

Creates a new task. **API Key Scope**: tasks / create

Parameters:

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 27

def create_task(task_body, opts = {})
  data, _status_code, _headers = create_task_with_http_info(task_body, opts)
  data
end

#create_task_with_http_info(task_body, opts = {}) ⇒ Array<(Task, Integer, Hash)>

Creates a new task. **API Key Scope**: tasks / create

Parameters:

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

    the optional parameters

Returns:

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

    Task data, response status code and response headers



37
38
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
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 37

def create_task_with_http_info(task_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.create_task ...'
  end
  # verify the required parameter 'task_body' is set
  if @api_client.config.client_side_validation && task_body.nil?
    fail ArgumentError, "Missing the required parameter 'task_body' when calling TasksApi.create_task"
  end
  # resource path
  local_var_path = '/tasks'

  # 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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Task' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#destroy_task(task_id, opts = {}) ⇒ nil

Destroys a specific task. **API Key Scope**: tasks / destroy

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

  • (nil)


91
92
93
94
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 91

def destroy_task(task_id, opts = {})
  destroy_task_with_http_info(task_id, opts)
  nil
end

#destroy_task_with_http_info(task_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Destroys a specific task. **API Key Scope**: tasks / destroy

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 101

def destroy_task_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.destroy_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.destroy_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}'.sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

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

#index_tasks(opts = {}) ⇒ TaskCollection

Lists all tasks. **API Key Scope**: tasks / index

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

  • :sort_by (Array<String>)

    Sort results by attribute. Can sort on multiple attributes, separated by &#x60;|&#x60;. Order direction can be suffixing the attribute by either &#x60;:asc&#x60; (default) or &#x60;:desc&#x60;.

  • :id (String)

    Filter on id

  • :name (String)

    Filter on name

  • :comment (String)

    Filter on comment

  • :workflow_type (String)

    Filter on task workflow type

  • :workflow_action (String)

    Filter on task workflow action

  • :source_type (String)

    Filter on task source type

  • :destination_type (String)

    Filter on task destination type

  • :priority (String)

    Filter on priority

  • :conflict_resolution (String)

    Filter on conflict resolution

  • :action (String)

    Filter on action

  • :activate (String)

    Filter on activate

  • :creation_date (String)

    Filter on creation date

  • :creation_username (String)

    Filter on creation username

  • :modification_date (String)

    Filter on modification date

  • :modification_username (String)

    Filter on modification username

  • :job_started (String)

    Filter on job started

  • :job_finished (String)

    Filter on job finished

  • :status (String)

    Filter on status

  • :processed_size (String)

    Filter on processed size

  • :to_process_size (String)

    Filter on to process size

  • :source_pool_id (String)

    Filter on task source pool id

  • :source_pool_name (String)

    Filter on task source pool name

  • :source_tape_id (String)

    Filter on task source tape id

  • :source_tape_barcode (String)

    Filter on task source tape barcode

  • :destination_pool_id (String)

    Filter on task destination pool id

  • :destination_pool_name (String)

    Filter on task destination pool name

  • :destination_tape_id (String)

    Filter on task destination tape id

  • :destination_tape_barcode (String)

    Filter on task destination tape barcode

Returns:



181
182
183
184
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 181

def index_tasks(opts = {})
  data, _status_code, _headers = index_tasks_with_http_info(opts)
  data
end

#index_tasks_with_http_info(opts = {}) ⇒ Array<(TaskCollection, Integer, Hash)>

Lists all tasks. **API Key Scope**: tasks / index

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

  • :sort_by (Array<String>)

    Sort results by attribute. Can sort on multiple attributes, separated by &#x60;|&#x60;. Order direction can be suffixing the attribute by either &#x60;:asc&#x60; (default) or &#x60;:desc&#x60;.

  • :id (String)

    Filter on id

  • :name (String)

    Filter on name

  • :comment (String)

    Filter on comment

  • :workflow_type (String)

    Filter on task workflow type

  • :workflow_action (String)

    Filter on task workflow action

  • :source_type (String)

    Filter on task source type

  • :destination_type (String)

    Filter on task destination type

  • :priority (String)

    Filter on priority

  • :conflict_resolution (String)

    Filter on conflict resolution

  • :action (String)

    Filter on action

  • :activate (String)

    Filter on activate

  • :creation_date (String)

    Filter on creation date

  • :creation_username (String)

    Filter on creation username

  • :modification_date (String)

    Filter on modification date

  • :modification_username (String)

    Filter on modification username

  • :job_started (String)

    Filter on job started

  • :job_finished (String)

    Filter on job finished

  • :status (String)

    Filter on status

  • :processed_size (String)

    Filter on processed size

  • :to_process_size (String)

    Filter on to process size

  • :source_pool_id (String)

    Filter on task source pool id

  • :source_pool_name (String)

    Filter on task source pool name

  • :source_tape_id (String)

    Filter on task source tape id

  • :source_tape_barcode (String)

    Filter on task source tape barcode

  • :destination_pool_id (String)

    Filter on task destination pool id

  • :destination_pool_name (String)

    Filter on task destination pool name

  • :destination_tape_id (String)

    Filter on task destination tape id

  • :destination_tape_barcode (String)

    Filter on task destination tape barcode

Returns:

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

    TaskCollection data, response status code and response headers



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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 221

def index_tasks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.index_tasks ...'
  end
  # resource path
  local_var_path = '/tasks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort_by'] = @api_client.build_collection_param(opts[:'sort_by'], :pipe) if !opts[:'sort_by'].nil?
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].nil?
  query_params[:'workflow_type'] = opts[:'workflow_type'] if !opts[:'workflow_type'].nil?
  query_params[:'workflow_action'] = opts[:'workflow_action'] if !opts[:'workflow_action'].nil?
  query_params[:'source_type'] = opts[:'source_type'] if !opts[:'source_type'].nil?
  query_params[:'destination_type'] = opts[:'destination_type'] if !opts[:'destination_type'].nil?
  query_params[:'priority'] = opts[:'priority'] if !opts[:'priority'].nil?
  query_params[:'conflict_resolution'] = opts[:'conflict_resolution'] if !opts[:'conflict_resolution'].nil?
  query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil?
  query_params[:'activate'] = opts[:'activate'] if !opts[:'activate'].nil?
  query_params[:'creation_date'] = opts[:'creation_date'] if !opts[:'creation_date'].nil?
  query_params[:'creation_username'] = opts[:'creation_username'] if !opts[:'creation_username'].nil?
  query_params[:'modification_date'] = opts[:'modification_date'] if !opts[:'modification_date'].nil?
  query_params[:'modification_username'] = opts[:'modification_username'] if !opts[:'modification_username'].nil?
  query_params[:'job_started'] = opts[:'job_started'] if !opts[:'job_started'].nil?
  query_params[:'job_finished'] = opts[:'job_finished'] if !opts[:'job_finished'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'processed_size'] = opts[:'processed_size'] if !opts[:'processed_size'].nil?
  query_params[:'to_process_size'] = opts[:'to_process_size'] if !opts[:'to_process_size'].nil?
  query_params[:'source_pool_id'] = opts[:'source_pool_id'] if !opts[:'source_pool_id'].nil?
  query_params[:'source_pool_name'] = opts[:'source_pool_name'] if !opts[:'source_pool_name'].nil?
  query_params[:'source_tape_id'] = opts[:'source_tape_id'] if !opts[:'source_tape_id'].nil?
  query_params[:'source_tape_barcode'] = opts[:'source_tape_barcode'] if !opts[:'source_tape_barcode'].nil?
  query_params[:'destination_pool_id'] = opts[:'destination_pool_id'] if !opts[:'destination_pool_id'].nil?
  query_params[:'destination_pool_name'] = opts[:'destination_pool_name'] if !opts[:'destination_pool_name'].nil?
  query_params[:'destination_tape_id'] = opts[:'destination_tape_id'] if !opts[:'destination_tape_id'].nil?
  query_params[:'destination_tape_barcode'] = opts[:'destination_tape_barcode'] if !opts[:'destination_tape_barcode'].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[:body] 

  # return_type
  return_type = opts[:return_type] || 'TaskCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#pause_task(task_id, opts = {}) ⇒ ActiveJobStatus

Pause a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:



300
301
302
303
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 300

def pause_task(task_id, opts = {})
  data, _status_code, _headers = pause_task_with_http_info(task_id, opts)
  data
end

#pause_task_result(task_id, job_id, opts = {}) ⇒ ActiveJobStatus

Check result of a task pause request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:



363
364
365
366
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 363

def pause_task_result(task_id, job_id, opts = {})
  data, _status_code, _headers = pause_task_result_with_http_info(task_id, job_id, opts)
  data
end

#pause_task_result_with_http_info(task_id, job_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Check result of a task pause request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



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
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 374

def pause_task_result_with_http_info(task_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.pause_task_result ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.pause_task_result"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TasksApi.pause_task_result"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/pause'.sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#pause_task_with_http_info(task_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Pause a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



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
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 310

def pause_task_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.pause_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.pause_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/pause'.sub('{' + 'task_id' + '}', CGI.escape(task_id.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', 'queued', 'working', 'failed'])

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#resume_task(task_id, opts = {}) ⇒ ActiveJobStatus

Resume a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:



431
432
433
434
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 431

def resume_task(task_id, opts = {})
  data, _status_code, _headers = resume_task_with_http_info(task_id, opts)
  data
end

#resume_task_result(task_id, job_id, opts = {}) ⇒ ActiveJobStatus

Check result of a task resume request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:



494
495
496
497
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 494

def resume_task_result(task_id, job_id, opts = {})
  data, _status_code, _headers = resume_task_result_with_http_info(task_id, job_id, opts)
  data
end

#resume_task_result_with_http_info(task_id, job_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Check result of a task resume request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



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
553
554
555
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 505

def resume_task_result_with_http_info(task_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.resume_task_result ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.resume_task_result"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TasksApi.resume_task_result"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/resume'.sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#resume_task_with_http_info(task_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Resume a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



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
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 441

def resume_task_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.resume_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.resume_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/resume'.sub('{' + 'task_id' + '}', CGI.escape(task_id.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', 'queued', 'working', 'failed'])

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#run_task(task_id, opts = {}) ⇒ ActiveJobStatus

Run a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:



562
563
564
565
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 562

def run_task(task_id, opts = {})
  data, _status_code, _headers = run_task_with_http_info(task_id, opts)
  data
end

#run_task_result(task_id, job_id, opts = {}) ⇒ ActiveJobStatus

Check result of a task run request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:



625
626
627
628
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 625

def run_task_result(task_id, job_id, opts = {})
  data, _status_code, _headers = run_task_result_with_http_info(task_id, job_id, opts)
  data
end

#run_task_result_with_http_info(task_id, job_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Check result of a task run request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



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

def run_task_result_with_http_info(task_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.run_task_result ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.run_task_result"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TasksApi.run_task_result"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/run'.sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#run_task_with_http_info(task_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Run a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 572

def run_task_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.run_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.run_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/run'.sub('{' + 'task_id' + '}', CGI.escape(task_id.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', 'queued', 'working', 'failed'])

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#show_task(task_id, opts = {}) ⇒ Task

Displays a specific task. **API Key Scope**: tasks / show

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:



693
694
695
696
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 693

def show_task(task_id, opts = {})
  data, _status_code, _headers = show_task_with_http_info(task_id, opts)
  data
end

#show_task_with_http_info(task_id, opts = {}) ⇒ Array<(Task, Integer, Hash)>

Displays a specific task. **API Key Scope**: tasks / show

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    Task data, response status code and response headers



703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 703

def show_task_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.show_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.show_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}'.sub('{' + 'task_id' + '}', CGI.escape(task_id.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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Task' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#stop_task(task_id, opts = {}) ⇒ ActiveJobStatus

Stop a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:



755
756
757
758
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 755

def stop_task(task_id, opts = {})
  data, _status_code, _headers = stop_task_with_http_info(task_id, opts)
  data
end

#stop_task_result(task_id, job_id, opts = {}) ⇒ ActiveJobStatus

Check result of a task stop request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:



818
819
820
821
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 818

def stop_task_result(task_id, job_id, opts = {})
  data, _status_code, _headers = stop_task_result_with_http_info(task_id, job_id, opts)
  data
end

#stop_task_result_with_http_info(task_id, job_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Check result of a task stop request. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

  • job_id (String)

    ID of active job

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



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
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 829

def stop_task_result_with_http_info(task_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.stop_task_result ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.stop_task_result"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TasksApi.stop_task_result"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/stop'.sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#stop_task_with_http_info(task_id, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Stop a task. **API Key Scope**: tasks / action

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    ActiveJobStatus data, response status code and response headers



765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 765

def stop_task_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.stop_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.stop_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}/action/stop'.sub('{' + 'task_id' + '}', CGI.escape(task_id.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', 'queued', 'working', 'failed'])

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

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

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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

#update_task(task_id, task_body, opts = {}) ⇒ Task

Updates a specific task. **API Key Scope**: tasks / update

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:



887
888
889
890
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 887

def update_task(task_id, task_body, opts = {})
  data, _status_code, _headers = update_task_with_http_info(task_id, task_body, opts)
  data
end

#update_task_with_http_info(task_id, task_body, opts = {}) ⇒ Array<(Task, Integer, Hash)>

Updates a specific task. **API Key Scope**: tasks / update

Parameters:

  • task_id (String)

    Numeric ID or name of task. Task names are not unique, it&#39;s recommanded to use numeric ID.

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

    the optional parameters

Returns:

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

    Task data, response status code and response headers



898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
# File 'lib/nodeum_sdk/api/tasks_api.rb', line 898

def update_task_with_http_info(task_id, task_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_task ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.update_task"
  end
  # verify the required parameter 'task_body' is set
  if @api_client.config.client_side_validation && task_body.nil?
    fail ArgumentError, "Missing the required parameter 'task_body' when calling TasksApi.update_task"
  end
  # resource path
  local_var_path = '/tasks/{task_id}'.sub('{' + 'task_id' + '}', CGI.escape(task_id.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Task' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

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