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.
- checksums.yaml +4 -4
- data/README.md +152 -1124
- data/Rakefile +2 -0
- data/lib/emass_client/api/artifacts_api.rb +124 -97
- data/lib/emass_client/api/artifacts_export_api.rb +28 -19
- data/lib/emass_client/api/cac_api.rb +50 -31
- data/lib/emass_client/api/cloud_resources_api.rb +96 -0
- data/lib/emass_client/api/cmmc_assessments_api.rb +20 -11
- data/lib/emass_client/api/containers_api.rb +96 -0
- data/lib/emass_client/api/controls_api.rb +53 -34
- data/lib/emass_client/api/milestones_api.rb +138 -92
- data/lib/emass_client/api/pac_api.rb +50 -31
- data/lib/emass_client/api/poam_api.rb +132 -86
- data/lib/emass_client/api/registration_api.rb +30 -18
- data/lib/emass_client/api/static_code_scans_api.rb +38 -26
- data/lib/emass_client/api/system_roles_api.rb +48 -29
- data/lib/emass_client/api/systems_api.rb +57 -39
- data/lib/emass_client/api/test_api.rb +20 -11
- data/lib/emass_client/api/test_results_api.rb +53 -34
- data/lib/emass_client/api/workflow_definitions_api.rb +23 -14
- data/lib/emass_client/api/workflow_instances_api.rb +58 -53
- data/lib/emass_client/api_client.rb +59 -57
- data/lib/emass_client/api_error.rb +5 -5
- data/lib/emass_client/configuration.rb +93 -16
- data/lib/emass_client/models/artifacts_get.rb +54 -31
- data/lib/emass_client/models/{artifacts_delete_inner.rb → artifacts_request_delete_body_inner.rb} +29 -16
- data/lib/emass_client/models/artifacts_response_del.rb +27 -14
- data/lib/emass_client/models/{artifacts_response_del_data.rb → artifacts_response_del_data_inner.rb} +31 -18
- data/lib/emass_client/models/artifacts_response_get.rb +27 -14
- data/lib/emass_client/models/artifacts_response_put_post.rb +27 -14
- data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +265 -0
- data/lib/emass_client/models/cac_get.rb +82 -50
- data/lib/emass_client/models/cac_response_get.rb +27 -14
- data/lib/emass_client/models/cac_response_post.rb +27 -14
- data/lib/emass_client/models/{cac_response_post_data.rb → cac_response_post_data_inner.rb} +61 -21
- data/lib/emass_client/models/{pac_request_post_body.rb → cloud_resources_post.rb} +73 -69
- data/lib/emass_client/models/cloud_resources_response_post.rb +230 -0
- data/lib/emass_client/models/cmmc_get.rb +53 -63
- data/lib/emass_client/models/cmmc_response_get.rb +27 -14
- data/lib/emass_client/models/connectivity_ccsd.rb +29 -14
- data/lib/emass_client/models/containers_resources_post.rb +265 -0
- data/lib/emass_client/models/containers_response_post.rb +230 -0
- data/lib/emass_client/models/controls_get.rb +103 -66
- data/lib/emass_client/models/controls_put.rb +58 -18
- data/lib/emass_client/models/controls_response_get.rb +28 -14
- data/lib/emass_client/models/controls_response_put.rb +27 -14
- data/lib/emass_client/models/definition_transitions.rb +32 -62
- data/lib/emass_client/models/instances_transitions.rb +37 -88
- data/lib/emass_client/models/milestone_response_get.rb +27 -14
- data/lib/emass_client/models/milestone_response_get_milestone.rb +228 -0
- data/lib/emass_client/models/milestone_response_post.rb +27 -14
- data/lib/emass_client/models/milestone_response_put.rb +27 -14
- data/lib/emass_client/models/milestones_get.rb +33 -20
- data/lib/emass_client/models/milestones_put_post_delete.rb +60 -20
- data/lib/emass_client/models/{delete_milestone.rb → milestones_request_delete_body_inner.rb} +29 -21
- data/lib/emass_client/models/milestones_required_post.rb +27 -14
- data/lib/emass_client/models/milestones_required_put.rb +28 -15
- data/lib/emass_client/models/pac_get.rb +39 -22
- data/lib/emass_client/models/pac_post.rb +60 -20
- data/lib/emass_client/models/pac_response_get.rb +28 -14
- data/lib/emass_client/models/pac_response_post.rb +27 -14
- data/lib/emass_client/models/poam_get.rb +114 -77
- data/lib/emass_client/models/poam_post_put_del.rb +59 -19
- data/lib/emass_client/models/{delete_poam.rb → poam_request_delete_body_inner.rb} +29 -21
- data/lib/emass_client/models/poam_response_delete.rb +27 -14
- data/lib/emass_client/models/poam_response_get_poams.rb +228 -0
- data/lib/emass_client/models/{static_code_required_post.rb → poam_response_get_systems.rb} +42 -29
- data/lib/emass_client/models/poam_response_post.rb +27 -14
- data/lib/emass_client/models/poam_response_put.rb +27 -14
- data/lib/emass_client/models/register.rb +27 -14
- data/lib/emass_client/models/register_data.rb +26 -13
- data/lib/emass_client/models/register_user_request_post_body.rb +26 -13
- data/lib/emass_client/models/{model_200.rb → response200.rb} +53 -16
- data/lib/emass_client/models/{model_400.rb → response201.rb} +29 -16
- data/lib/emass_client/models/{model_201_meta.rb → response201_meta.rb} +54 -17
- data/lib/emass_client/models/{model_400_response.rb → response400.rb} +29 -16
- data/lib/emass_client/models/{model_400_meta.rb → response400_meta.rb} +54 -17
- data/lib/emass_client/models/{model_401.rb → response401.rb} +29 -16
- data/lib/emass_client/models/{model_401_meta.rb → response401_meta.rb} +54 -17
- data/lib/emass_client/models/{model_201.rb → response403.rb} +29 -16
- data/lib/emass_client/models/{model_403_meta.rb → response403_meta.rb} +54 -17
- data/lib/emass_client/models/{model_404.rb → response404.rb} +54 -17
- data/lib/emass_client/models/response405.rb +219 -0
- data/lib/emass_client/models/{model_405_meta.rb → response405_meta.rb} +54 -17
- data/lib/emass_client/models/response411.rb +219 -0
- data/lib/emass_client/models/{model_411_meta.rb → response411_meta.rb} +54 -17
- data/lib/emass_client/models/response490.rb +219 -0
- data/lib/emass_client/models/{model_490_meta.rb → response490_meta.rb} +54 -17
- data/lib/emass_client/models/response500.rb +219 -0
- data/lib/emass_client/models/{model_500_meta.rb → response500_meta.rb} +54 -17
- data/lib/emass_client/models/role_category.rb +32 -50
- data/lib/emass_client/models/roles.rb +29 -61
- data/lib/emass_client/models/ssps.rb +32 -16
- data/lib/emass_client/models/stage.rb +30 -49
- data/lib/emass_client/models/static_code_application.rb +34 -33
- data/lib/emass_client/models/static_code_post.rb +275 -0
- data/lib/emass_client/models/static_code_request_post_body.rb +47 -14
- data/lib/emass_client/models/{static_code_required_post_application.rb → static_code_request_post_body_application.rb} +30 -17
- data/lib/emass_client/models/static_code_response_post.rb +230 -0
- data/lib/emass_client/models/success200_response.rb +27 -14
- data/lib/emass_client/models/{error.rb → success200_response_data_inner.rb} +57 -36
- data/lib/emass_client/models/system_response.rb +28 -17
- data/lib/emass_client/models/system_roles_category_response.rb +28 -14
- data/lib/emass_client/models/system_roles_response.rb +27 -14
- data/lib/emass_client/models/{system_roles_response_data.rb → system_roles_response_data_inner.rb} +30 -17
- data/lib/emass_client/models/systems.rb +218 -191
- data/lib/emass_client/models/{poam_response_get.rb → systems_response.rb} +30 -17
- data/lib/emass_client/models/test.rb +27 -14
- data/lib/emass_client/models/test_data.rb +26 -13
- data/lib/emass_client/models/test_results_get.rb +39 -35
- data/lib/emass_client/models/test_results_post.rb +58 -18
- data/lib/emass_client/models/test_results_response_get.rb +27 -14
- data/lib/emass_client/models/test_results_response_post.rb +27 -14
- data/lib/emass_client/models/users.rb +28 -15
- data/lib/emass_client/models/workflow_definition_get.rb +63 -68
- data/lib/emass_client/models/workflow_definition_response_get.rb +27 -14
- data/lib/emass_client/models/workflow_instance_get.rb +331 -0
- data/lib/emass_client/models/workflow_instance_response_get.rb +230 -0
- data/lib/emass_client/models/workflow_instances_get.rb +107 -133
- data/lib/emass_client/models/workflow_instances_response_get.rb +39 -17
- data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +246 -0
- data/lib/emass_client/version.rb +6 -5
- data/lib/emass_client.rb +47 -54
- metadata +60 -89
- data/lib/emass_client/models/artifacts_delete.rb +0 -201
- data/lib/emass_client/models/artifacts_request_put_body.rb +0 -363
- data/lib/emass_client/models/cac_request_post_body.rb +0 -217
- data/lib/emass_client/models/controls_request_put_body.rb +0 -606
- data/lib/emass_client/models/empty200_response.rb +0 -197
- data/lib/emass_client/models/milestones_delete.rb +0 -197
- data/lib/emass_client/models/milestones_post.rb +0 -197
- data/lib/emass_client/models/milestones_put.rb +0 -197
- data/lib/emass_client/models/milestones_request_post_body.rb +0 -242
- data/lib/emass_client/models/milestones_request_put_body.rb +0 -242
- data/lib/emass_client/models/model_403.rb +0 -206
- data/lib/emass_client/models/model_404_response.rb +0 -206
- data/lib/emass_client/models/model_405.rb +0 -206
- data/lib/emass_client/models/model_411.rb +0 -206
- data/lib/emass_client/models/model_490.rb +0 -206
- data/lib/emass_client/models/model_500.rb +0 -206
- data/lib/emass_client/models/poam_delete.rb +0 -197
- data/lib/emass_client/models/poam_post.rb +0 -197
- data/lib/emass_client/models/poam_put.rb +0 -197
- data/lib/emass_client/models/poam_request_post_body.rb +0 -197
- data/lib/emass_client/models/poam_request_put_body.rb +0 -197
- data/lib/emass_client/models/poam_required_post.rb +0 -564
- data/lib/emass_client/models/poam_required_put.rb +0 -594
- data/lib/emass_client/models/system_id_artifacts_body.rb +0 -284
- 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.
|
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
|
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://
|
9
|
-
|
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 CACApi
|
14
17
|
attr_accessor :api_client
|
@@ -18,35 +21,35 @@ module EmassClient
|
|
18
21
|
end
|
19
22
|
# Submit control to second role of CAC
|
20
23
|
# 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
|
22
|
-
# @param
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param request_body [Array<Object>] Add control(s) to second role of CAC
|
23
26
|
# @param [Hash] opts the optional parameters
|
24
27
|
# @return [CacResponsePost]
|
25
|
-
def add_system_cac(
|
26
|
-
data, _status_code, _headers = add_system_cac_with_http_info(
|
28
|
+
def add_system_cac(system_id, request_body, opts = {})
|
29
|
+
data, _status_code, _headers = add_system_cac_with_http_info(system_id, request_body, opts)
|
27
30
|
data
|
28
31
|
end
|
29
32
|
|
30
33
|
# Submit control to second role of CAC
|
31
34
|
# 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.
|
32
|
-
# @param
|
33
|
-
# @param
|
35
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
36
|
+
# @param request_body [Array<Object>] Add control(s) to second role of CAC
|
34
37
|
# @param [Hash] opts the optional parameters
|
35
38
|
# @return [Array<(CacResponsePost, Integer, Hash)>] CacResponsePost data, response status code and response headers
|
36
|
-
def add_system_cac_with_http_info(
|
39
|
+
def add_system_cac_with_http_info(system_id, request_body, opts = {})
|
37
40
|
if @api_client.config.debugging
|
38
41
|
@api_client.config.logger.debug 'Calling API: CACApi.add_system_cac ...'
|
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 CACApi.add_system_cac"
|
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 CACApi.add_system_cac"
|
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 CACApi.add_system_cac"
|
50
|
+
end
|
48
51
|
# resource path
|
49
|
-
local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s)
|
52
|
+
local_var_path = '/api/systems/{systemId}/approval/cac'.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
|
-
|
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[:
|
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] || 'CacResponsePost'
|
66
75
|
|
67
|
-
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
68
78
|
|
69
|
-
|
70
|
-
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"CACApi.add_system_cac",
|
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: CACApi#add_system_cac\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 one or many controls in CAC
|
84
97
|
# 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.
|
98
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
86
99
|
# @param [Hash] opts the optional parameters
|
87
100
|
# @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
|
88
101
|
# @return [CacResponseGet]
|
@@ -92,8 +105,8 @@ module EmassClient
|
|
92
105
|
end
|
93
106
|
|
94
107
|
# Get location of one or many controls in CAC
|
95
|
-
# Returns the location of a system&#
|
96
|
-
# @param system_id **System Id**: The unique system record identifier.
|
108
|
+
# Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter
|
109
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
97
110
|
# @param [Hash] opts the optional parameters
|
98
111
|
# @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
|
99
112
|
# @return [Array<(CacResponseGet, Integer, Hash)>] CacResponseGet data, response status code and response headers
|
@@ -106,7 +119,7 @@ module EmassClient
|
|
106
119
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.get_system_cac"
|
107
120
|
end
|
108
121
|
# resource path
|
109
|
-
local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s)
|
122
|
+
local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
110
123
|
|
111
124
|
# query parameters
|
112
125
|
query_params = opts[:query_params] || {}
|
@@ -121,19 +134,25 @@ module EmassClient
|
|
121
134
|
form_params = opts[:form_params] || {}
|
122
135
|
|
123
136
|
# http body (model)
|
124
|
-
post_body = opts[:
|
137
|
+
post_body = opts[:debug_body]
|
138
|
+
|
139
|
+
# return_type
|
140
|
+
return_type = opts[:debug_return_type] || 'CacResponseGet'
|
125
141
|
|
126
|
-
|
142
|
+
# auth_names
|
143
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
127
144
|
|
128
|
-
|
129
|
-
|
145
|
+
new_options = opts.merge(
|
146
|
+
:operation => :"CACApi.get_system_cac",
|
130
147
|
:header_params => header_params,
|
131
148
|
:query_params => query_params,
|
132
149
|
:form_params => form_params,
|
133
150
|
:body => post_body,
|
134
151
|
:auth_names => auth_names,
|
135
|
-
:return_type => return_type
|
152
|
+
:return_type => return_type
|
153
|
+
)
|
136
154
|
|
155
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
137
156
|
if @api_client.config.debugging
|
138
157
|
@api_client.config.logger.debug "API called: CACApi#get_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
139
158
|
end
|
@@ -0,0 +1,96 @@
|
|
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. <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
|
+
|
6
|
+
The version of the OpenAPI document: v3.3
|
7
|
+
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module EmassClient
|
16
|
+
class CloudResourcesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Add one or many cloud resources and their scan results
|
23
|
+
# Add cloud resources and their scan results in the assets module for a system `systemId`
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param request_body [Array<Object>] Add cloud resources and their scan results
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [CloudResourcesResponsePost]
|
28
|
+
def add_cloud_resources_by_system_id(system_id, request_body, opts = {})
|
29
|
+
data, _status_code, _headers = add_cloud_resources_by_system_id_with_http_info(system_id, request_body, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add one or many cloud resources and their scan results
|
34
|
+
# Add cloud resources and their scan results in the assets module for a system `systemId`
|
35
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
36
|
+
# @param request_body [Array<Object>] Add cloud resources and their scan results
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(CloudResourcesResponsePost, Integer, Hash)>] CloudResourcesResponsePost data, response status code and response headers
|
39
|
+
def add_cloud_resources_by_system_id_with_http_info(system_id, request_body, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: CloudResourcesApi.add_cloud_resources_by_system_id ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'system_id' is set
|
44
|
+
if @api_client.config.client_side_validation && system_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'system_id' when calling CloudResourcesApi.add_cloud_resources_by_system_id"
|
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 CloudResourcesApi.add_cloud_resources_by_system_id"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/api/systems/{systemId}/cloud-resource-results'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
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
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = opts[:form_params] || {}
|
69
|
+
|
70
|
+
# http body (model)
|
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] || 'CloudResourcesResponsePost'
|
75
|
+
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"CloudResourcesApi.add_cloud_resources_by_system_id",
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
88
|
+
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: CloudResourcesApi#add_cloud_resources_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
end
|
96
|
+
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.
|
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
|
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://
|
9
|
-
|
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 CMMCAssessmentsApi
|
14
17
|
attr_accessor :api_client
|
@@ -18,7 +21,7 @@ module EmassClient
|
|
18
21
|
end
|
19
22
|
# Get CMMC assessment information
|
20
23
|
# 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)
|
24
|
+
# @param since_date [String] **Date** CMMC date (Unix date format)
|
22
25
|
# @param [Hash] opts the optional parameters
|
23
26
|
# @return [CmmcResponseGet]
|
24
27
|
def get_cmmc_assessments(since_date, opts = {})
|
@@ -28,7 +31,7 @@ module EmassClient
|
|
28
31
|
|
29
32
|
# Get CMMC assessment information
|
30
33
|
# Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only.
|
31
|
-
# @param since_date **Date** CMMC date (Unix date format)
|
34
|
+
# @param since_date [String] **Date** CMMC date (Unix date format)
|
32
35
|
# @param [Hash] opts the optional parameters
|
33
36
|
# @return [Array<(CmmcResponseGet, Integer, Hash)>] CmmcResponseGet data, response status code and response headers
|
34
37
|
def get_cmmc_assessments_with_http_info(since_date, opts = {})
|
@@ -55,19 +58,25 @@ module EmassClient
|
|
55
58
|
form_params = opts[:form_params] || {}
|
56
59
|
|
57
60
|
# http body (model)
|
58
|
-
post_body = opts[:
|
61
|
+
post_body = opts[:debug_body]
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:debug_return_type] || 'CmmcResponseGet'
|
59
65
|
|
60
|
-
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
61
68
|
|
62
|
-
|
63
|
-
|
69
|
+
new_options = opts.merge(
|
70
|
+
:operation => :"CMMCAssessmentsApi.get_cmmc_assessments",
|
64
71
|
:header_params => header_params,
|
65
72
|
:query_params => query_params,
|
66
73
|
:form_params => form_params,
|
67
74
|
:body => post_body,
|
68
75
|
:auth_names => auth_names,
|
69
|
-
:return_type => return_type
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
70
78
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
71
80
|
if @api_client.config.debugging
|
72
81
|
@api_client.config.logger.debug "API called: CMMCAssessmentsApi#get_cmmc_assessments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
82
|
end
|
@@ -0,0 +1,96 @@
|
|
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. <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
|
+
|
6
|
+
The version of the OpenAPI document: v3.3
|
7
|
+
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module EmassClient
|
16
|
+
class ContainersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Add one or many containers and their scan results
|
23
|
+
# Add containers and their scan results in the assets module for a system `systemId`.
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param request_body [Array<Object>] Add containers and their scan results
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [ContainersResponsePost]
|
28
|
+
def add_container_sans_by_system_id(system_id, request_body, opts = {})
|
29
|
+
data, _status_code, _headers = add_container_sans_by_system_id_with_http_info(system_id, request_body, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add one or many containers and their scan results
|
34
|
+
# Add containers and their scan results in the assets module for a system `systemId`.
|
35
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
36
|
+
# @param request_body [Array<Object>] Add containers and their scan results
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(ContainersResponsePost, Integer, Hash)>] ContainersResponsePost data, response status code and response headers
|
39
|
+
def add_container_sans_by_system_id_with_http_info(system_id, request_body, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: ContainersApi.add_container_sans_by_system_id ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'system_id' is set
|
44
|
+
if @api_client.config.client_side_validation && system_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'system_id' when calling ContainersApi.add_container_sans_by_system_id"
|
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 ContainersApi.add_container_sans_by_system_id"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/api/systems/{systemId}/container-scan-results'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
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
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = opts[:form_params] || {}
|
69
|
+
|
70
|
+
# http body (model)
|
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] || 'ContainersResponsePost'
|
75
|
+
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"ContainersApi.add_container_sans_by_system_id",
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
88
|
+
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: ContainersApi#add_container_sans_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|