emass_client 1.0.3 → 1.0.5
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 +18 -9
- 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
data/Rakefile
CHANGED
@@ -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.0-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
13
|
+
require 'cgi'
|
14
|
+
|
12
15
|
module EmassClient
|
13
16
|
class ArtifactsApi
|
14
17
|
attr_accessor :api_client
|
@@ -18,61 +21,49 @@ module EmassClient
|
|
18
21
|
end
|
19
22
|
# Add one or many artifacts in a system
|
20
23
|
# <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
|
22
|
-
# @param
|
23
|
-
# @param category
|
24
|
-
# @param zipper
|
25
|
-
# @param system_id **System Id**: The unique system record identifier.
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param zipper [File]
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [Boolean] :is_template
|
28
|
+
# @option opts [String] :type
|
29
|
+
# @option opts [String] :category
|
27
30
|
# @return [ArtifactsResponsePutPost]
|
28
|
-
def add_artifacts_by_system_id(
|
29
|
-
data, _status_code, _headers = add_artifacts_by_system_id_with_http_info(
|
31
|
+
def add_artifacts_by_system_id(system_id, zipper, opts = {})
|
32
|
+
data, _status_code, _headers = add_artifacts_by_system_id_with_http_info(system_id, zipper, opts)
|
30
33
|
data
|
31
34
|
end
|
32
35
|
|
33
36
|
# Add one or many artifacts in a system
|
34
37
|
# <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.
|
35
|
-
# @param
|
36
|
-
# @param
|
37
|
-
# @param category
|
38
|
-
# @param zipper
|
39
|
-
# @param system_id **System Id**: The unique system record identifier.
|
38
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
39
|
+
# @param zipper [File]
|
40
40
|
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [Boolean] :is_template
|
42
|
+
# @option opts [String] :type
|
43
|
+
# @option opts [String] :category
|
41
44
|
# @return [Array<(ArtifactsResponsePutPost, Integer, Hash)>] ArtifactsResponsePutPost data, response status code and response headers
|
42
|
-
def add_artifacts_by_system_id_with_http_info(
|
45
|
+
def add_artifacts_by_system_id_with_http_info(system_id, zipper, opts = {})
|
43
46
|
if @api_client.config.debugging
|
44
47
|
@api_client.config.logger.debug 'Calling API: ArtifactsApi.add_artifacts_by_system_id ...'
|
45
48
|
end
|
46
|
-
# verify the required parameter '
|
47
|
-
if @api_client.config.client_side_validation &&
|
48
|
-
fail ArgumentError, "Missing the required parameter '
|
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"
|
49
|
+
# verify the required parameter 'system_id' is set
|
50
|
+
if @api_client.config.client_side_validation && system_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.add_artifacts_by_system_id"
|
65
52
|
end
|
66
53
|
# verify the required parameter 'zipper' is set
|
67
54
|
if @api_client.config.client_side_validation && zipper.nil?
|
68
55
|
fail ArgumentError, "Missing the required parameter 'zipper' when calling ArtifactsApi.add_artifacts_by_system_id"
|
69
56
|
end
|
70
|
-
|
71
|
-
if @api_client.config.client_side_validation &&
|
72
|
-
fail ArgumentError, "
|
57
|
+
allowable_values = ["Procedure", "Diagram", "Policy", "Labor", "Document", "Image", "Other", "Scan Result", "Auditor Report", "unknown_default_open_api"]
|
58
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
|
59
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
60
|
+
end
|
61
|
+
allowable_values = ["Implementation Guidance", "Evidence", "unknown_default_open_api"]
|
62
|
+
if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category'])
|
63
|
+
fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}"
|
73
64
|
end
|
74
65
|
# resource path
|
75
|
-
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
|
66
|
+
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
76
67
|
|
77
68
|
# query parameters
|
78
69
|
query_params = opts[:query_params] || {}
|
@@ -82,65 +73,75 @@ module EmassClient
|
|
82
73
|
# HTTP header 'Accept' (if needed)
|
83
74
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
84
75
|
# HTTP header 'Content-Type'
|
85
|
-
|
76
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
77
|
+
if !content_type.nil?
|
78
|
+
header_params['Content-Type'] = content_type
|
79
|
+
end
|
86
80
|
|
87
81
|
# form parameters
|
88
82
|
form_params = opts[:form_params] || {}
|
89
|
-
form_params['isTemplate'] = is_template
|
90
|
-
form_params['type'] = type
|
91
|
-
form_params['category'] = category
|
92
83
|
form_params['Zipper'] = zipper
|
84
|
+
form_params['isTemplate'] = opts[:'is_template'] if !opts[:'is_template'].nil?
|
85
|
+
form_params['type'] = opts[:'type'] if !opts[:'type'].nil?
|
86
|
+
form_params['category'] = opts[:'category'] if !opts[:'category'].nil?
|
93
87
|
|
94
88
|
# http body (model)
|
95
|
-
post_body = opts[:
|
89
|
+
post_body = opts[:debug_body]
|
96
90
|
|
97
|
-
|
91
|
+
# return_type
|
92
|
+
return_type = opts[:debug_return_type] || 'ArtifactsResponsePutPost'
|
98
93
|
|
99
|
-
|
100
|
-
|
94
|
+
# auth_names
|
95
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
96
|
+
|
97
|
+
new_options = opts.merge(
|
98
|
+
:operation => :"ArtifactsApi.add_artifacts_by_system_id",
|
101
99
|
:header_params => header_params,
|
102
100
|
:query_params => query_params,
|
103
101
|
:form_params => form_params,
|
104
102
|
:body => post_body,
|
105
103
|
:auth_names => auth_names,
|
106
|
-
:return_type => return_type
|
104
|
+
:return_type => return_type
|
105
|
+
)
|
107
106
|
|
107
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
108
108
|
if @api_client.config.debugging
|
109
109
|
@api_client.config.logger.debug "API called: ArtifactsApi#add_artifacts_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
110
110
|
end
|
111
111
|
return data, status_code, headers
|
112
112
|
end
|
113
|
+
|
113
114
|
# Remove one or many artifacts in a system
|
114
115
|
# 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
|
116
|
-
# @param
|
116
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
117
|
+
# @param artifacts_request_delete_body_inner [Array<ArtifactsRequestDeleteBodyInner>] Delete artifact files for the given System Id
|
117
118
|
# @param [Hash] opts the optional parameters
|
118
119
|
# @return [ArtifactsResponseDel]
|
119
|
-
def delete_artifact(
|
120
|
-
data, _status_code, _headers = delete_artifact_with_http_info(
|
120
|
+
def delete_artifact(system_id, artifacts_request_delete_body_inner, opts = {})
|
121
|
+
data, _status_code, _headers = delete_artifact_with_http_info(system_id, artifacts_request_delete_body_inner, opts)
|
121
122
|
data
|
122
123
|
end
|
123
124
|
|
124
125
|
# Remove one or many artifacts in a system
|
125
126
|
# 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
|
126
|
-
# @param
|
127
|
-
# @param
|
127
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
128
|
+
# @param artifacts_request_delete_body_inner [Array<ArtifactsRequestDeleteBodyInner>] Delete artifact files for the given System Id
|
128
129
|
# @param [Hash] opts the optional parameters
|
129
130
|
# @return [Array<(ArtifactsResponseDel, Integer, Hash)>] ArtifactsResponseDel data, response status code and response headers
|
130
|
-
def delete_artifact_with_http_info(
|
131
|
+
def delete_artifact_with_http_info(system_id, artifacts_request_delete_body_inner, opts = {})
|
131
132
|
if @api_client.config.debugging
|
132
133
|
@api_client.config.logger.debug 'Calling API: ArtifactsApi.delete_artifact ...'
|
133
134
|
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
135
|
# verify the required parameter 'system_id' is set
|
139
136
|
if @api_client.config.client_side_validation && system_id.nil?
|
140
137
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.delete_artifact"
|
141
138
|
end
|
139
|
+
# verify the required parameter 'artifacts_request_delete_body_inner' is set
|
140
|
+
if @api_client.config.client_side_validation && artifacts_request_delete_body_inner.nil?
|
141
|
+
fail ArgumentError, "Missing the required parameter 'artifacts_request_delete_body_inner' when calling ArtifactsApi.delete_artifact"
|
142
|
+
end
|
142
143
|
# resource path
|
143
|
-
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
|
144
|
+
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
144
145
|
|
145
146
|
# query parameters
|
146
147
|
query_params = opts[:query_params] || {}
|
@@ -150,38 +151,48 @@ module EmassClient
|
|
150
151
|
# HTTP header 'Accept' (if needed)
|
151
152
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
152
153
|
# HTTP header 'Content-Type'
|
153
|
-
|
154
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
155
|
+
if !content_type.nil?
|
156
|
+
header_params['Content-Type'] = content_type
|
157
|
+
end
|
154
158
|
|
155
159
|
# form parameters
|
156
160
|
form_params = opts[:form_params] || {}
|
157
161
|
|
158
162
|
# http body (model)
|
159
|
-
post_body = opts[:
|
163
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(artifacts_request_delete_body_inner)
|
164
|
+
|
165
|
+
# return_type
|
166
|
+
return_type = opts[:debug_return_type] || 'ArtifactsResponseDel'
|
160
167
|
|
161
|
-
|
168
|
+
# auth_names
|
169
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
162
170
|
|
163
|
-
|
164
|
-
|
171
|
+
new_options = opts.merge(
|
172
|
+
:operation => :"ArtifactsApi.delete_artifact",
|
165
173
|
:header_params => header_params,
|
166
174
|
:query_params => query_params,
|
167
175
|
:form_params => form_params,
|
168
176
|
:body => post_body,
|
169
177
|
:auth_names => auth_names,
|
170
|
-
:return_type => return_type
|
178
|
+
:return_type => return_type
|
179
|
+
)
|
171
180
|
|
181
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
172
182
|
if @api_client.config.debugging
|
173
183
|
@api_client.config.logger.debug "API called: ArtifactsApi#delete_artifact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
174
184
|
end
|
175
185
|
return data, status_code, headers
|
176
186
|
end
|
187
|
+
|
177
188
|
# Get one or many artifacts in a system
|
178
189
|
# Returns selected artifacts matching parameters to include the file name containing the artifacts.
|
179
|
-
# @param system_id **System Id**: The unique system record identifier.
|
190
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
180
191
|
# @param [Hash] opts the optional parameters
|
181
192
|
# @option opts [String] :filename **File Name**: The file name (to include file-extension).
|
182
193
|
# @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 [
|
194
|
+
# @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single or comma separated).
|
195
|
+
# @option opts [Boolean] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
|
185
196
|
# @return [ArtifactsResponseGet]
|
186
197
|
def get_system_artifacts(system_id, opts = {})
|
187
198
|
data, _status_code, _headers = get_system_artifacts_with_http_info(system_id, opts)
|
@@ -190,12 +201,12 @@ module EmassClient
|
|
190
201
|
|
191
202
|
# Get one or many artifacts in a system
|
192
203
|
# Returns selected artifacts matching parameters to include the file name containing the artifacts.
|
193
|
-
# @param system_id **System Id**: The unique system record identifier.
|
204
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
194
205
|
# @param [Hash] opts the optional parameters
|
195
206
|
# @option opts [String] :filename **File Name**: The file name (to include file-extension).
|
196
207
|
# @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 [
|
208
|
+
# @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single or comma separated).
|
209
|
+
# @option opts [Boolean] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
|
199
210
|
# @return [Array<(ArtifactsResponseGet, Integer, Hash)>] ArtifactsResponseGet data, response status code and response headers
|
200
211
|
def get_system_artifacts_with_http_info(system_id, opts = {})
|
201
212
|
if @api_client.config.debugging
|
@@ -206,7 +217,7 @@ module EmassClient
|
|
206
217
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.get_system_artifacts"
|
207
218
|
end
|
208
219
|
# resource path
|
209
|
-
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
|
220
|
+
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
210
221
|
|
211
222
|
# query parameters
|
212
223
|
query_params = opts[:query_params] || {}
|
@@ -224,55 +235,62 @@ module EmassClient
|
|
224
235
|
form_params = opts[:form_params] || {}
|
225
236
|
|
226
237
|
# http body (model)
|
227
|
-
post_body = opts[:
|
238
|
+
post_body = opts[:debug_body]
|
228
239
|
|
229
|
-
|
240
|
+
# return_type
|
241
|
+
return_type = opts[:debug_return_type] || 'ArtifactsResponseGet'
|
230
242
|
|
231
|
-
|
232
|
-
|
243
|
+
# auth_names
|
244
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
245
|
+
|
246
|
+
new_options = opts.merge(
|
247
|
+
:operation => :"ArtifactsApi.get_system_artifacts",
|
233
248
|
:header_params => header_params,
|
234
249
|
:query_params => query_params,
|
235
250
|
:form_params => form_params,
|
236
251
|
:body => post_body,
|
237
252
|
:auth_names => auth_names,
|
238
|
-
:return_type => return_type
|
253
|
+
:return_type => return_type
|
254
|
+
)
|
239
255
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
240
257
|
if @api_client.config.debugging
|
241
258
|
@api_client.config.logger.debug "API called: ArtifactsApi#get_system_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
242
259
|
end
|
243
260
|
return data, status_code, headers
|
244
261
|
end
|
262
|
+
|
245
263
|
# Update one or many artifacts in a system
|
246
264
|
# Updates an artifact for given `systemId` path parameter<br><br> **Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category`
|
247
|
-
# @param
|
248
|
-
# @param
|
265
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
266
|
+
# @param request_body [Array<Object>] See `information` above for additional instructions
|
249
267
|
# @param [Hash] opts the optional parameters
|
250
268
|
# @return [ArtifactsResponsePutPost]
|
251
|
-
def update_artifact_by_system_id(
|
252
|
-
data, _status_code, _headers = update_artifact_by_system_id_with_http_info(
|
269
|
+
def update_artifact_by_system_id(system_id, request_body, opts = {})
|
270
|
+
data, _status_code, _headers = update_artifact_by_system_id_with_http_info(system_id, request_body, opts)
|
253
271
|
data
|
254
272
|
end
|
255
273
|
|
256
274
|
# Update one or many artifacts in a system
|
257
275
|
# Updates an artifact for given `systemId` path parameter<br><br> **Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category`
|
258
|
-
# @param
|
259
|
-
# @param
|
276
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
277
|
+
# @param request_body [Array<Object>] See `information` above for additional instructions
|
260
278
|
# @param [Hash] opts the optional parameters
|
261
279
|
# @return [Array<(ArtifactsResponsePutPost, Integer, Hash)>] ArtifactsResponsePutPost data, response status code and response headers
|
262
|
-
def update_artifact_by_system_id_with_http_info(
|
280
|
+
def update_artifact_by_system_id_with_http_info(system_id, request_body, opts = {})
|
263
281
|
if @api_client.config.debugging
|
264
282
|
@api_client.config.logger.debug 'Calling API: ArtifactsApi.update_artifact_by_system_id ...'
|
265
283
|
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
284
|
# verify the required parameter 'system_id' is set
|
271
285
|
if @api_client.config.client_side_validation && system_id.nil?
|
272
286
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.update_artifact_by_system_id"
|
273
287
|
end
|
288
|
+
# verify the required parameter 'request_body' is set
|
289
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
290
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling ArtifactsApi.update_artifact_by_system_id"
|
291
|
+
end
|
274
292
|
# resource path
|
275
|
-
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s)
|
293
|
+
local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
276
294
|
|
277
295
|
# query parameters
|
278
296
|
query_params = opts[:query_params] || {}
|
@@ -282,25 +300,34 @@ module EmassClient
|
|
282
300
|
# HTTP header 'Accept' (if needed)
|
283
301
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
284
302
|
# HTTP header 'Content-Type'
|
285
|
-
|
303
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
304
|
+
if !content_type.nil?
|
305
|
+
header_params['Content-Type'] = content_type
|
306
|
+
end
|
286
307
|
|
287
308
|
# form parameters
|
288
309
|
form_params = opts[:form_params] || {}
|
289
310
|
|
290
311
|
# http body (model)
|
291
|
-
post_body = opts[:
|
312
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
313
|
+
|
314
|
+
# return_type
|
315
|
+
return_type = opts[:debug_return_type] || 'ArtifactsResponsePutPost'
|
292
316
|
|
293
|
-
|
317
|
+
# auth_names
|
318
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
294
319
|
|
295
|
-
|
296
|
-
|
320
|
+
new_options = opts.merge(
|
321
|
+
:operation => :"ArtifactsApi.update_artifact_by_system_id",
|
297
322
|
:header_params => header_params,
|
298
323
|
:query_params => query_params,
|
299
324
|
:form_params => form_params,
|
300
325
|
:body => post_body,
|
301
326
|
:auth_names => auth_names,
|
302
|
-
:return_type => return_type
|
327
|
+
:return_type => return_type
|
328
|
+
)
|
303
329
|
|
330
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
304
331
|
if @api_client.config.debugging
|
305
332
|
@api_client.config.logger.debug "API called: ArtifactsApi#update_artifact_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
306
333
|
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.0-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
13
|
+
require 'cgi'
|
14
|
+
|
12
15
|
module EmassClient
|
13
16
|
class ArtifactsExportApi
|
14
17
|
attr_accessor :api_client
|
@@ -18,11 +21,11 @@ module EmassClient
|
|
18
21
|
end
|
19
22
|
# Get the file of an artifact in a system
|
20
23
|
# <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).
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param filename [String] **File Name**: The file name (to include file-extension).
|
23
26
|
# @param [Hash] opts the optional parameters
|
24
|
-
# @option opts [
|
25
|
-
# @return [
|
27
|
+
# @option opts [Boolean] :compress **Compress File**: Determines if returned file is compressed. (default to true)
|
28
|
+
# @return [File]
|
26
29
|
def get_system_artifacts_export(system_id, filename, opts = {})
|
27
30
|
data, _status_code, _headers = get_system_artifacts_export_with_http_info(system_id, filename, opts)
|
28
31
|
data
|
@@ -30,11 +33,11 @@ module EmassClient
|
|
30
33
|
|
31
34
|
# Get the file of an artifact in a system
|
32
35
|
# <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.
|
33
|
-
# @param system_id **System Id**: The unique system record identifier.
|
34
|
-
# @param filename **File Name**: The file name (to include file-extension).
|
36
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
37
|
+
# @param filename [String] **File Name**: The file name (to include file-extension).
|
35
38
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [
|
37
|
-
# @return [Array<(
|
39
|
+
# @option opts [Boolean] :compress **Compress File**: Determines if returned file is compressed. (default to true)
|
40
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
38
41
|
def get_system_artifacts_export_with_http_info(system_id, filename, opts = {})
|
39
42
|
if @api_client.config.debugging
|
40
43
|
@api_client.config.logger.debug 'Calling API: ArtifactsExportApi.get_system_artifacts_export ...'
|
@@ -48,7 +51,7 @@ module EmassClient
|
|
48
51
|
fail ArgumentError, "Missing the required parameter 'filename' when calling ArtifactsExportApi.get_system_artifacts_export"
|
49
52
|
end
|
50
53
|
# resource path
|
51
|
-
local_var_path = '/api/systems/{systemId}/artifacts-export'.sub('{' + 'systemId' + '}', system_id.to_s)
|
54
|
+
local_var_path = '/api/systems/{systemId}/artifacts-export'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
52
55
|
|
53
56
|
# query parameters
|
54
57
|
query_params = opts[:query_params] || {}
|
@@ -58,25 +61,31 @@ module EmassClient
|
|
58
61
|
# header parameters
|
59
62
|
header_params = opts[:header_params] || {}
|
60
63
|
# HTTP header 'Accept' (if needed)
|
61
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json'])
|
62
65
|
|
63
66
|
# form parameters
|
64
67
|
form_params = opts[:form_params] || {}
|
65
68
|
|
66
69
|
# http body (model)
|
67
|
-
post_body = opts[:
|
70
|
+
post_body = opts[:debug_body]
|
71
|
+
|
72
|
+
# return_type
|
73
|
+
return_type = opts[:debug_return_type] || 'File'
|
68
74
|
|
69
|
-
|
75
|
+
# auth_names
|
76
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
70
77
|
|
71
|
-
|
72
|
-
|
78
|
+
new_options = opts.merge(
|
79
|
+
:operation => :"ArtifactsExportApi.get_system_artifacts_export",
|
73
80
|
:header_params => header_params,
|
74
81
|
:query_params => query_params,
|
75
82
|
:form_params => form_params,
|
76
83
|
:body => post_body,
|
77
84
|
:auth_names => auth_names,
|
78
|
-
:return_type => return_type
|
85
|
+
:return_type => return_type
|
86
|
+
)
|
79
87
|
|
88
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
80
89
|
if @api_client.config.debugging
|
81
90
|
@api_client.config.logger.debug "API called: ArtifactsExportApi#get_system_artifacts_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
91
|
end
|