=begin #Enterprise Mission Assurance Support Service (eMASS) #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.

Register CLI
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.

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.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
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: OpenAPI spec version: v3.2 Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 3.0.26 =end require 'spec_helper' require 'json' # Unit tests for SwaggerClient::ArtifactsApi # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate describe 'ArtifactsApi' do before do # run before each test @instance = SwaggerClient::ArtifactsApi.new end after do # run after each test end describe 'test an instance of ArtifactsApi' do it 'should create an instance of ArtifactsApi' do expect(@instance).to be_instance_of(SwaggerClient::ArtifactsApi) end end # unit tests for add_artifacts_by_system_id # Add one or many artifacts in a system # <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. # @param is_template # @param type # @param category # @param zipper # @param system_id **System Id**: The unique system record identifier. # @param [Hash] opts the optional parameters # @return [ArtifactsResponsePutPost] describe 'add_artifacts_by_system_id test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_artifact # Remove one or many artifacts in a system # 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 # @param body See notes above for additional information # @param system_id **System Id**: The unique system record identifier. # @param [Hash] opts the optional parameters # @return [ArtifactsResponseDel] describe 'delete_artifact test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_system_artifacts # Get one or many artifacts in a system # Returns selected artifacts matching parameters to include the file name containing the artifacts. # @param system_id **System Id**: The unique system record identifier. # @param [Hash] opts the optional parameters # @option opts [String] :filename **File Name**: The file name (to include file-extension). # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. # @return [ArtifactsResponseGet] describe 'get_system_artifacts test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_artifact_by_system_id # Update one or many artifacts in a system # Updates an artifact for given `systemId` path parameter<br><br> **Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category` # @param body See `information` above for additional instructions # @param system_id **System Id**: The unique system record identifier. # @param [Hash] opts the optional parameters # @return [ArtifactsResponsePutPost] describe 'update_artifact_by_system_id test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end