class SwaggyJenkinsClient::RemoteAccessApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/swaggy_jenkins/api/remote_access_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_computer(depth, opts = {}) click to toggle source

Retrieve computer details @param depth Recursion depth in response model @param [Hash] opts the optional parameters @return [ComputerSet]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 28
def get_computer(depth, opts = {})
  data, _status_code, _headers = get_computer_with_http_info(depth, opts)
  return data
end
get_computer_with_http_info(depth, opts = {}) click to toggle source

Retrieve computer details @param depth Recursion depth in response model @param [Hash] opts the optional parameters @return [Array<(ComputerSet, Fixnum, Hash)>] ComputerSet data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 38
def get_computer_with_http_info(depth, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_computer ..."
  end
  # verify the required parameter 'depth' is set
  if @api_client.config.client_side_validation && depth.nil?
    fail ArgumentError, "Missing the required parameter 'depth' when calling RemoteAccessApi.get_computer"
  end
  # resource path
  local_var_path = "/computer/api/json"

  # query parameters
  query_params = {}
  query_params[:'depth'] = depth

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ComputerSet')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_computer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_crumb(opts = {}) click to toggle source

Retrieve CSRF protection token @param [Hash] opts the optional parameters @return [DefaultCrumbIssuer]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 81
def get_crumb(opts = {})
  data, _status_code, _headers = get_crumb_with_http_info(opts)
  return data
end
get_crumb_with_http_info(opts = {}) click to toggle source

Retrieve CSRF protection token @param [Hash] opts the optional parameters @return [Array<(DefaultCrumbIssuer, Fixnum, Hash)>] DefaultCrumbIssuer data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 90
def get_crumb_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_crumb ..."
  end
  # resource path
  local_var_path = "/crumbIssuer/api/json"

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DefaultCrumbIssuer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_crumb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_jenkins(opts = {}) click to toggle source

Retrieve Jenkins details @param [Hash] opts the optional parameters @return [Hudson]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 128
def get_jenkins(opts = {})
  data, _status_code, _headers = get_jenkins_with_http_info(opts)
  return data
end
get_jenkins_with_http_info(opts = {}) click to toggle source

Retrieve Jenkins details @param [Hash] opts the optional parameters @return [Array<(Hudson, Fixnum, Hash)>] Hudson data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 137
def get_jenkins_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_jenkins ..."
  end
  # resource path
  local_var_path = "/api/json"

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Hudson')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_jenkins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_job(name, opts = {}) click to toggle source

Retrieve job details @param name Name of the job @param [Hash] opts the optional parameters @return [FreeStyleProject]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 176
def get_job(name, opts = {})
  data, _status_code, _headers = get_job_with_http_info(name, opts)
  return data
end
get_job_config(name, opts = {}) click to toggle source

Retrieve job configuration @param name Name of the job @param [Hash] opts the optional parameters @return [String]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 229
def get_job_config(name, opts = {})
  data, _status_code, _headers = get_job_config_with_http_info(name, opts)
  return data
end
get_job_config_with_http_info(name, opts = {}) click to toggle source

Retrieve job configuration @param name Name of the job @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 239
def get_job_config_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_job_config ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job_config"
  end
  # resource path
  local_var_path = "/job/{name}/config.xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_job_last_build(name, opts = {}) click to toggle source

Retrieve job's last build details @param name Name of the job @param [Hash] opts the optional parameters @return [FreeStyleBuild]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 282
def get_job_last_build(name, opts = {})
  data, _status_code, _headers = get_job_last_build_with_http_info(name, opts)
  return data
end
get_job_last_build_with_http_info(name, opts = {}) click to toggle source

Retrieve job&#39;s last build details @param name Name of the job @param [Hash] opts the optional parameters @return [Array<(FreeStyleBuild, Fixnum, Hash)>] FreeStyleBuild data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 292
def get_job_last_build_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_job_last_build ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job_last_build"
  end
  # resource path
  local_var_path = "/job/{name}/lastBuild/api/json".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FreeStyleBuild')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job_last_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_job_progressive_text(name, number, start, opts = {}) click to toggle source

Retrieve job's build progressive text output @param name Name of the job @param number Build number @param start Starting point of progressive text output @param [Hash] opts the optional parameters @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 337
def get_job_progressive_text(name, number, start, opts = {})
  get_job_progressive_text_with_http_info(name, number, start, opts)
  return nil
end
get_job_progressive_text_with_http_info(name, number, start, opts = {}) click to toggle source

Retrieve job&#39;s build progressive text output @param name Name of the job @param number Build number @param start Starting point of progressive text output @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 349
def get_job_progressive_text_with_http_info(name, number, start, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_job_progressive_text ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job_progressive_text"
  end
  # verify the required parameter 'number' is set
  if @api_client.config.client_side_validation && number.nil?
    fail ArgumentError, "Missing the required parameter 'number' when calling RemoteAccessApi.get_job_progressive_text"
  end
  # verify the required parameter 'start' is set
  if @api_client.config.client_side_validation && start.nil?
    fail ArgumentError, "Missing the required parameter 'start' when calling RemoteAccessApi.get_job_progressive_text"
  end
  # resource path
  local_var_path = "/job/{name}/{number}/logText/progressiveText".sub('{' + 'name' + '}', name.to_s).sub('{' + 'number' + '}', number.to_s)

  # query parameters
  query_params = {}
  query_params[:'start'] = start

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job_progressive_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_job_with_http_info(name, opts = {}) click to toggle source

Retrieve job details @param name Name of the job @param [Hash] opts the optional parameters @return [Array<(FreeStyleProject, Fixnum, Hash)>] FreeStyleProject data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 186
def get_job_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_job ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job"
  end
  # resource path
  local_var_path = "/job/{name}/api/json".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FreeStyleProject')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_queue(opts = {}) click to toggle source

Retrieve queue details @param [Hash] opts the optional parameters @return [Queue]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 397
def get_queue(opts = {})
  data, _status_code, _headers = get_queue_with_http_info(opts)
  return data
end
get_queue_item(number, opts = {}) click to toggle source

Retrieve queued item details @param number Queue number @param [Hash] opts the optional parameters @return [Queue]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 445
def get_queue_item(number, opts = {})
  data, _status_code, _headers = get_queue_item_with_http_info(number, opts)
  return data
end
get_queue_item_with_http_info(number, opts = {}) click to toggle source

Retrieve queued item details @param number Queue number @param [Hash] opts the optional parameters @return [Array<(Queue, Fixnum, Hash)>] Queue data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 455
def get_queue_item_with_http_info(number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_queue_item ..."
  end
  # verify the required parameter 'number' is set
  if @api_client.config.client_side_validation && number.nil?
    fail ArgumentError, "Missing the required parameter 'number' when calling RemoteAccessApi.get_queue_item"
  end
  # resource path
  local_var_path = "/queue/item/{number}/api/json".sub('{' + 'number' + '}', number.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Queue')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_queue_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_queue_with_http_info(opts = {}) click to toggle source

Retrieve queue details @param [Hash] opts the optional parameters @return [Array<(Queue, Fixnum, Hash)>] Queue data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 406
def get_queue_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_queue ..."
  end
  # resource path
  local_var_path = "/queue/api/json"

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Queue')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_view(name, opts = {}) click to toggle source

Retrieve view details @param name Name of the view @param [Hash] opts the optional parameters @return [ListView]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 498
def get_view(name, opts = {})
  data, _status_code, _headers = get_view_with_http_info(name, opts)
  return data
end
get_view_config(name, opts = {}) click to toggle source

Retrieve view configuration @param name Name of the view @param [Hash] opts the optional parameters @return [String]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 551
def get_view_config(name, opts = {})
  data, _status_code, _headers = get_view_config_with_http_info(name, opts)
  return data
end
get_view_config_with_http_info(name, opts = {}) click to toggle source

Retrieve view configuration @param name Name of the view @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 561
def get_view_config_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_view_config ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_view_config"
  end
  # resource path
  local_var_path = "/view/{name}/config.xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_view_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_view_with_http_info(name, opts = {}) click to toggle source

Retrieve view details @param name Name of the view @param [Hash] opts the optional parameters @return [Array<(ListView, Fixnum, Hash)>] ListView data, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 508
def get_view_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.get_view ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_view"
  end
  # resource path
  local_var_path = "/view/{name}/api/json".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListView')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
head_jenkins(opts = {}) click to toggle source

Retrieve Jenkins headers @param [Hash] opts the optional parameters @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 603
def head_jenkins(opts = {})
  head_jenkins_with_http_info(opts)
  return nil
end
head_jenkins_with_http_info(opts = {}) click to toggle source

Retrieve Jenkins headers @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 612
def head_jenkins_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.head_jenkins ..."
  end
  # resource path
  local_var_path = "/api/json"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:HEAD, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#head_jenkins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_create_item(name, opts = {}) click to toggle source

Create a new job using job configuration, or copied from an existing job @param name Name of the new job @param [Hash] opts the optional parameters @option opts [String] :from Existing job to copy from @option opts [String] :mode Set to &#39;copy&#39; for copying an existing job @option opts [String] :body Job configuration in config.xml format @option opts [String] :jenkins_crumb CSRF protection token @option opts [String] :content_type Content type header application/xml @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 653
def post_create_item(name, opts = {})
  post_create_item_with_http_info(name, opts)
  return nil
end
post_create_item_with_http_info(name, opts = {}) click to toggle source

Create a new job using job configuration, or copied from an existing job @param name Name of the new job @param [Hash] opts the optional parameters @option opts [String] :from Existing job to copy from @option opts [String] :mode Set to &#39;copy&#39; for copying an existing job @option opts [String] :body Job configuration in config.xml format @option opts [String] :jenkins_crumb CSRF protection token @option opts [String] :content_type Content type header application/xml @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 668
def post_create_item_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_create_item ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_create_item"
  end
  # resource path
  local_var_path = "/createItem"

  # query parameters
  query_params = {}
  query_params[:'name'] = name
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/html'])
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?
  header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_create_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_create_view(name, opts = {}) click to toggle source

Create a new view using view configuration @param name Name of the new view @param [Hash] opts the optional parameters @option opts [String] :body View configuration in config.xml format @option opts [String] :jenkins_crumb CSRF protection token @option opts [String] :content_type Content type header application/xml @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 718
def post_create_view(name, opts = {})
  post_create_view_with_http_info(name, opts)
  return nil
end
post_create_view_with_http_info(name, opts = {}) click to toggle source

Create a new view using view configuration @param name Name of the new view @param [Hash] opts the optional parameters @option opts [String] :body View configuration in config.xml format @option opts [String] :jenkins_crumb CSRF protection token @option opts [String] :content_type Content type header application/xml @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 731
def post_create_view_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_create_view ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_create_view"
  end
  # resource path
  local_var_path = "/createView"

  # query parameters
  query_params = {}
  query_params[:'name'] = name

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/html'])
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?
  header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_create_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_job_build(name, json, opts = {}) click to toggle source

Build a job @param name Name of the job @param json @param [Hash] opts the optional parameters @option opts [String] :token @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 779
def post_job_build(name, json, opts = {})
  post_job_build_with_http_info(name, json, opts)
  return nil
end
post_job_build_with_http_info(name, json, opts = {}) click to toggle source

Build a job @param name Name of the job @param json @param [Hash] opts the optional parameters @option opts [String] :token @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 792
def post_job_build_with_http_info(name, json, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_job_build ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_build"
  end
  # verify the required parameter 'json' is set
  if @api_client.config.client_side_validation && json.nil?
    fail ArgumentError, "Missing the required parameter 'json' when calling RemoteAccessApi.post_job_build"
  end
  # resource path
  local_var_path = "/job/{name}/build".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'json'] = json
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?

  # header parameters
  header_params = {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_job_config(name, body, opts = {}) click to toggle source

Update job configuration @param name Name of the job @param body Job configuration in config.xml format @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 841
def post_job_config(name, body, opts = {})
  post_job_config_with_http_info(name, body, opts)
  return nil
end
post_job_config_with_http_info(name, body, opts = {}) click to toggle source

Update job configuration @param name Name of the job @param body Job configuration in config.xml format @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 853
def post_job_config_with_http_info(name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_job_config ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_config"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling RemoteAccessApi.post_job_config"
  end
  # resource path
  local_var_path = "/job/{name}/config.xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml'])
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_job_delete(name, opts = {}) click to toggle source

Delete a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 901
def post_job_delete(name, opts = {})
  post_job_delete_with_http_info(name, opts)
  return nil
end
post_job_delete_with_http_info(name, opts = {}) click to toggle source

Delete a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 912
def post_job_delete_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_job_delete ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_delete"
  end
  # resource path
  local_var_path = "/job/{name}/doDelete".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_job_disable(name, opts = {}) click to toggle source

Disable a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 954
def post_job_disable(name, opts = {})
  post_job_disable_with_http_info(name, opts)
  return nil
end
post_job_disable_with_http_info(name, opts = {}) click to toggle source

Disable a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 965
def post_job_disable_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_job_disable ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_disable"
  end
  # resource path
  local_var_path = "/job/{name}/disable".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_disable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_job_enable(name, opts = {}) click to toggle source

Enable a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 1007
def post_job_enable(name, opts = {})
  post_job_enable_with_http_info(name, opts)
  return nil
end
post_job_enable_with_http_info(name, opts = {}) click to toggle source

Enable a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 1018
def post_job_enable_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_job_enable ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_enable"
  end
  # resource path
  local_var_path = "/job/{name}/enable".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_job_last_build_stop(name, opts = {}) click to toggle source

Stop a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 1060
def post_job_last_build_stop(name, opts = {})
  post_job_last_build_stop_with_http_info(name, opts)
  return nil
end
post_job_last_build_stop_with_http_info(name, opts = {}) click to toggle source

Stop a job @param name Name of the job @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 1071
def post_job_last_build_stop_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_job_last_build_stop ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_last_build_stop"
  end
  # resource path
  local_var_path = "/job/{name}/lastBuild/stop".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_last_build_stop\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_view_config(name, body, opts = {}) click to toggle source

Update view configuration @param name Name of the view @param body View configuration in config.xml format @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [nil]

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 1114
def post_view_config(name, body, opts = {})
  post_view_config_with_http_info(name, body, opts)
  return nil
end
post_view_config_with_http_info(name, body, opts = {}) click to toggle source

Update view configuration @param name Name of the view @param body View configuration in config.xml format @param [Hash] opts the optional parameters @option opts [String] :jenkins_crumb CSRF protection token @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/swaggy_jenkins/api/remote_access_api.rb, line 1126
def post_view_config_with_http_info(name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RemoteAccessApi.post_view_config ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_view_config"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling RemoteAccessApi.post_view_config"
  end
  # resource path
  local_var_path = "/view/{name}/config.xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['jenkins_auth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_view_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end