emass_client 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1284 -0
  3. data/Rakefile +8 -0
  4. data/lib/emass_client/api/artifacts_api.rb +310 -0
  5. data/lib/emass_client/api/artifacts_export_api.rb +86 -0
  6. data/lib/emass_client/api/cac_api.rb +143 -0
  7. data/lib/emass_client/api/cmmc_assessments_api.rb +77 -0
  8. data/lib/emass_client/api/controls_api.rb +143 -0
  9. data/lib/emass_client/api/milestones_api.rb +366 -0
  10. data/lib/emass_client/api/pac_api.rb +140 -0
  11. data/lib/emass_client/api/poam_api.rb +345 -0
  12. data/lib/emass_client/api/registration_api.rb +78 -0
  13. data/lib/emass_client/api/static_code_scans_api.rb +84 -0
  14. data/lib/emass_client/api/system_roles_api.rb +150 -0
  15. data/lib/emass_client/api/systems_api.rb +162 -0
  16. data/lib/emass_client/api/test_api.rb +70 -0
  17. data/lib/emass_client/api/test_results_api.rb +149 -0
  18. data/lib/emass_client/api/workflow_definitions_api.rb +76 -0
  19. data/lib/emass_client/api/workflow_instances_api.rb +153 -0
  20. data/lib/emass_client/api_client.rb +389 -0
  21. data/lib/emass_client/api_error.rb +57 -0
  22. data/lib/emass_client/configuration.rb +224 -0
  23. data/lib/emass_client/models/artifacts_delete.rb +201 -0
  24. data/lib/emass_client/models/artifacts_delete_inner.rb +207 -0
  25. data/lib/emass_client/models/artifacts_get.rb +383 -0
  26. data/lib/emass_client/models/artifacts_request_put_body.rb +363 -0
  27. data/lib/emass_client/models/artifacts_response_del.rb +217 -0
  28. data/lib/emass_client/models/artifacts_response_del_data.rb +225 -0
  29. data/lib/emass_client/models/artifacts_response_get.rb +217 -0
  30. data/lib/emass_client/models/artifacts_response_put_post.rb +217 -0
  31. data/lib/emass_client/models/cac_get.rb +301 -0
  32. data/lib/emass_client/models/cac_request_post_body.rb +217 -0
  33. data/lib/emass_client/models/cac_response_get.rb +217 -0
  34. data/lib/emass_client/models/cac_response_post.rb +217 -0
  35. data/lib/emass_client/models/cac_response_post_data.rb +225 -0
  36. data/lib/emass_client/models/cmmc_get.rb +398 -0
  37. data/lib/emass_client/models/cmmc_response_get.rb +217 -0
  38. data/lib/emass_client/models/connectivity_ccsd.rb +217 -0
  39. data/lib/emass_client/models/controls_get.rb +663 -0
  40. data/lib/emass_client/models/controls_put.rb +227 -0
  41. data/lib/emass_client/models/controls_request_put_body.rb +606 -0
  42. data/lib/emass_client/models/controls_response_get.rb +217 -0
  43. data/lib/emass_client/models/controls_response_put.rb +217 -0
  44. data/lib/emass_client/models/definition_transitions.rb +274 -0
  45. data/lib/emass_client/models/delete_milestone.rb +212 -0
  46. data/lib/emass_client/models/delete_poam.rb +212 -0
  47. data/lib/emass_client/models/empty200_response.rb +197 -0
  48. data/lib/emass_client/models/error.rb +225 -0
  49. data/lib/emass_client/models/instances_transitions.rb +327 -0
  50. data/lib/emass_client/models/milestone_response_get.rb +217 -0
  51. data/lib/emass_client/models/milestone_response_post.rb +217 -0
  52. data/lib/emass_client/models/milestone_response_put.rb +217 -0
  53. data/lib/emass_client/models/milestones_delete.rb +197 -0
  54. data/lib/emass_client/models/milestones_get.rb +291 -0
  55. data/lib/emass_client/models/milestones_post.rb +197 -0
  56. data/lib/emass_client/models/milestones_put.rb +197 -0
  57. data/lib/emass_client/models/milestones_put_post_delete.rb +247 -0
  58. data/lib/emass_client/models/milestones_request_post_body.rb +242 -0
  59. data/lib/emass_client/models/milestones_request_put_body.rb +242 -0
  60. data/lib/emass_client/models/milestones_required_post.rb +227 -0
  61. data/lib/emass_client/models/milestones_required_put.rb +242 -0
  62. data/lib/emass_client/models/model_200.rb +208 -0
  63. data/lib/emass_client/models/model_201.rb +206 -0
  64. data/lib/emass_client/models/model_201_meta.rb +219 -0
  65. data/lib/emass_client/models/model_400.rb +206 -0
  66. data/lib/emass_client/models/model_400_meta.rb +219 -0
  67. data/lib/emass_client/models/model_400_response.rb +206 -0
  68. data/lib/emass_client/models/model_401.rb +206 -0
  69. data/lib/emass_client/models/model_401_meta.rb +219 -0
  70. data/lib/emass_client/models/model_403.rb +206 -0
  71. data/lib/emass_client/models/model_403_meta.rb +219 -0
  72. data/lib/emass_client/models/model_404.rb +219 -0
  73. data/lib/emass_client/models/model_404_response.rb +206 -0
  74. data/lib/emass_client/models/model_405.rb +206 -0
  75. data/lib/emass_client/models/model_405_meta.rb +219 -0
  76. data/lib/emass_client/models/model_411.rb +206 -0
  77. data/lib/emass_client/models/model_411_meta.rb +219 -0
  78. data/lib/emass_client/models/model_490.rb +206 -0
  79. data/lib/emass_client/models/model_490_meta.rb +219 -0
  80. data/lib/emass_client/models/model_500.rb +206 -0
  81. data/lib/emass_client/models/model_500_meta.rb +219 -0
  82. data/lib/emass_client/models/pac_get.rb +311 -0
  83. data/lib/emass_client/models/pac_post.rb +259 -0
  84. data/lib/emass_client/models/pac_request_post_body.rb +261 -0
  85. data/lib/emass_client/models/pac_response_get.rb +217 -0
  86. data/lib/emass_client/models/pac_response_post.rb +217 -0
  87. data/lib/emass_client/models/poam_delete.rb +197 -0
  88. data/lib/emass_client/models/poam_get.rb +646 -0
  89. data/lib/emass_client/models/poam_post.rb +197 -0
  90. data/lib/emass_client/models/poam_post_put_del.rb +237 -0
  91. data/lib/emass_client/models/poam_put.rb +197 -0
  92. data/lib/emass_client/models/poam_request_post_body.rb +197 -0
  93. data/lib/emass_client/models/poam_request_put_body.rb +197 -0
  94. data/lib/emass_client/models/poam_required_post.rb +564 -0
  95. data/lib/emass_client/models/poam_required_put.rb +594 -0
  96. data/lib/emass_client/models/poam_response_delete.rb +217 -0
  97. data/lib/emass_client/models/poam_response_get.rb +217 -0
  98. data/lib/emass_client/models/poam_response_post.rb +217 -0
  99. data/lib/emass_client/models/poam_response_put.rb +217 -0
  100. data/lib/emass_client/models/register.rb +215 -0
  101. data/lib/emass_client/models/register_data.rb +206 -0
  102. data/lib/emass_client/models/register_user_request_post_body.rb +211 -0
  103. data/lib/emass_client/models/role_category.rb +272 -0
  104. data/lib/emass_client/models/roles.rb +274 -0
  105. data/lib/emass_client/models/ssps.rb +227 -0
  106. data/lib/emass_client/models/stage.rb +252 -0
  107. data/lib/emass_client/models/static_code_application.rb +303 -0
  108. data/lib/emass_client/models/static_code_request_post_body.rb +197 -0
  109. data/lib/emass_client/models/static_code_required_post.rb +217 -0
  110. data/lib/emass_client/models/static_code_required_post_application.rb +217 -0
  111. data/lib/emass_client/models/success200_response.rb +217 -0
  112. data/lib/emass_client/models/system_id_artifacts_body.rb +284 -0
  113. data/lib/emass_client/models/system_response.rb +217 -0
  114. data/lib/emass_client/models/system_roles_category_response.rb +217 -0
  115. data/lib/emass_client/models/system_roles_response.rb +217 -0
  116. data/lib/emass_client/models/system_roles_response_data.rb +219 -0
  117. data/lib/emass_client/models/systems.rb +1137 -0
  118. data/lib/emass_client/models/test.rb +215 -0
  119. data/lib/emass_client/models/test_data.rb +206 -0
  120. data/lib/emass_client/models/test_results_get.rb +333 -0
  121. data/lib/emass_client/models/test_results_post.rb +227 -0
  122. data/lib/emass_client/models/test_results_request_post_body.rb +306 -0
  123. data/lib/emass_client/models/test_results_response_get.rb +217 -0
  124. data/lib/emass_client/models/test_results_response_post.rb +217 -0
  125. data/lib/emass_client/models/users.rb +224 -0
  126. data/lib/emass_client/models/workflow_definition_get.rb +282 -0
  127. data/lib/emass_client/models/workflow_definition_response_get.rb +217 -0
  128. data/lib/emass_client/models/workflow_instances_get.rb +368 -0
  129. data/lib/emass_client/models/workflow_instances_response_get.rb +217 -0
  130. data/lib/emass_client/version.rb +14 -0
  131. data/lib/emass_client.rb +161 -0
  132. metadata +259 -0
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,310 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
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:
5
+
6
+ OpenAPI spec version: v3.2
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
10
+ =end
11
+
12
+ module EmassClient
13
+ class ArtifactsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Add one or many artifacts in a system
20
+ # <strong>Information</strong><br> The request body of a POST request through the Artifact Endpoint accepts a single binary file with file extension \".zip\" only. This accepted .zip file should contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt. Filename uniqueness throughout eMASS will be enforced by the API.<br><br> Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact existing within the application, the file associated with the artifact will be updated. If no artifact is matched via filename to the application, a new artifact will be created with the following default values. Any values not specified below will be blank. <ul> <li>isTemplate: false</li> <li>type: other</li> <li>category: evidence</li> </ul> To update values other than the file itself, please submit a PUT request.<br> <strong>Zip file information</strong><br> Upload a zip file contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt.<br><br> <strong>Business Rules</strong><br> Artifact cannot be saved if the file does not have the following file extensions: .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx Artifact version cannot be saved if an Artifact with the same file name already exist in the system. Artifact cannot be saved if the file size exceeds 30MB.
21
+ # @param is_template
22
+ # @param type
23
+ # @param category
24
+ # @param zipper
25
+ # @param system_id **System Id**: The unique system record identifier.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [ArtifactsResponsePutPost]
28
+ def add_artifacts_by_system_id(is_template, type, category, zipper, system_id, opts = {})
29
+ data, _status_code, _headers = add_artifacts_by_system_id_with_http_info(is_template, type, category, zipper, system_id, opts)
30
+ data
31
+ end
32
+
33
+ # Add one or many artifacts in a system
34
+ # &lt;strong&gt;Information&lt;/strong&gt;&lt;br&gt; The request body of a POST request through the Artifact Endpoint accepts a single binary file with file extension \&quot;.zip\&quot; only. This accepted .zip file should contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt. Filename uniqueness throughout eMASS will be enforced by the API.&lt;br&gt;&lt;br&gt; Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact existing within the application, the file associated with the artifact will be updated. If no artifact is matched via filename to the application, a new artifact will be created with the following default values. Any values not specified below will be blank. &lt;ul&gt; &lt;li&gt;isTemplate: false&lt;/li&gt; &lt;li&gt;type: other&lt;/li&gt; &lt;li&gt;category: evidence&lt;/li&gt; &lt;/ul&gt; To update values other than the file itself, please submit a PUT request.&lt;br&gt; &lt;strong&gt;Zip file information&lt;/strong&gt;&lt;br&gt; Upload a zip file contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt.&lt;br&gt;&lt;br&gt; &lt;strong&gt;Business Rules&lt;/strong&gt;&lt;br&gt; Artifact cannot be saved if the file does not have the following file extensions: .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx Artifact version cannot be saved if an Artifact with the same file name already exist in the system. Artifact cannot be saved if the file size exceeds 30MB.
35
+ # @param is_template
36
+ # @param type
37
+ # @param category
38
+ # @param zipper
39
+ # @param system_id **System Id**: The unique system record identifier.
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [Array<(ArtifactsResponsePutPost, Integer, Hash)>] ArtifactsResponsePutPost data, response status code and response headers
42
+ def add_artifacts_by_system_id_with_http_info(is_template, type, category, zipper, system_id, opts = {})
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug 'Calling API: ArtifactsApi.add_artifacts_by_system_id ...'
45
+ end
46
+ # verify the required parameter 'is_template' is set
47
+ if @api_client.config.client_side_validation && is_template.nil?
48
+ fail ArgumentError, "Missing the required parameter 'is_template' when calling ArtifactsApi.add_artifacts_by_system_id"
49
+ end
50
+ # verify the required parameter 'type' is set
51
+ if @api_client.config.client_side_validation && type.nil?
52
+ fail ArgumentError, "Missing the required parameter 'type' when calling ArtifactsApi.add_artifacts_by_system_id"
53
+ end
54
+ # verify enum value
55
+ if @api_client.config.client_side_validation && !['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result', 'Auditor Report'].include?(type)
56
+ fail ArgumentError, "invalid value for 'type', must be one of Procedure, Diagram, Policy, Labor, Document, Image, Other, Scan Result, Auditor Report"
57
+ end
58
+ # verify the required parameter 'category' is set
59
+ if @api_client.config.client_side_validation && category.nil?
60
+ fail ArgumentError, "Missing the required parameter 'category' when calling ArtifactsApi.add_artifacts_by_system_id"
61
+ end
62
+ # verify enum value
63
+ if @api_client.config.client_side_validation && !['Implementation Guidance', 'Evidence'].include?(category)
64
+ fail ArgumentError, "invalid value for 'category', must be one of Implementation Guidance, Evidence"
65
+ end
66
+ # verify the required parameter 'zipper' is set
67
+ if @api_client.config.client_side_validation && zipper.nil?
68
+ fail ArgumentError, "Missing the required parameter 'zipper' when calling ArtifactsApi.add_artifacts_by_system_id"
69
+ end
70
+ # verify the required parameter 'system_id' is set
71
+ if @api_client.config.client_side_validation && system_id.nil?
72
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.add_artifacts_by_system_id"
73
+ end
74
+ # resource path
75
+ local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
76
+
77
+ # query parameters
78
+ query_params = opts[:query_params] || {}
79
+
80
+ # header parameters
81
+ header_params = opts[:header_params] || {}
82
+ # HTTP header 'Accept' (if needed)
83
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
84
+ # HTTP header 'Content-Type'
85
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
86
+
87
+ # form parameters
88
+ form_params = opts[:form_params] || {}
89
+ form_params['isTemplate'] = is_template
90
+ form_params['type'] = type
91
+ form_params['category'] = category
92
+ form_params['Zipper'] = zipper
93
+
94
+ # http body (model)
95
+ post_body = opts[:body]
96
+
97
+ return_type = opts[:return_type] || 'ArtifactsResponsePutPost'
98
+
99
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
100
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
101
+ :header_params => header_params,
102
+ :query_params => query_params,
103
+ :form_params => form_params,
104
+ :body => post_body,
105
+ :auth_names => auth_names,
106
+ :return_type => return_type)
107
+
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug "API called: ArtifactsApi#add_artifacts_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
110
+ end
111
+ return data, status_code, headers
112
+ end
113
+ # Remove one or many artifacts in a system
114
+ # Remove the Artifact(s) matching `systemId` path parameter and request body artifact(s) file name<br><br> <b>Note:</b> Multiple files can be deleted by providing multiple file names at the CL (comma delimited) Example: --files file1.txt, file2.txt
115
+ # @param body See notes above for additional information
116
+ # @param system_id **System Id**: The unique system record identifier.
117
+ # @param [Hash] opts the optional parameters
118
+ # @return [ArtifactsResponseDel]
119
+ def delete_artifact(body, system_id, opts = {})
120
+ data, _status_code, _headers = delete_artifact_with_http_info(body, system_id, opts)
121
+ data
122
+ end
123
+
124
+ # Remove one or many artifacts in a system
125
+ # Remove the Artifact(s) matching &#x60;systemId&#x60; path parameter and request body artifact(s) file name&lt;br&gt;&lt;br&gt; &lt;b&gt;Note:&lt;/b&gt; Multiple files can be deleted by providing multiple file names at the CL (comma delimited) Example: --files file1.txt, file2.txt
126
+ # @param body See notes above for additional information
127
+ # @param system_id **System Id**: The unique system record identifier.
128
+ # @param [Hash] opts the optional parameters
129
+ # @return [Array<(ArtifactsResponseDel, Integer, Hash)>] ArtifactsResponseDel data, response status code and response headers
130
+ def delete_artifact_with_http_info(body, system_id, opts = {})
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug 'Calling API: ArtifactsApi.delete_artifact ...'
133
+ end
134
+ # verify the required parameter 'body' is set
135
+ if @api_client.config.client_side_validation && body.nil?
136
+ fail ArgumentError, "Missing the required parameter 'body' when calling ArtifactsApi.delete_artifact"
137
+ end
138
+ # verify the required parameter 'system_id' is set
139
+ if @api_client.config.client_side_validation && system_id.nil?
140
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.delete_artifact"
141
+ end
142
+ # resource path
143
+ local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
144
+
145
+ # query parameters
146
+ query_params = opts[:query_params] || {}
147
+
148
+ # header parameters
149
+ header_params = opts[:header_params] || {}
150
+ # HTTP header 'Accept' (if needed)
151
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+ # HTTP header 'Content-Type'
153
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
154
+
155
+ # form parameters
156
+ form_params = opts[:form_params] || {}
157
+
158
+ # http body (model)
159
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
160
+
161
+ return_type = opts[:return_type] || 'ArtifactsResponseDel'
162
+
163
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
164
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type)
171
+
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "API called: ArtifactsApi#delete_artifact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
+ end
175
+ return data, status_code, headers
176
+ end
177
+ # Get one or many artifacts in a system
178
+ # Returns selected artifacts matching parameters to include the file name containing the artifacts.
179
+ # @param system_id **System Id**: The unique system record identifier.
180
+ # @param [Hash] opts the optional parameters
181
+ # @option opts [String] :filename **File Name**: The file name (to include file-extension).
182
+ # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
183
+ # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs).
184
+ # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
185
+ # @return [ArtifactsResponseGet]
186
+ def get_system_artifacts(system_id, opts = {})
187
+ data, _status_code, _headers = get_system_artifacts_with_http_info(system_id, opts)
188
+ data
189
+ end
190
+
191
+ # Get one or many artifacts in a system
192
+ # Returns selected artifacts matching parameters to include the file name containing the artifacts.
193
+ # @param system_id **System Id**: The unique system record identifier.
194
+ # @param [Hash] opts the optional parameters
195
+ # @option opts [String] :filename **File Name**: The file name (to include file-extension).
196
+ # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
197
+ # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs).
198
+ # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved.
199
+ # @return [Array<(ArtifactsResponseGet, Integer, Hash)>] ArtifactsResponseGet data, response status code and response headers
200
+ def get_system_artifacts_with_http_info(system_id, opts = {})
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug 'Calling API: ArtifactsApi.get_system_artifacts ...'
203
+ end
204
+ # verify the required parameter 'system_id' is set
205
+ if @api_client.config.client_side_validation && system_id.nil?
206
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.get_system_artifacts"
207
+ end
208
+ # resource path
209
+ local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
210
+
211
+ # query parameters
212
+ query_params = opts[:query_params] || {}
213
+ query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
214
+ query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil?
215
+ query_params[:'ccis'] = opts[:'ccis'] if !opts[:'ccis'].nil?
216
+ query_params[:'systemOnly'] = opts[:'system_only'] if !opts[:'system_only'].nil?
217
+
218
+ # header parameters
219
+ header_params = opts[:header_params] || {}
220
+ # HTTP header 'Accept' (if needed)
221
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
222
+
223
+ # form parameters
224
+ form_params = opts[:form_params] || {}
225
+
226
+ # http body (model)
227
+ post_body = opts[:body]
228
+
229
+ return_type = opts[:return_type] || 'ArtifactsResponseGet'
230
+
231
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :auth_names => auth_names,
238
+ :return_type => return_type)
239
+
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug "API called: ArtifactsApi#get_system_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
+ end
243
+ return data, status_code, headers
244
+ end
245
+ # Update one or many artifacts in a system
246
+ # Updates an artifact for given `systemId` path parameter<br><br> **Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category`
247
+ # @param body See &#x60;information&#x60; above for additional instructions
248
+ # @param system_id **System Id**: The unique system record identifier.
249
+ # @param [Hash] opts the optional parameters
250
+ # @return [ArtifactsResponsePutPost]
251
+ def update_artifact_by_system_id(body, system_id, opts = {})
252
+ data, _status_code, _headers = update_artifact_by_system_id_with_http_info(body, system_id, opts)
253
+ data
254
+ end
255
+
256
+ # Update one or many artifacts in a system
257
+ # Updates an artifact for given &#x60;systemId&#x60; path parameter&lt;br&gt;&lt;br&gt; **Request Body Required Fields** - &#x60;filename&#x60; - &#x60;isTemplate&#x60; - &#x60;type&#x60; - &#x60;category&#x60;
258
+ # @param body See &#x60;information&#x60; above for additional instructions
259
+ # @param system_id **System Id**: The unique system record identifier.
260
+ # @param [Hash] opts the optional parameters
261
+ # @return [Array<(ArtifactsResponsePutPost, Integer, Hash)>] ArtifactsResponsePutPost data, response status code and response headers
262
+ def update_artifact_by_system_id_with_http_info(body, system_id, opts = {})
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug 'Calling API: ArtifactsApi.update_artifact_by_system_id ...'
265
+ end
266
+ # verify the required parameter 'body' is set
267
+ if @api_client.config.client_side_validation && body.nil?
268
+ fail ArgumentError, "Missing the required parameter 'body' when calling ArtifactsApi.update_artifact_by_system_id"
269
+ end
270
+ # verify the required parameter 'system_id' is set
271
+ if @api_client.config.client_side_validation && system_id.nil?
272
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.update_artifact_by_system_id"
273
+ end
274
+ # resource path
275
+ local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
276
+
277
+ # query parameters
278
+ query_params = opts[:query_params] || {}
279
+
280
+ # header parameters
281
+ header_params = opts[:header_params] || {}
282
+ # HTTP header 'Accept' (if needed)
283
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
284
+ # HTTP header 'Content-Type'
285
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
286
+
287
+ # form parameters
288
+ form_params = opts[:form_params] || {}
289
+
290
+ # http body (model)
291
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
292
+
293
+ return_type = opts[:return_type] || 'ArtifactsResponsePutPost'
294
+
295
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
296
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
297
+ :header_params => header_params,
298
+ :query_params => query_params,
299
+ :form_params => form_params,
300
+ :body => post_body,
301
+ :auth_names => auth_names,
302
+ :return_type => return_type)
303
+
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug "API called: ArtifactsApi#update_artifact_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306
+ end
307
+ return data, status_code, headers
308
+ end
309
+ end
310
+ end
@@ -0,0 +1,86 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
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:
5
+
6
+ OpenAPI spec version: v3.2
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
10
+ =end
11
+
12
+ module EmassClient
13
+ class ArtifactsExportApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Get the file of an artifact in a system
20
+ # <strong>Sample Responce</strong><br> Binary file associated with given filename.<br> If `compress` parameter is specified, zip archive of binary file associated with given filename.
21
+ # @param system_id **System Id**: The unique system record identifier.
22
+ # @param filename **File Name**: The file name (to include file-extension).
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [BOOLEAN] :compress **Compress File**: Determines if returned file is compressed. (default to true)
25
+ # @return [String]
26
+ def get_system_artifacts_export(system_id, filename, opts = {})
27
+ data, _status_code, _headers = get_system_artifacts_export_with_http_info(system_id, filename, opts)
28
+ data
29
+ end
30
+
31
+ # Get the file of an artifact in a system
32
+ # &lt;strong&gt;Sample Responce&lt;/strong&gt;&lt;br&gt; Binary file associated with given filename.&lt;br&gt; If &#x60;compress&#x60; parameter is specified, zip archive of binary file associated with given filename.
33
+ # @param system_id **System Id**: The unique system record identifier.
34
+ # @param filename **File Name**: The file name (to include file-extension).
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [BOOLEAN] :compress **Compress File**: Determines if returned file is compressed.
37
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
38
+ def get_system_artifacts_export_with_http_info(system_id, filename, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: ArtifactsExportApi.get_system_artifacts_export ...'
41
+ end
42
+ # verify the required parameter 'system_id' is set
43
+ if @api_client.config.client_side_validation && system_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsExportApi.get_system_artifacts_export"
45
+ end
46
+ # verify the required parameter 'filename' is set
47
+ if @api_client.config.client_side_validation && filename.nil?
48
+ fail ArgumentError, "Missing the required parameter 'filename' when calling ArtifactsExportApi.get_system_artifacts_export"
49
+ end
50
+ # resource path
51
+ local_var_path = '/api/systems/{systemId}/artifacts-export'.sub('{' + 'systemId' + '}', system_id.to_s)
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+ query_params[:'filename'] = filename
56
+ query_params[:'compress'] = opts[:'compress'] if !opts[:'compress'].nil?
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/octet-stream', 'application/json'])
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:body]
68
+
69
+ return_type = opts[:return_type] || 'String'
70
+
71
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type)
79
+
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: ArtifactsExportApi#get_system_artifacts_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,143 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
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:
5
+
6
+ OpenAPI spec version: v3.2
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
10
+ =end
11
+
12
+ module EmassClient
13
+ class CACApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Submit control to second role of CAC
20
+ # Adds a Control Approval Chain (CAC) for given `systemId` path parameter<br><br> POST requests will only yield successful results if the control is currently sitting at the first role of the CAC. If the control is not currently sitting at the first role, then an error will be returned.
21
+ # @param body Update an existing Artifact by Id
22
+ # @param system_id **System Id**: The unique system record identifier.
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [CacResponsePost]
25
+ def add_system_cac(body, system_id, opts = {})
26
+ data, _status_code, _headers = add_system_cac_with_http_info(body, system_id, opts)
27
+ data
28
+ end
29
+
30
+ # Submit control to second role of CAC
31
+ # Adds a Control Approval Chain (CAC) for given &#x60;systemId&#x60; path parameter&lt;br&gt;&lt;br&gt; POST requests will only yield successful results if the control is currently sitting at the first role of the CAC. If the control is not currently sitting at the first role, then an error will be returned.
32
+ # @param body Update an existing Artifact by Id
33
+ # @param system_id **System Id**: The unique system record identifier.
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(CacResponsePost, Integer, Hash)>] CacResponsePost data, response status code and response headers
36
+ def add_system_cac_with_http_info(body, system_id, opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: CACApi.add_system_cac ...'
39
+ 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 CACApi.add_system_cac"
43
+ end
44
+ # verify the required parameter 'system_id' is set
45
+ if @api_client.config.client_side_validation && system_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.add_system_cac"
47
+ end
48
+ # resource path
49
+ local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s)
50
+
51
+ # query parameters
52
+ query_params = opts[:query_params] || {}
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
66
+
67
+ return_type = opts[:return_type] || 'CacResponsePost'
68
+
69
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
70
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type)
77
+
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: CACApi#add_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ # Get location of one or many controls in CAC
84
+ # Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter
85
+ # @param system_id **System Id**: The unique system record identifier.
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
88
+ # @return [CacResponseGet]
89
+ def get_system_cac(system_id, opts = {})
90
+ data, _status_code, _headers = get_system_cac_with_http_info(system_id, opts)
91
+ data
92
+ end
93
+
94
+ # Get location of one or many controls in CAC
95
+ # Returns the location of a system&#x27;s package in the Control Approval Chain (CAC) for matching &#x60;systemId&#x60; path parameter
96
+ # @param system_id **System Id**: The unique system record identifier.
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
99
+ # @return [Array<(CacResponseGet, Integer, Hash)>] CacResponseGet data, response status code and response headers
100
+ def get_system_cac_with_http_info(system_id, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: CACApi.get_system_cac ...'
103
+ end
104
+ # verify the required parameter 'system_id' is set
105
+ if @api_client.config.client_side_validation && system_id.nil?
106
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.get_system_cac"
107
+ end
108
+ # resource path
109
+ local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s)
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+ query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil?
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ return_type = opts[:return_type] || 'CacResponseGet'
127
+
128
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
129
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
130
+ :header_params => header_params,
131
+ :query_params => query_params,
132
+ :form_params => form_params,
133
+ :body => post_body,
134
+ :auth_names => auth_names,
135
+ :return_type => return_type)
136
+
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: CACApi#get_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,77 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
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:
5
+
6
+ OpenAPI spec version: v3.2
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
10
+ =end
11
+
12
+ module EmassClient
13
+ class CMMCAssessmentsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Get CMMC assessment information
20
+ # Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only.
21
+ # @param since_date **Date** CMMC date (Unix date format)
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [CmmcResponseGet]
24
+ def get_cmmc_assessments(since_date, opts = {})
25
+ data, _status_code, _headers = get_cmmc_assessments_with_http_info(since_date, opts)
26
+ data
27
+ end
28
+
29
+ # Get CMMC assessment information
30
+ # Get all CMMC assessment after the given date &#x60;sinceDate&#x60; parameter. It is available to CMMC eMASS only.
31
+ # @param since_date **Date** CMMC date (Unix date format)
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [Array<(CmmcResponseGet, Integer, Hash)>] CmmcResponseGet data, response status code and response headers
34
+ def get_cmmc_assessments_with_http_info(since_date, opts = {})
35
+ if @api_client.config.debugging
36
+ @api_client.config.logger.debug 'Calling API: CMMCAssessmentsApi.get_cmmc_assessments ...'
37
+ end
38
+ # verify the required parameter 'since_date' is set
39
+ if @api_client.config.client_side_validation && since_date.nil?
40
+ fail ArgumentError, "Missing the required parameter 'since_date' when calling CMMCAssessmentsApi.get_cmmc_assessments"
41
+ end
42
+ # resource path
43
+ local_var_path = '/api/cmmc-assessments'
44
+
45
+ # query parameters
46
+ query_params = opts[:query_params] || {}
47
+ query_params[:'sinceDate'] = since_date
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:body]
59
+
60
+ return_type = opts[:return_type] || 'CmmcResponseGet'
61
+
62
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
63
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type)
70
+
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: CMMCAssessmentsApi#get_cmmc_assessments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ end
77
+ end