class EmassClient::POAMApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

add_poam_by_system_id(body, system_id, opts = {}) click to toggle source

Add one or many POA&M items in a system Add a POA&M for given ‘systemId`
**Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` Note<br /> If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are required within the request.
`pocFirstName`, `pocLastName`, `pocPhoneNumber`<br /> @param body Update an existing control by Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [PoamResponsePost]

# File lib/emass_client/api/poam_api.rb, line 25
def add_poam_by_system_id(body, system_id, opts = {})
  data, _status_code, _headers = add_poam_by_system_id_with_http_info(body, system_id, opts)
  data
end
add_poam_by_system_id_with_http_info(body, system_id, opts = {}) click to toggle source

Add one or many POA&amp;M items in a system Add a POA&amp;M for given &#x60;systemId&#x60;&lt;br&gt; **Request Body Required Fields** - &#x60;status&#x60; - &#x60;vulnerabilityDescription&#x60; - &#x60;sourceIdentVuln&#x60; - &#x60;pocOrganization&#x60; - &#x60;resources&#x60; Note&lt;br /&gt; If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are required within the request.&lt;br&gt; &#x60;pocFirstName&#x60;, &#x60;pocLastName&#x60;, &#x60;pocPhoneNumber&#x60;&lt;br /&gt; @param body Update an existing control by Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [Array<(PoamResponsePost, Integer, Hash)>] PoamResponsePost data, response status code and response headers

# File lib/emass_client/api/poam_api.rb, line 36
def add_poam_by_system_id_with_http_info(body, system_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: POAMApi.add_poam_by_system_id ...'
  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 POAMApi.add_poam_by_system_id"
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.add_poam_by_system_id"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_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(body) 

  return_type = opts[:return_type] || 'PoamResponsePost' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  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,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: POAMApi#add_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_poam(body, system_id, opts = {}) click to toggle source

Remove one or many POA&M items in a system Remove the POA&M matching ‘systemId` path parameter and `poamId` query parameter
@param body Delete the given POA&amp;M Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [PoamResponseDelete]

# File lib/emass_client/api/poam_api.rb, line 89
def delete_poam(body, system_id, opts = {})
  data, _status_code, _headers = delete_poam_with_http_info(body, system_id, opts)
  data
end
delete_poam_with_http_info(body, system_id, opts = {}) click to toggle source

Remove one or many POA&amp;M items in a system Remove the POA&amp;M matching &#x60;systemId&#x60; path parameter and &#x60;poamId&#x60; query parameter&lt;br&gt; @param body Delete the given POA&amp;M Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [Array<(PoamResponseDelete, Integer, Hash)>] PoamResponseDelete data, response status code and response headers

# File lib/emass_client/api/poam_api.rb, line 100
def delete_poam_with_http_info(body, system_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: POAMApi.delete_poam ...'
  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 POAMApi.delete_poam"
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.delete_poam"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_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(body) 

  return_type = opts[:return_type] || 'PoamResponseDelete' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: POAMApi#delete_poam\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_system_poams(system_id, opts = {}) click to toggle source

Get one or many POA&M items in a system Returns system(s) containing POA&M items for matching parameters. @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true) @return [PoamResponseGet]

# File lib/emass_client/api/poam_api.rb, line 157
def get_system_poams(system_id, opts = {})
  data, _status_code, _headers = get_system_poams_with_http_info(system_id, opts)
  data
end
get_system_poams_by_poam_id(system_id, poam_id, opts = {}) click to toggle source

Get POA&M item by ID in a system Returns system(s) containing POA&M items for matching parameters. @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier. @param [Hash] opts the optional parameters @return [PoamResponseGet]

# File lib/emass_client/api/poam_api.rb, line 224
def get_system_poams_by_poam_id(system_id, poam_id, opts = {})
  data, _status_code, _headers = get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts)
  data
end
get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts = {}) click to toggle source

Get POA&amp;M item by ID in a system Returns system(s) containing POA&amp;M items for matching parameters. @param system_id **System Id**: The unique system record identifier. @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier. @param [Hash] opts the optional parameters @return [Array<(PoamResponseGet, Integer, Hash)>] PoamResponseGet data, response status code and response headers

# File lib/emass_client/api/poam_api.rb, line 235
def get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams_by_poam_id ...'
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.get_system_poams_by_poam_id"
  end
  # verify the required parameter 'poam_id' is set
  if @api_client.config.client_side_validation && poam_id.nil?
    fail ArgumentError, "Missing the required parameter 'poam_id' when calling POAMApi.get_system_poams_by_poam_id"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams/{poamId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_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 = opts[:return_type] || 'PoamResponseGet' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: POAMApi#get_system_poams_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_system_poams_with_http_info(system_id, opts = {}) click to toggle source

Get one or many POA&amp;M items in a system Returns system(s) containing POA&amp;M items for matching parameters. @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. @return [Array<(PoamResponseGet, Integer, Hash)>] PoamResponseGet data, response status code and response headers

# File lib/emass_client/api/poam_api.rb, line 172
def get_system_poams_with_http_info(system_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams ...'
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.get_system_poams"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'scheduledCompletionDateStart'] = opts[:'scheduled_completion_date_start'] if !opts[:'scheduled_completion_date_start'].nil?
  query_params[:'scheduledCompletionDateEnd'] = opts[:'scheduled_completion_date_end'] if !opts[:'scheduled_completion_date_end'].nil?
  query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil?
  query_params[:'ccis'] = opts[:'ccis'] if !opts[:'ccis'].nil?
  query_params[:'systemOnly'] = opts[:'system_only'] if !opts[:'system_only'].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 = opts[:return_type] || 'PoamResponseGet' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: POAMApi#get_system_poams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_poam_by_system_id(body, system_id, opts = {}) click to toggle source

Update one or many POA&M items in a system Update a POA&M for given ‘systemId`
**Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` Notes - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are required within the request.
`pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`<br /> - To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`. @param body Update an existing control by Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [PoamResponsePut]

# File lib/emass_client/api/poam_api.rb, line 286
def update_poam_by_system_id(body, system_id, opts = {})
  data, _status_code, _headers = update_poam_by_system_id_with_http_info(body, system_id, opts)
  data
end
update_poam_by_system_id_with_http_info(body, system_id, opts = {}) click to toggle source

Update one or many POA&amp;M items in a system Update a POA&amp;M for given &#x60;systemId&#x60;&lt;br&gt; **Request Body Required Fields** - &#x60;poamId&#x60; - &#x60;displayPoamId&#x60; - &#x60;status&#x60; - &#x60;vulnerabilityDescription&#x60; - &#x60;sourceIdentVuln&#x60; - &#x60;pocOrganization&#x60; - &#x60;reviewStatus&#x60; Notes - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are required within the request.&lt;br&gt; &#x60;pocOrganization&#x60;, &#x60;pocFirstName&#x60;, &#x60;pocLastName&#x60;, &#x60;pocEmail&#x60;, &#x60;pocPhoneNumber&#x60;&lt;br /&gt; - To delete a milestone through the POA&amp;M PUT the field &#x60;isActive&#x60; must be set to &#x60;false&#x60;: &#x60;isActive&#x3D;false&#x60;. @param body Update an existing control by Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [Array<(PoamResponsePut, Integer, Hash)>] PoamResponsePut data, response status code and response headers

# File lib/emass_client/api/poam_api.rb, line 297
def update_poam_by_system_id_with_http_info(body, system_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: POAMApi.update_poam_by_system_id ...'
  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 POAMApi.update_poam_by_system_id"
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.update_poam_by_system_id"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_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(body) 

  return_type = opts[:return_type] || 'PoamResponsePut' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: POAMApi#update_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end