emass_client 1.0.1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +152 -1124
  3. data/Rakefile +2 -0
  4. data/lib/emass_client/api/artifacts_api.rb +124 -97
  5. data/lib/emass_client/api/artifacts_export_api.rb +28 -19
  6. data/lib/emass_client/api/cac_api.rb +50 -31
  7. data/lib/emass_client/api/cloud_resources_api.rb +96 -0
  8. data/lib/emass_client/api/cmmc_assessments_api.rb +20 -11
  9. data/lib/emass_client/api/containers_api.rb +96 -0
  10. data/lib/emass_client/api/controls_api.rb +53 -34
  11. data/lib/emass_client/api/milestones_api.rb +138 -92
  12. data/lib/emass_client/api/pac_api.rb +50 -31
  13. data/lib/emass_client/api/poam_api.rb +132 -86
  14. data/lib/emass_client/api/registration_api.rb +30 -18
  15. data/lib/emass_client/api/static_code_scans_api.rb +38 -26
  16. data/lib/emass_client/api/system_roles_api.rb +48 -29
  17. data/lib/emass_client/api/systems_api.rb +57 -39
  18. data/lib/emass_client/api/test_api.rb +20 -11
  19. data/lib/emass_client/api/test_results_api.rb +53 -34
  20. data/lib/emass_client/api/workflow_definitions_api.rb +23 -14
  21. data/lib/emass_client/api/workflow_instances_api.rb +58 -53
  22. data/lib/emass_client/api_client.rb +59 -57
  23. data/lib/emass_client/api_error.rb +5 -5
  24. data/lib/emass_client/configuration.rb +93 -16
  25. data/lib/emass_client/models/artifacts_get.rb +54 -31
  26. data/lib/emass_client/models/{artifacts_delete_inner.rb → artifacts_request_delete_body_inner.rb} +29 -16
  27. data/lib/emass_client/models/artifacts_response_del.rb +27 -14
  28. data/lib/emass_client/models/{artifacts_response_del_data.rb → artifacts_response_del_data_inner.rb} +31 -18
  29. data/lib/emass_client/models/artifacts_response_get.rb +27 -14
  30. data/lib/emass_client/models/artifacts_response_put_post.rb +27 -14
  31. data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +265 -0
  32. data/lib/emass_client/models/cac_get.rb +82 -50
  33. data/lib/emass_client/models/cac_response_get.rb +27 -14
  34. data/lib/emass_client/models/cac_response_post.rb +27 -14
  35. data/lib/emass_client/models/{cac_response_post_data.rb → cac_response_post_data_inner.rb} +61 -21
  36. data/lib/emass_client/models/{pac_request_post_body.rb → cloud_resources_post.rb} +73 -69
  37. data/lib/emass_client/models/cloud_resources_response_post.rb +230 -0
  38. data/lib/emass_client/models/cmmc_get.rb +53 -63
  39. data/lib/emass_client/models/cmmc_response_get.rb +27 -14
  40. data/lib/emass_client/models/connectivity_ccsd.rb +29 -14
  41. data/lib/emass_client/models/containers_resources_post.rb +265 -0
  42. data/lib/emass_client/models/containers_response_post.rb +230 -0
  43. data/lib/emass_client/models/controls_get.rb +103 -66
  44. data/lib/emass_client/models/controls_put.rb +58 -18
  45. data/lib/emass_client/models/controls_response_get.rb +28 -14
  46. data/lib/emass_client/models/controls_response_put.rb +27 -14
  47. data/lib/emass_client/models/definition_transitions.rb +32 -62
  48. data/lib/emass_client/models/instances_transitions.rb +37 -88
  49. data/lib/emass_client/models/milestone_response_get.rb +27 -14
  50. data/lib/emass_client/models/milestone_response_get_milestone.rb +228 -0
  51. data/lib/emass_client/models/milestone_response_post.rb +27 -14
  52. data/lib/emass_client/models/milestone_response_put.rb +27 -14
  53. data/lib/emass_client/models/milestones_get.rb +33 -20
  54. data/lib/emass_client/models/milestones_put_post_delete.rb +60 -20
  55. data/lib/emass_client/models/{delete_milestone.rb → milestones_request_delete_body_inner.rb} +29 -21
  56. data/lib/emass_client/models/milestones_required_post.rb +27 -14
  57. data/lib/emass_client/models/milestones_required_put.rb +28 -15
  58. data/lib/emass_client/models/pac_get.rb +39 -22
  59. data/lib/emass_client/models/pac_post.rb +60 -20
  60. data/lib/emass_client/models/pac_response_get.rb +28 -14
  61. data/lib/emass_client/models/pac_response_post.rb +27 -14
  62. data/lib/emass_client/models/poam_get.rb +114 -77
  63. data/lib/emass_client/models/poam_post_put_del.rb +59 -19
  64. data/lib/emass_client/models/{delete_poam.rb → poam_request_delete_body_inner.rb} +29 -21
  65. data/lib/emass_client/models/poam_response_delete.rb +27 -14
  66. data/lib/emass_client/models/poam_response_get_poams.rb +228 -0
  67. data/lib/emass_client/models/{static_code_required_post.rb → poam_response_get_systems.rb} +42 -29
  68. data/lib/emass_client/models/poam_response_post.rb +27 -14
  69. data/lib/emass_client/models/poam_response_put.rb +27 -14
  70. data/lib/emass_client/models/register.rb +27 -14
  71. data/lib/emass_client/models/register_data.rb +26 -13
  72. data/lib/emass_client/models/register_user_request_post_body.rb +26 -13
  73. data/lib/emass_client/models/{model_200.rb → response200.rb} +53 -16
  74. data/lib/emass_client/models/{model_400.rb → response201.rb} +29 -16
  75. data/lib/emass_client/models/{model_201_meta.rb → response201_meta.rb} +54 -17
  76. data/lib/emass_client/models/{model_400_response.rb → response400.rb} +29 -16
  77. data/lib/emass_client/models/{model_400_meta.rb → response400_meta.rb} +54 -17
  78. data/lib/emass_client/models/{model_401.rb → response401.rb} +29 -16
  79. data/lib/emass_client/models/{model_401_meta.rb → response401_meta.rb} +54 -17
  80. data/lib/emass_client/models/{model_201.rb → response403.rb} +29 -16
  81. data/lib/emass_client/models/{model_403_meta.rb → response403_meta.rb} +54 -17
  82. data/lib/emass_client/models/{model_404.rb → response404.rb} +54 -17
  83. data/lib/emass_client/models/response405.rb +219 -0
  84. data/lib/emass_client/models/{model_405_meta.rb → response405_meta.rb} +54 -17
  85. data/lib/emass_client/models/response411.rb +219 -0
  86. data/lib/emass_client/models/{model_411_meta.rb → response411_meta.rb} +54 -17
  87. data/lib/emass_client/models/response490.rb +219 -0
  88. data/lib/emass_client/models/{model_490_meta.rb → response490_meta.rb} +54 -17
  89. data/lib/emass_client/models/response500.rb +219 -0
  90. data/lib/emass_client/models/{model_500_meta.rb → response500_meta.rb} +54 -17
  91. data/lib/emass_client/models/role_category.rb +32 -50
  92. data/lib/emass_client/models/roles.rb +29 -61
  93. data/lib/emass_client/models/ssps.rb +32 -16
  94. data/lib/emass_client/models/stage.rb +30 -49
  95. data/lib/emass_client/models/static_code_application.rb +34 -33
  96. data/lib/emass_client/models/static_code_post.rb +275 -0
  97. data/lib/emass_client/models/static_code_request_post_body.rb +47 -14
  98. data/lib/emass_client/models/{static_code_required_post_application.rb → static_code_request_post_body_application.rb} +30 -17
  99. data/lib/emass_client/models/static_code_response_post.rb +230 -0
  100. data/lib/emass_client/models/success200_response.rb +27 -14
  101. data/lib/emass_client/models/{error.rb → success200_response_data_inner.rb} +57 -36
  102. data/lib/emass_client/models/system_response.rb +28 -17
  103. data/lib/emass_client/models/system_roles_category_response.rb +28 -14
  104. data/lib/emass_client/models/system_roles_response.rb +27 -14
  105. data/lib/emass_client/models/{system_roles_response_data.rb → system_roles_response_data_inner.rb} +30 -17
  106. data/lib/emass_client/models/systems.rb +218 -191
  107. data/lib/emass_client/models/{poam_response_get.rb → systems_response.rb} +30 -17
  108. data/lib/emass_client/models/test.rb +27 -14
  109. data/lib/emass_client/models/test_data.rb +26 -13
  110. data/lib/emass_client/models/test_results_get.rb +39 -35
  111. data/lib/emass_client/models/test_results_post.rb +58 -18
  112. data/lib/emass_client/models/test_results_response_get.rb +27 -14
  113. data/lib/emass_client/models/test_results_response_post.rb +27 -14
  114. data/lib/emass_client/models/users.rb +28 -15
  115. data/lib/emass_client/models/workflow_definition_get.rb +63 -68
  116. data/lib/emass_client/models/workflow_definition_response_get.rb +27 -14
  117. data/lib/emass_client/models/workflow_instance_get.rb +331 -0
  118. data/lib/emass_client/models/workflow_instance_response_get.rb +230 -0
  119. data/lib/emass_client/models/workflow_instances_get.rb +107 -133
  120. data/lib/emass_client/models/workflow_instances_response_get.rb +39 -17
  121. data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +246 -0
  122. data/lib/emass_client/version.rb +6 -5
  123. data/lib/emass_client.rb +47 -54
  124. metadata +60 -89
  125. data/lib/emass_client/models/artifacts_delete.rb +0 -201
  126. data/lib/emass_client/models/artifacts_request_put_body.rb +0 -363
  127. data/lib/emass_client/models/cac_request_post_body.rb +0 -217
  128. data/lib/emass_client/models/controls_request_put_body.rb +0 -606
  129. data/lib/emass_client/models/empty200_response.rb +0 -197
  130. data/lib/emass_client/models/milestones_delete.rb +0 -197
  131. data/lib/emass_client/models/milestones_post.rb +0 -197
  132. data/lib/emass_client/models/milestones_put.rb +0 -197
  133. data/lib/emass_client/models/milestones_request_post_body.rb +0 -242
  134. data/lib/emass_client/models/milestones_request_put_body.rb +0 -242
  135. data/lib/emass_client/models/model_403.rb +0 -206
  136. data/lib/emass_client/models/model_404_response.rb +0 -206
  137. data/lib/emass_client/models/model_405.rb +0 -206
  138. data/lib/emass_client/models/model_411.rb +0 -206
  139. data/lib/emass_client/models/model_490.rb +0 -206
  140. data/lib/emass_client/models/model_500.rb +0 -206
  141. data/lib/emass_client/models/poam_delete.rb +0 -197
  142. data/lib/emass_client/models/poam_post.rb +0 -197
  143. data/lib/emass_client/models/poam_put.rb +0 -197
  144. data/lib/emass_client/models/poam_request_post_body.rb +0 -197
  145. data/lib/emass_client/models/poam_request_put_body.rb +0 -197
  146. data/lib/emass_client/models/poam_required_post.rb +0 -564
  147. data/lib/emass_client/models/poam_required_put.rb +0 -594
  148. data/lib/emass_client/models/system_id_artifacts_body.rb +0 -284
  149. data/lib/emass_client/models/test_results_request_post_body.rb +0 -306
@@ -1,14 +1,17 @@
1
1
  =begin
2
2
  #Enterprise Mission Assurance Support Service (eMASS)
3
3
 
4
- #The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers:</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
4
+ #The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
5
5
 
6
- OpenAPI spec version: v3.2
6
+ The version of the OpenAPI document: v3.3
7
7
  Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.26
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
10
11
  =end
11
12
 
13
+ require 'cgi'
14
+
12
15
  module EmassClient
13
16
  class PACApi
14
17
  attr_accessor :api_client
@@ -18,35 +21,35 @@ module EmassClient
18
21
  end
19
22
  # Submit system package for review
20
23
  # Adds a Package Approval Chain (PAC) for given `systemId` path parameter
21
- # @param body Update an existing Artifact by Id
22
- # @param system_id **System Id**: The unique system record identifier.
24
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
25
+ # @param request_body [Array<Object>] Add system package to PAC for review
23
26
  # @param [Hash] opts the optional parameters
24
27
  # @return [PacResponsePost]
25
- def add_system_pac(body, system_id, opts = {})
26
- data, _status_code, _headers = add_system_pac_with_http_info(body, system_id, opts)
28
+ def add_system_pac(system_id, request_body, opts = {})
29
+ data, _status_code, _headers = add_system_pac_with_http_info(system_id, request_body, opts)
27
30
  data
28
31
  end
29
32
 
30
33
  # Submit system package for review
31
34
  # Adds a Package Approval Chain (PAC) for given &#x60;systemId&#x60; path parameter
32
- # @param body Update an existing Artifact by Id
33
- # @param system_id **System Id**: The unique system record identifier.
35
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
36
+ # @param request_body [Array<Object>] Add system package to PAC for review
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @return [Array<(PacResponsePost, Integer, Hash)>] PacResponsePost data, response status code and response headers
36
- def add_system_pac_with_http_info(body, system_id, opts = {})
39
+ def add_system_pac_with_http_info(system_id, request_body, opts = {})
37
40
  if @api_client.config.debugging
38
41
  @api_client.config.logger.debug 'Calling API: PACApi.add_system_pac ...'
39
42
  end
40
- # verify the required parameter 'body' is set
41
- if @api_client.config.client_side_validation && body.nil?
42
- fail ArgumentError, "Missing the required parameter 'body' when calling PACApi.add_system_pac"
43
- end
44
43
  # verify the required parameter 'system_id' is set
45
44
  if @api_client.config.client_side_validation && system_id.nil?
46
45
  fail ArgumentError, "Missing the required parameter 'system_id' when calling PACApi.add_system_pac"
47
46
  end
47
+ # verify the required parameter 'request_body' is set
48
+ if @api_client.config.client_side_validation && request_body.nil?
49
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling PACApi.add_system_pac"
50
+ end
48
51
  # resource path
49
- local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', system_id.to_s)
52
+ local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
50
53
 
51
54
  # query parameters
52
55
  query_params = opts[:query_params] || {}
@@ -56,33 +59,43 @@ module EmassClient
56
59
  # HTTP header 'Accept' (if needed)
57
60
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
61
  # HTTP header 'Content-Type'
59
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
60
66
 
61
67
  # form parameters
62
68
  form_params = opts[:form_params] || {}
63
69
 
64
70
  # http body (model)
65
- post_body = opts[:body] || @api_client.object_to_http_body(body)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'PacResponsePost'
66
75
 
67
- return_type = opts[:return_type] || 'PacResponsePost'
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
68
78
 
69
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
70
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ new_options = opts.merge(
80
+ :operation => :"PACApi.add_system_pac",
71
81
  :header_params => header_params,
72
82
  :query_params => query_params,
73
83
  :form_params => form_params,
74
84
  :body => post_body,
75
85
  :auth_names => auth_names,
76
- :return_type => return_type)
86
+ :return_type => return_type
87
+ )
77
88
 
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
90
  if @api_client.config.debugging
79
91
  @api_client.config.logger.debug "API called: PACApi#add_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
92
  end
81
93
  return data, status_code, headers
82
94
  end
95
+
83
96
  # Get location of system package in PAC
84
97
  # Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter
85
- # @param system_id **System Id**: The unique system record identifier.
98
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
86
99
  # @param [Hash] opts the optional parameters
87
100
  # @return [PacResponseGet]
88
101
  def get_system_pac(system_id, opts = {})
@@ -91,8 +104,8 @@ module EmassClient
91
104
  end
92
105
 
93
106
  # Get location of system package in PAC
94
- # Returns the location of a system&#x27;s package in the Package Approval Chain (PAC) for matching &#x60;systemId&#x60; path parameter
95
- # @param system_id **System Id**: The unique system record identifier.
107
+ # Returns the location of a system&#39;s package in the Package Approval Chain (PAC) for matching &#x60;systemId&#x60; path parameter
108
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
96
109
  # @param [Hash] opts the optional parameters
97
110
  # @return [Array<(PacResponseGet, Integer, Hash)>] PacResponseGet data, response status code and response headers
98
111
  def get_system_pac_with_http_info(system_id, opts = {})
@@ -104,7 +117,7 @@ module EmassClient
104
117
  fail ArgumentError, "Missing the required parameter 'system_id' when calling PACApi.get_system_pac"
105
118
  end
106
119
  # resource path
107
- local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', system_id.to_s)
120
+ local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
108
121
 
109
122
  # query parameters
110
123
  query_params = opts[:query_params] || {}
@@ -118,19 +131,25 @@ module EmassClient
118
131
  form_params = opts[:form_params] || {}
119
132
 
120
133
  # http body (model)
121
- post_body = opts[:body]
134
+ post_body = opts[:debug_body]
135
+
136
+ # return_type
137
+ return_type = opts[:debug_return_type] || 'PacResponseGet'
122
138
 
123
- return_type = opts[:return_type] || 'PacResponseGet'
139
+ # auth_names
140
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
124
141
 
125
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
126
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
142
+ new_options = opts.merge(
143
+ :operation => :"PACApi.get_system_pac",
127
144
  :header_params => header_params,
128
145
  :query_params => query_params,
129
146
  :form_params => form_params,
130
147
  :body => post_body,
131
148
  :auth_names => auth_names,
132
- :return_type => return_type)
149
+ :return_type => return_type
150
+ )
133
151
 
152
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
134
153
  if @api_client.config.debugging
135
154
  @api_client.config.logger.debug "API called: PACApi#get_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
136
155
  end
@@ -1,14 +1,17 @@
1
1
  =begin
2
2
  #Enterprise Mission Assurance Support Service (eMASS)
3
3
 
4
- #The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers:</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
4
+ #The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
5
5
 
6
- OpenAPI spec version: v3.2
6
+ The version of the OpenAPI document: v3.3
7
7
  Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.26
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
10
11
  =end
11
12
 
13
+ require 'cgi'
14
+
12
15
  module EmassClient
13
16
  class POAMApi
14
17
  attr_accessor :api_client
@@ -18,35 +21,35 @@ module EmassClient
18
21
  end
19
22
  # Add one or many POA&M items in a system
20
23
  # Add a POA&M for given `systemId`<br> **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.<br> `pocFirstName`, `pocLastName`, `pocPhoneNumber`<br />
21
- # @param body Update an existing control by Id
22
- # @param system_id **System Id**: The unique system record identifier.
24
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
25
+ # @param request_body [Array<Object>] Add POA&amp;M(s) to a system (systemID)
23
26
  # @param [Hash] opts the optional parameters
24
27
  # @return [PoamResponsePost]
25
- def add_poam_by_system_id(body, system_id, opts = {})
26
- data, _status_code, _headers = add_poam_by_system_id_with_http_info(body, system_id, opts)
28
+ def add_poam_by_system_id(system_id, request_body, opts = {})
29
+ data, _status_code, _headers = add_poam_by_system_id_with_http_info(system_id, request_body, opts)
27
30
  data
28
31
  end
29
32
 
30
33
  # Add one or many POA&amp;M items in a system
31
34
  # 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;
32
- # @param body Update an existing control by Id
33
- # @param system_id **System Id**: The unique system record identifier.
35
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
36
+ # @param request_body [Array<Object>] Add POA&amp;M(s) to a system (systemID)
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @return [Array<(PoamResponsePost, Integer, Hash)>] PoamResponsePost data, response status code and response headers
36
- def add_poam_by_system_id_with_http_info(body, system_id, opts = {})
39
+ def add_poam_by_system_id_with_http_info(system_id, request_body, opts = {})
37
40
  if @api_client.config.debugging
38
41
  @api_client.config.logger.debug 'Calling API: POAMApi.add_poam_by_system_id ...'
39
42
  end
40
- # verify the required parameter 'body' is set
41
- if @api_client.config.client_side_validation && body.nil?
42
- fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.add_poam_by_system_id"
43
- end
44
43
  # verify the required parameter 'system_id' is set
45
44
  if @api_client.config.client_side_validation && system_id.nil?
46
45
  fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.add_poam_by_system_id"
47
46
  end
47
+ # verify the required parameter 'request_body' is set
48
+ if @api_client.config.client_side_validation && request_body.nil?
49
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling POAMApi.add_poam_by_system_id"
50
+ end
48
51
  # resource path
49
- local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
52
+ local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
50
53
 
51
54
  # query parameters
52
55
  query_params = opts[:query_params] || {}
@@ -56,61 +59,71 @@ module EmassClient
56
59
  # HTTP header 'Accept' (if needed)
57
60
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
61
  # HTTP header 'Content-Type'
59
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
60
66
 
61
67
  # form parameters
62
68
  form_params = opts[:form_params] || {}
63
69
 
64
70
  # http body (model)
65
- post_body = opts[:body] || @api_client.object_to_http_body(body)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
66
72
 
67
- return_type = opts[:return_type] || 'PoamResponsePost'
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'PoamResponsePost'
68
75
 
69
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
70
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"POAMApi.add_poam_by_system_id",
71
81
  :header_params => header_params,
72
82
  :query_params => query_params,
73
83
  :form_params => form_params,
74
84
  :body => post_body,
75
85
  :auth_names => auth_names,
76
- :return_type => return_type)
86
+ :return_type => return_type
87
+ )
77
88
 
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
90
  if @api_client.config.debugging
79
91
  @api_client.config.logger.debug "API called: POAMApi#add_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
92
  end
81
93
  return data, status_code, headers
82
94
  end
95
+
83
96
  # Remove one or many POA&M items in a system
84
- # Remove the POA&M matching `systemId` path parameter and `poamId` query parameter<br>
85
- # @param body Delete the given POA&amp;M Id
86
- # @param system_id **System Id**: The unique system record identifier.
97
+ # Remove the POA&M matching `systemId` path parameter and `poamId` Request Body<br>
98
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
99
+ # @param poam_request_delete_body_inner [Array<PoamRequestDeleteBodyInner>] Delete the given POA&amp;M Id
87
100
  # @param [Hash] opts the optional parameters
88
101
  # @return [PoamResponseDelete]
89
- def delete_poam(body, system_id, opts = {})
90
- data, _status_code, _headers = delete_poam_with_http_info(body, system_id, opts)
102
+ def delete_poam(system_id, poam_request_delete_body_inner, opts = {})
103
+ data, _status_code, _headers = delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts)
91
104
  data
92
105
  end
93
106
 
94
107
  # Remove one or many POA&amp;M items in a system
95
- # Remove the POA&amp;M matching &#x60;systemId&#x60; path parameter and &#x60;poamId&#x60; query parameter&lt;br&gt;
96
- # @param body Delete the given POA&amp;M Id
97
- # @param system_id **System Id**: The unique system record identifier.
108
+ # Remove the POA&amp;M matching &#x60;systemId&#x60; path parameter and &#x60;poamId&#x60; Request Body&lt;br&gt;
109
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
110
+ # @param poam_request_delete_body_inner [Array<PoamRequestDeleteBodyInner>] Delete the given POA&amp;M Id
98
111
  # @param [Hash] opts the optional parameters
99
112
  # @return [Array<(PoamResponseDelete, Integer, Hash)>] PoamResponseDelete data, response status code and response headers
100
- def delete_poam_with_http_info(body, system_id, opts = {})
113
+ def delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts = {})
101
114
  if @api_client.config.debugging
102
115
  @api_client.config.logger.debug 'Calling API: POAMApi.delete_poam ...'
103
116
  end
104
- # verify the required parameter 'body' is set
105
- if @api_client.config.client_side_validation && body.nil?
106
- fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.delete_poam"
107
- end
108
117
  # verify the required parameter 'system_id' is set
109
118
  if @api_client.config.client_side_validation && system_id.nil?
110
119
  fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.delete_poam"
111
120
  end
121
+ # verify the required parameter 'poam_request_delete_body_inner' is set
122
+ if @api_client.config.client_side_validation && poam_request_delete_body_inner.nil?
123
+ fail ArgumentError, "Missing the required parameter 'poam_request_delete_body_inner' when calling POAMApi.delete_poam"
124
+ end
112
125
  # resource path
113
- local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
126
+ local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
114
127
 
115
128
  # query parameters
116
129
  query_params = opts[:query_params] || {}
@@ -120,40 +133,50 @@ module EmassClient
120
133
  # HTTP header 'Accept' (if needed)
121
134
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
122
135
  # HTTP header 'Content-Type'
123
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
136
+ content_type = @api_client.select_header_content_type(['application/json'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
124
140
 
125
141
  # form parameters
126
142
  form_params = opts[:form_params] || {}
127
143
 
128
144
  # http body (model)
129
- post_body = opts[:body] || @api_client.object_to_http_body(body)
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(poam_request_delete_body_inner)
130
146
 
131
- return_type = opts[:return_type] || 'PoamResponseDelete'
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'PoamResponseDelete'
132
149
 
133
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
134
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"POAMApi.delete_poam",
135
155
  :header_params => header_params,
136
156
  :query_params => query_params,
137
157
  :form_params => form_params,
138
158
  :body => post_body,
139
159
  :auth_names => auth_names,
140
- :return_type => return_type)
160
+ :return_type => return_type
161
+ )
141
162
 
163
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
164
  if @api_client.config.debugging
143
165
  @api_client.config.logger.debug "API called: POAMApi#delete_poam\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
166
  end
145
167
  return data, status_code, headers
146
168
  end
169
+
147
170
  # Get one or many POA&M items in a system
148
171
  # Returns system(s) containing POA&M items for matching parameters.
149
- # @param system_id **System Id**: The unique system record identifier.
172
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
150
173
  # @param [Hash] opts the optional parameters
151
174
  # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format).
152
175
  # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format).
153
176
  # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
154
- # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs).
155
- # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
156
- # @return [PoamResponseGet]
177
+ # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single or comma separated).
178
+ # @option opts [Boolean] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
179
+ # @return [PoamResponseGetSystems]
157
180
  def get_system_poams(system_id, opts = {})
158
181
  data, _status_code, _headers = get_system_poams_with_http_info(system_id, opts)
159
182
  data
@@ -161,14 +184,14 @@ module EmassClient
161
184
 
162
185
  # Get one or many POA&amp;M items in a system
163
186
  # Returns system(s) containing POA&amp;M items for matching parameters.
164
- # @param system_id **System Id**: The unique system record identifier.
187
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
165
188
  # @param [Hash] opts the optional parameters
166
189
  # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format).
167
190
  # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format).
168
191
  # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
169
- # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs).
170
- # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved.
171
- # @return [Array<(PoamResponseGet, Integer, Hash)>] PoamResponseGet data, response status code and response headers
192
+ # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single or comma separated).
193
+ # @option opts [Boolean] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
194
+ # @return [Array<(PoamResponseGetSystems, Integer, Hash)>] PoamResponseGetSystems data, response status code and response headers
172
195
  def get_system_poams_with_http_info(system_id, opts = {})
173
196
  if @api_client.config.debugging
174
197
  @api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams ...'
@@ -178,7 +201,7 @@ module EmassClient
178
201
  fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.get_system_poams"
179
202
  end
180
203
  # resource path
181
- local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
204
+ local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
182
205
 
183
206
  # query parameters
184
207
  query_params = opts[:query_params] || {}
@@ -197,30 +220,37 @@ module EmassClient
197
220
  form_params = opts[:form_params] || {}
198
221
 
199
222
  # http body (model)
200
- post_body = opts[:body]
223
+ post_body = opts[:debug_body]
224
+
225
+ # return_type
226
+ return_type = opts[:debug_return_type] || 'PoamResponseGetSystems'
201
227
 
202
- return_type = opts[:return_type] || 'PoamResponseGet'
228
+ # auth_names
229
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
203
230
 
204
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
205
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
231
+ new_options = opts.merge(
232
+ :operation => :"POAMApi.get_system_poams",
206
233
  :header_params => header_params,
207
234
  :query_params => query_params,
208
235
  :form_params => form_params,
209
236
  :body => post_body,
210
237
  :auth_names => auth_names,
211
- :return_type => return_type)
238
+ :return_type => return_type
239
+ )
212
240
 
241
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
213
242
  if @api_client.config.debugging
214
243
  @api_client.config.logger.debug "API called: POAMApi#get_system_poams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
244
  end
216
245
  return data, status_code, headers
217
246
  end
247
+
218
248
  # Get POA&M item by ID in a system
219
249
  # Returns system(s) containing POA&M items for matching parameters.
220
- # @param system_id **System Id**: The unique system record identifier.
221
- # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
250
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
251
+ # @param poam_id [Integer] **POA&amp;M Id**: The unique POA&amp;M record identifier.
222
252
  # @param [Hash] opts the optional parameters
223
- # @return [PoamResponseGet]
253
+ # @return [PoamResponseGetPoams]
224
254
  def get_system_poams_by_poam_id(system_id, poam_id, opts = {})
225
255
  data, _status_code, _headers = get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts)
226
256
  data
@@ -228,10 +258,10 @@ module EmassClient
228
258
 
229
259
  # Get POA&amp;M item by ID in a system
230
260
  # Returns system(s) containing POA&amp;M items for matching parameters.
231
- # @param system_id **System Id**: The unique system record identifier.
232
- # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
261
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
262
+ # @param poam_id [Integer] **POA&amp;M Id**: The unique POA&amp;M record identifier.
233
263
  # @param [Hash] opts the optional parameters
234
- # @return [Array<(PoamResponseGet, Integer, Hash)>] PoamResponseGet data, response status code and response headers
264
+ # @return [Array<(PoamResponseGetPoams, Integer, Hash)>] PoamResponseGetPoams data, response status code and response headers
235
265
  def get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts = {})
236
266
  if @api_client.config.debugging
237
267
  @api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams_by_poam_id ...'
@@ -245,7 +275,7 @@ module EmassClient
245
275
  fail ArgumentError, "Missing the required parameter 'poam_id' when calling POAMApi.get_system_poams_by_poam_id"
246
276
  end
247
277
  # resource path
248
- local_var_path = '/api/systems/{systemId}/poams/{poamId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s)
278
+ local_var_path = '/api/systems/{systemId}/poams/{poamId}'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(poam_id.to_s))
249
279
 
250
280
  # query parameters
251
281
  query_params = opts[:query_params] || {}
@@ -259,55 +289,62 @@ module EmassClient
259
289
  form_params = opts[:form_params] || {}
260
290
 
261
291
  # http body (model)
262
- post_body = opts[:body]
292
+ post_body = opts[:debug_body]
293
+
294
+ # return_type
295
+ return_type = opts[:debug_return_type] || 'PoamResponseGetPoams'
263
296
 
264
- return_type = opts[:return_type] || 'PoamResponseGet'
297
+ # auth_names
298
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
265
299
 
266
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
267
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
300
+ new_options = opts.merge(
301
+ :operation => :"POAMApi.get_system_poams_by_poam_id",
268
302
  :header_params => header_params,
269
303
  :query_params => query_params,
270
304
  :form_params => form_params,
271
305
  :body => post_body,
272
306
  :auth_names => auth_names,
273
- :return_type => return_type)
307
+ :return_type => return_type
308
+ )
274
309
 
310
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
275
311
  if @api_client.config.debugging
276
312
  @api_client.config.logger.debug "API called: POAMApi#get_system_poams_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
277
313
  end
278
314
  return data, status_code, headers
279
315
  end
316
+
280
317
  # Update one or many POA&M items in a system
281
318
  # Update a POA&M for given `systemId`<br> **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.<br> `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`.
282
- # @param body Update an existing control by Id
283
- # @param system_id **System Id**: The unique system record identifier.
319
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
320
+ # @param request_body [Array<Object>] Update an existing control by Id
284
321
  # @param [Hash] opts the optional parameters
285
322
  # @return [PoamResponsePut]
286
- def update_poam_by_system_id(body, system_id, opts = {})
287
- data, _status_code, _headers = update_poam_by_system_id_with_http_info(body, system_id, opts)
323
+ def update_poam_by_system_id(system_id, request_body, opts = {})
324
+ data, _status_code, _headers = update_poam_by_system_id_with_http_info(system_id, request_body, opts)
288
325
  data
289
326
  end
290
327
 
291
328
  # Update one or many POA&amp;M items in a system
292
329
  # 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;.
293
- # @param body Update an existing control by Id
294
- # @param system_id **System Id**: The unique system record identifier.
330
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
331
+ # @param request_body [Array<Object>] Update an existing control by Id
295
332
  # @param [Hash] opts the optional parameters
296
333
  # @return [Array<(PoamResponsePut, Integer, Hash)>] PoamResponsePut data, response status code and response headers
297
- def update_poam_by_system_id_with_http_info(body, system_id, opts = {})
334
+ def update_poam_by_system_id_with_http_info(system_id, request_body, opts = {})
298
335
  if @api_client.config.debugging
299
336
  @api_client.config.logger.debug 'Calling API: POAMApi.update_poam_by_system_id ...'
300
337
  end
301
- # verify the required parameter 'body' is set
302
- if @api_client.config.client_side_validation && body.nil?
303
- fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.update_poam_by_system_id"
304
- end
305
338
  # verify the required parameter 'system_id' is set
306
339
  if @api_client.config.client_side_validation && system_id.nil?
307
340
  fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.update_poam_by_system_id"
308
341
  end
342
+ # verify the required parameter 'request_body' is set
343
+ if @api_client.config.client_side_validation && request_body.nil?
344
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling POAMApi.update_poam_by_system_id"
345
+ end
309
346
  # resource path
310
- local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
347
+ local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
311
348
 
312
349
  # query parameters
313
350
  query_params = opts[:query_params] || {}
@@ -317,25 +354,34 @@ module EmassClient
317
354
  # HTTP header 'Accept' (if needed)
318
355
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
356
  # HTTP header 'Content-Type'
320
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
357
+ content_type = @api_client.select_header_content_type(['application/json'])
358
+ if !content_type.nil?
359
+ header_params['Content-Type'] = content_type
360
+ end
321
361
 
322
362
  # form parameters
323
363
  form_params = opts[:form_params] || {}
324
364
 
325
365
  # http body (model)
326
- post_body = opts[:body] || @api_client.object_to_http_body(body)
366
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
367
+
368
+ # return_type
369
+ return_type = opts[:debug_return_type] || 'PoamResponsePut'
327
370
 
328
- return_type = opts[:return_type] || 'PoamResponsePut'
371
+ # auth_names
372
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
329
373
 
330
- auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
331
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
374
+ new_options = opts.merge(
375
+ :operation => :"POAMApi.update_poam_by_system_id",
332
376
  :header_params => header_params,
333
377
  :query_params => query_params,
334
378
  :form_params => form_params,
335
379
  :body => post_body,
336
380
  :auth_names => auth_names,
337
- :return_type => return_type)
381
+ :return_type => return_type
382
+ )
338
383
 
384
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
339
385
  if @api_client.config.debugging
340
386
  @api_client.config.logger.debug "API called: POAMApi#update_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
387
  end