Class: EmassClient::POAMApi

Inherits:
Object
  • Object
show all
Defined in:
lib/emass_client/api/poam_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ POAMApi

Returns a new instance of POAMApi.



19
20
21
# File 'lib/emass_client/api/poam_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/emass_client/api/poam_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_poam_by_system_id(system_id, poam_required_fields, opts = {}) ⇒ PoamResponsePostPutDelete

Add one or many POA&M items in a system Add a POA&M for given systemId **Request Body Required Fields** <table> <thead> <tr><th>Field</th><th>Require/Condition</th></tr> </thead> <tbody> <tr><td>status</td><td>Always (every POST)</td></tr> <tr><td>vulnerabilityDescription</td><td>Always (every POST)</td></tr> <tr><td>sourceIdentifyingVulnerability</td><td>Always (every POST)</td></tr> <tr><td>pocOrganization</td><td>Always (every POST)</td></tr> <tr><td>resources</td><td>Always (every POST)</td></tr> <tr><td>identifiedInCFOAuditOrOtherReview</td><td>Required for VA. Optional for Army and USCG.</td></tr> <tr><td>scheduledCompletionDate</td><td>Required for ongoing and completed POA&M items</td></tr> <tr><td>pocFirstName</td><td>Only if Last Name, Email, or Phone Number have data</td></tr> <tr><td>pocLastName</td><td>Only if First Name, Email, or Phone Number have data</td></tr> <tr><td>pocEmail</td><td>Only if First Name, Last Name, or Phone Number have data</td></tr> <tr><td>pocPhoneNumber</td><td>Only if First Name, Last Name, or Email have data</td></tr> <tr><td>completionDate</td><td>For completed POA&M Item only</td></tr> <tr><td>comments</td><td>For completed or Risk Accepted POA&M Items only</td></tr> </tbody> </table> NOTE: Certain eMASS instances also require the Risk Analysis fields to be populated: - severity - relevanceOfThreat - likelihood - impact - residualRiskLevel - mitigations </br> **Business Rules** The following rules apply to the Review Status status field value: <table> <thead><tr><th>Value</th><th>Rule</th></tr></thead> <tbody> <tr><td>Not Approved</td><td>POA&M cannot be saved if Milestone Scheduled Completion Date exceeds POA&M Item Scheduled Completion Date</td></tr> <tr><td>Approved</td><td>POA&M can only be saved if Milestone Scheduled Completion Date exceeds POA&M Item Scheduled Completion Date</td></tr> <tr><td></td><td>Are required to have a Severity Value assigned</td></tr> <tr><td>Completed or Ongoing</td><td>Cannot be saved without Milestones</td></tr> <tr><td>Risk Accepted</td><td>POA&M Item cannot be saved with a Scheduled Completion Date scheduledCompletionDate or have Milestones</td></tr> <tr><td>Approved or Completed or Ongoing</td><td>Cannot update Scheduled Completion Date</td></tr> </tbody> </table> **Additional Rules** - POA&M Item cannot be saved if associated Security Control or AP is inherited. - Completed POA&M Item cannot be saved if Completion Date (completionDate) is in the future. - POA&M Items cannot be updated if they are included in an active package. - Archived POA&M Items cannot be updated. - POA&M Items with a status of "Not Applicable" will be updated through test result creation. - If the Security Control or Assessment Procedure does not exist in the system, the POA&M Item maybe imported at the System Level. **Fields Characters Limitation** - POA&M Item cannot be saved if the Point of Contact (POC) fields exceed 100 characters: - pocOrganization pocFirstName, pocLastName, pocEmail, pocPhoneNumber - POA&M Item cannot be saved if Resources (resource) field exceeds 250 characters - POA&M Item cannot be saved if the following fields exceeds 2,000 characters: - mitigations, sourceIdentifyingVulnerability, comments - Milestones Field: description - POA&M Items cannot be saved if Milestone Description (description) exceeds 2,000 characters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_required_fields (Array<PoamRequiredFields>)

    Example request body to add POA&amp;M(s) to a system (systemId)

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/emass_client/api/poam_api.rb', line 28

def add_poam_by_system_id(system_id, poam_required_fields, opts = {})
  data, _status_code, _headers = add_poam_by_system_id_with_http_info(system_id, poam_required_fields, opts)
  data
end

#add_poam_by_system_id_with_http_info(system_id, poam_required_fields, opts = {}) ⇒ Array<(PoamResponsePostPutDelete, Integer, Hash)>

Add one or many POA&amp;M items in a system Add a POA&amp;M for given &#x60;systemId&#x60; **Request Body Required Fields** &lt;table&gt; &lt;thead&gt; &lt;tr&gt;&lt;th&gt;&lt;b&gt;Field&lt;/b&gt;&lt;/th&gt;&lt;th&gt;&lt;b&gt;Require/Condition&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;status&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every POST)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;vulnerabilityDescription&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every POST)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;sourceIdentifyingVulnerability&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every POST)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocOrganization&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every POST)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;resources&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every POST)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;identifiedInCFOAuditOrOtherReview&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Required for VA. Optional for Army and USCG.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;scheduledCompletionDate&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Required for ongoing and completed POA&amp;M items&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocFirstName&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if Last Name, Email, or Phone Number have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocLastName&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if First Name, Email, or Phone Number have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocEmail&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if First Name, Last Name, or Phone Number have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocPhoneNumber&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if First Name, Last Name, or Email have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;completionDate&lt;/code&gt;&lt;/td&gt;&lt;td&gt;For completed POA&amp;M Item only&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;comments&lt;/code&gt;&lt;/td&gt;&lt;td&gt;For completed or Risk Accepted POA&amp;M Items only&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; NOTE: Certain eMASS instances also require the Risk Analysis fields to be populated: - &#x60;severity&#x60; - &#x60;relevanceOfThreat&#x60; - &#x60;likelihood&#x60; - &#x60;impact&#x60; - &#x60;residualRiskLevel&#x60; - &#x60;mitigations&#x60; &lt;/br&gt; **Business Rules** The following rules apply to the Review Status &#x60;status&#x60; field value: &lt;table&gt; &lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;b&gt;Value&lt;/b&gt;&lt;/th&gt;&lt;th&gt;&lt;b&gt;Rule&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Not Approved&lt;/b&gt;&lt;/td&gt;&lt;td&gt;POA&amp;M cannot be saved if Milestone Scheduled Completion Date exceeds POA&amp;M Item Scheduled Completion Date&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Approved&lt;/b&gt;&lt;/td&gt;&lt;td&gt;POA&amp;M can only be saved if Milestone Scheduled Completion Date exceeds POA&amp;M Item Scheduled Completion Date&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;Are required to have a Severity Value assigned&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Completed&lt;/b&gt; or &lt;b&gt;Ongoing&lt;/b&gt;&lt;/td&gt;&lt;td&gt;Cannot be saved without Milestones&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Risk Accepted&lt;/b&gt;&lt;/td&gt;&lt;td&gt;POA&amp;M Item cannot be saved with a Scheduled Completion Date &lt;code&gt;scheduledCompletionDate&lt;/code&gt; or have Milestones&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Approved&lt;/b&gt; or &lt;b&gt;Completed&lt;/b&gt; or &lt;b&gt;Ongoing&lt;/b&gt;&lt;/td&gt;&lt;td&gt;Cannot update Scheduled Completion Date&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; **Additional Rules** - POA&amp;M Item cannot be saved if associated Security Control or AP is inherited. - Completed POA&amp;M Item cannot be saved if Completion Date (&#x60;completionDate&#x60;) is in the future. - POA&amp;M Items cannot be updated if they are included in an active package. - Archived POA&amp;M Items cannot be updated. - POA&amp;M Items with a status of &quot;Not Applicable&quot; will be updated through test result creation. - If the Security Control or Assessment Procedure does not exist in the system, the POA&amp;M Item maybe imported at the System Level. **Fields Characters Limitation** - POA&amp;M Item cannot be saved if the Point of Contact (POC) fields exceed 100 characters: - &#x60;pocOrganization&#x60; &#x60;pocFirstName&#x60;, &#x60;pocLastName&#x60;, &#x60;pocEmail&#x60;, &#x60;pocPhoneNumber&#x60; - POA&amp;M Item cannot be saved if Resources (&#x60;resource&#x60;) field exceeds 250 characters - POA&amp;M Item cannot be saved if the following fields exceeds 2,000 characters: - &#x60;mitigations&#x60;, &#x60;sourceIdentifyingVulnerability&#x60;, &#x60;comments&#x60; - Milestones Field: &#x60;description&#x60; - POA&amp;M Items cannot be saved if Milestone Description (&#x60;description&#x60;) exceeds 2,000 characters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_required_fields (Array<PoamRequiredFields>)

    Example request body to add POA&amp;M(s) to a system (systemId)

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

    the optional parameters

Returns:

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

    PoamResponsePostPutDelete data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/emass_client/api/poam_api.rb', line 39

def add_poam_by_system_id_with_http_info(system_id, poam_required_fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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
  # verify the required parameter 'poam_required_fields' is set
  if @api_client.config.client_side_validation && poam_required_fields.nil?
    fail ArgumentError, "Missing the required parameter 'poam_required_fields' when calling POAMApi.add_poam_by_system_id"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

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

#delete_poam(system_id, poam_request_delete_body_inner, opts = {}) ⇒ PoamResponsePostPutDelete

Remove one or many POA&M items in a system Remove the POA&M matching systemId path parameter and poamId Request Body

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_request_delete_body_inner (Array<PoamRequestDeleteBodyInner>)

    Delete the given POA&amp;M Id

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

    the optional parameters

Returns:



102
103
104
105
# File 'lib/emass_client/api/poam_api.rb', line 102

def delete_poam(system_id, poam_request_delete_body_inner, opts = {})
  data, _status_code, _headers = delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts)
  data
end

#delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts = {}) ⇒ Array<(PoamResponsePostPutDelete, Integer, Hash)>

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; Request Body&lt;br&gt;

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_request_delete_body_inner (Array<PoamRequestDeleteBodyInner>)

    Delete the given POA&amp;M Id

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

    the optional parameters

Returns:

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

    PoamResponsePostPutDelete data, response status code and response headers



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/emass_client/api/poam_api.rb', line 113

def delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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
  # verify the required parameter 'poam_request_delete_body_inner' is set
  if @api_client.config.client_side_validation && poam_request_delete_body_inner.nil?
    fail ArgumentError, "Missing the required parameter 'poam_request_delete_body_inner' when calling POAMApi.delete_poam"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"POAMApi.delete_poam",
    :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: 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 = {}) ⇒ PoamResponseGetSystems

Get one or many POA&M items in a system Returns system(s) containing POA&M items for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

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

    the optional parameters

Options Hash (opts):

  • :scheduled_completion_date_start (String)

    **Date Started**: Filter query by the scheduled completion start date (Unix date format).

  • :scheduled_completion_date_end (String)

    **Date Ended**: Filter query by the scheduled completion start date (Unix date format).

  • :control_acronyms (String)

    **Control Acronym**: Filter query by given system acronym (single value or comma separated).

  • :assessment_procedures (String)

    **Assessment Procedure**: Filter query by given Security Control Assessment Procedure (single value or comma separated).

  • :ccis (String)

    **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single value or comma separated).

  • :system_only (Boolean)

    **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)

Returns:



181
182
183
184
# File 'lib/emass_client/api/poam_api.rb', line 181

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 = {}) ⇒ PoamResponseGetPoams

Get POA&M item by ID in a system Returns system(s) containing POA&M items for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

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

    the optional parameters

Returns:



257
258
259
260
# File 'lib/emass_client/api/poam_api.rb', line 257

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 = {}) ⇒ Array<(PoamResponseGetPoams, Integer, Hash)>

Get POA&amp;M item by ID in a system Returns system(s) containing POA&amp;M items for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_id (Integer)

    **POA&amp;M Id**: The unique POA&amp;M record identifier.

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

    the optional parameters

Returns:

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

    PoamResponseGetPoams data, response status code and response headers



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'lib/emass_client/api/poam_api.rb', line 268

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' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"POAMApi.get_system_poams_by_poam_id",
    :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: 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 = {}) ⇒ Array<(PoamResponseGetSystems, Integer, Hash)>

Get one or many POA&amp;M items in a system Returns system(s) containing POA&amp;M items for matching parameters.

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

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

    the optional parameters

Options Hash (opts):

  • :scheduled_completion_date_start (String)

    **Date Started**: Filter query by the scheduled completion start date (Unix date format).

  • :scheduled_completion_date_end (String)

    **Date Ended**: Filter query by the scheduled completion start date (Unix date format).

  • :control_acronyms (String)

    **Control Acronym**: Filter query by given system acronym (single value or comma separated).

  • :assessment_procedures (String)

    **Assessment Procedure**: Filter query by given Security Control Assessment Procedure (single value or comma separated).

  • :ccis (String)

    **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single value or comma separated).

  • :system_only (Boolean)

    **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)

Returns:

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

    PoamResponseGetSystems data, response status code and response headers



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/emass_client/api/poam_api.rb', line 197

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' + '}', CGI.escape(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[:'assessmentProcedures'] = opts[:'assessment_procedures'] if !opts[:'assessment_procedures'].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']) unless header_params['Accept']

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

  new_options = opts.merge(
    :operation => :"POAMApi.get_system_poams",
    :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: 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(system_id, poam_ids, opts = {}) ⇒ PoamResponsePostPutDelete

Update one or many POA&M items in a system Update a POA&M for given systemId
**Request Body Required Fields** <table> <thead> <tr><th>Field</th><th>Require/Condition</th></tr> </thead> <tbody> <tr><td>poamId</td><td>Always (every PUT)</td></tr> <tr><td>displayPoamId</td><td>Always (every PUT)</td></tr> <tr><td>status</td><td>Always (every PUT)</td></tr> <tr><td>vulnerabilityDescription</td><td>Always (every PUT)</td></tr> <tr><td>sourceIdentifyingVulnerability</td><td>Always (every PUT)</td></tr> <tr><td>pocOrganization</td><td>Always (every PUT)</td></tr> <tr><td>resources</td><td>Always (every PUT)</td></tr> <tr><td>identifiedInCFOAuditOrOtherReview</td><td>Required for VA. Optional for Army and USCG.</td></tr> <tr><td>scheduledCompletionDate</td><td>Required for ongoing and completed POA&M items</td></tr> <tr><td>pocFirstName</td><td>Only if Last Name, Email, or Phone Number have data</td></tr> <tr><td>pocLastName</td><td>Only if First Name, Email, or Phone Number have data</td></tr> <tr><td>pocEmail</td><td>Only if First Name, Last Name, or Phone Number have data</td></tr> <tr><td>pocPhoneNumber</td><td>Only if First Name, Last Name, or Email have data</td></tr> <tr><td>completionDate</td><td>For completed POA&M Item only</td></tr> <tr><td>comments</td><td>For completed or Risk Accepted POA&M Items only</td></tr> </tbody> </table> NOTES: - Certain eMASS instances also require the Risk Analysis fields to be populated: - severity - relevanceOfThreat - likelihood - impact - residualRiskLevel - mitigations - To prevent uploading duplicate/undesired milestones through the POA&M PUT include an isActive field for the milestone and set it to equal to false ‘(isActive=false)`. </br> **Business Rules:** See business rules for the POST endpoint

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_ids (Array<PoamIds>)

    Example request body for updating a POA&amp;M for a system (systemId)

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

    the optional parameters

Returns:



326
327
328
329
# File 'lib/emass_client/api/poam_api.rb', line 326

def update_poam_by_system_id(system_id, poam_ids, opts = {})
  data, _status_code, _headers = update_poam_by_system_id_with_http_info(system_id, poam_ids, opts)
  data
end

#update_poam_by_system_id_with_http_info(system_id, poam_ids, opts = {}) ⇒ Array<(PoamResponsePostPutDelete, Integer, Hash)>

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** &lt;table&gt; &lt;thead&gt; &lt;tr&gt;&lt;th&gt;&lt;b&gt;Field&lt;/b&gt;&lt;/th&gt;&lt;th&gt;&lt;b&gt;Require/Condition&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;poamId&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;displayPoamId&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;status&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;vulnerabilityDescription&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;sourceIdentifyingVulnerability&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocOrganization&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;resources&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Always (every PUT)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;identifiedInCFOAuditOrOtherReview&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Required for VA. Optional for Army and USCG.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;scheduledCompletionDate&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Required for ongoing and completed POA&amp;M items&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocFirstName&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if Last Name, Email, or Phone Number have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocLastName&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if First Name, Email, or Phone Number have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocEmail&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if First Name, Last Name, or Phone Number have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;pocPhoneNumber&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Only if First Name, Last Name, or Email have data&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;completionDate&lt;/code&gt;&lt;/td&gt;&lt;td&gt;For completed POA&amp;M Item only&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;code&gt;comments&lt;/code&gt;&lt;/td&gt;&lt;td&gt;For completed or Risk Accepted POA&amp;M Items only&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; NOTES: - Certain eMASS instances also require the Risk Analysis fields to be populated: - &#x60;severity&#x60; - &#x60;relevanceOfThreat&#x60; - &#x60;likelihood&#x60; - &#x60;impact&#x60; - &#x60;residualRiskLevel&#x60; - &#x60;mitigations&#x60; - To prevent uploading duplicate/undesired milestones through the POA&amp;M PUT include an &#x60;isActive&#x60; field for the milestone and set it to equal to false &#x60;(isActive&#x3D;false)&#x60;. &lt;/br&gt; **Business Rules:** See business rules for the POST endpoint

Parameters:

  • system_id (Integer)

    **System Id**: The unique system record identifier.

  • poam_ids (Array<PoamIds>)

    Example request body for updating a POA&amp;M for a system (systemId)

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

    the optional parameters

Returns:

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

    PoamResponsePostPutDelete data, response status code and response headers



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/emass_client/api/poam_api.rb', line 337

def update_poam_by_system_id_with_http_info(system_id, poam_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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
  # verify the required parameter 'poam_ids' is set
  if @api_client.config.client_side_validation && poam_ids.nil?
    fail ArgumentError, "Missing the required parameter 'poam_ids' when calling POAMApi.update_poam_by_system_id"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']

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