class Nodeum::TasksApi
Attributes
Public Class Methods
# File lib/nodeum_sdk/api/tasks_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Creates a new task. **API Key Scope**: tasks / create @param task_body [Task] @param [Hash] opts the optional parameters @return [Task]
# 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
Creates a new task. **API Key Scope**: tasks / create @param task_body [Task] @param [Hash] opts the optional parameters @return [Array<(Task
, Integer, Hash)>] Task
data, response status code and response headers
# 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
Destroys a specific task. **API Key Scope**: tasks / destroy @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [nil]
# 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
Destroys a specific task. **API Key Scope**: tasks / destroy @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# 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
Lists all tasks. **API Key Scope**: tasks / index @param [Hash] opts the optional parameters @option opts [Integer] :limit The number of items to display for pagination. @option opts [Integer] :offset The number of items to skip for pagination. @option opts [Array<String>] :sort_by Sort results by attribute. Can sort on multiple attributes, separated by `|`. Order direction can be suffixing the attribute by either `:asc` (default) or `:desc`. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :comment Filter on comment @option opts [String] :workflow_type Filter on task workflow type @option opts [String] :workflow_action Filter on task workflow action @option opts [String] :source_type Filter on task source type @option opts [String] :destination_type Filter on task destination type @option opts [String] :priority Filter on priority @option opts [String] :conflict_resolution Filter on conflict resolution @option opts [String] :action Filter on action @option opts [String] :activate Filter on activate @option opts [String] :creation_date Filter on creation date @option opts [String] :creation_username Filter on creation username @option opts [String] :modification_date Filter on modification date @option opts [String] :modification_username Filter on modification username @option opts [String] :job_started Filter on job started @option opts [String] :job_finished Filter on job finished @option opts [String] :status Filter on status @option opts [String] :processed_size Filter on processed size @option opts [String] :to_process_size Filter on to process size @option opts [String] :source_pool_id Filter on task source pool id @option opts [String] :source_pool_name Filter on task source pool name @option opts [String] :source_tape_id Filter on task source tape id @option opts [String] :source_tape_barcode Filter on task source tape barcode @option opts [String] :destination_pool_id Filter on task destination pool id @option opts [String] :destination_pool_name Filter on task destination pool name @option opts [String] :destination_tape_id Filter on task destination tape id @option opts [String] :destination_tape_barcode Filter on task destination tape barcode @return [TaskCollection]
# 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
Lists all tasks. **API Key Scope**: tasks / index @param [Hash] opts the optional parameters @option opts [Integer] :limit The number of items to display for pagination. @option opts [Integer] :offset The number of items to skip for pagination. @option opts [Array<String>] :sort_by Sort results by attribute. Can sort on multiple attributes, separated by `|`. Order direction can be suffixing the attribute by either `:asc` (default) or `:desc`. @option opts [String] :id Filter on id @option opts [String] :name Filter on name @option opts [String] :comment Filter on comment @option opts [String] :workflow_type Filter on task workflow type @option opts [String] :workflow_action Filter on task workflow action @option opts [String] :source_type Filter on task source type @option opts [String] :destination_type Filter on task destination type @option opts [String] :priority Filter on priority @option opts [String] :conflict_resolution Filter on conflict resolution @option opts [String] :action Filter on action @option opts [String] :activate Filter on activate @option opts [String] :creation_date Filter on creation date @option opts [String] :creation_username Filter on creation username @option opts [String] :modification_date Filter on modification date @option opts [String] :modification_username Filter on modification username @option opts [String] :job_started Filter on job started @option opts [String] :job_finished Filter on job finished @option opts [String] :status Filter on status @option opts [String] :processed_size Filter on processed size @option opts [String] :to_process_size Filter on to process size @option opts [String] :source_pool_id Filter on task source pool id @option opts [String] :source_pool_name Filter on task source pool name @option opts [String] :source_tape_id Filter on task source tape id @option opts [String] :source_tape_barcode Filter on task source tape barcode @option opts [String] :destination_pool_id Filter on task destination pool id @option opts [String] :destination_pool_name Filter on task destination pool name @option opts [String] :destination_tape_id Filter on task destination tape id @option opts [String] :destination_tape_barcode Filter on task destination tape barcode @return [Array<(TaskCollection
, Integer, Hash)>] TaskCollection
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task pause request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task pause request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task resume request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task resume request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task run request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task run request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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
Displays a specific task. **API Key Scope**: tasks / show @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Task]
# 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
Displays a specific task. **API Key Scope**: tasks / show @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Array<(Task
, Integer, Hash)>] Task
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task stop request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [ActiveJobStatus]
# 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
Check result of a task stop request. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param job_id [String] ID of active job @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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 a task. **API Key Scope**: tasks / action @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param [Hash] opts the optional parameters @return [Array<(ActiveJobStatus
, Integer, Hash)>] ActiveJobStatus
data, response status code and response headers
# 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
Updates a specific task. **API Key Scope**: tasks / update @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param task_body [Task] @param [Hash] opts the optional parameters @return [Task]
# 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
Updates a specific task. **API Key Scope**: tasks / update @param task_id [String] Numeric ID or name of task. Task
names are not unique, it's recommanded to use numeric ID. @param task_body [Task] @param [Hash] opts the optional parameters @return [Array<(Task
, Integer, Hash)>] Task
data, response status code and response headers
# 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