emass_client
EmassClient - the Ruby gem for the 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.
Register External Application (that use the eMASS API)
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). Use the Registration
endpoint 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:
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v3.9
- Package version: 3.9.1
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://www.dcsa.mil/is/emass/
Installation
Build a gem
To build the Ruby code into a gem:
gem build emass_client.gemspec
Then either install the gem locally:
gem install ./emass_client-3.9.1.gem
(for development, run gem install --dev ./emass_client-3.9.1.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'emass_client', '~> 3.9.1'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'emass_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'emass_client'
# Setup authorization
EmassClient.configure do |config|
# Configure API key authorization: apiKey
config.api_key['apiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: mockType
config.api_key['mockType'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['mockType'] = 'Bearer'
# Configure API key authorization: userId
config.api_key['userId'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userId'] = 'Bearer'
end
api_instance = EmassClient::ArtifactsApi.new
system_id = 35 # Integer | **System Id**: The unique system record identifier.
zipper = File.new('/path/to/some/file') # File |
opts = {
is_bulk: true, # Boolean | **Is Bulk**: If no value is specified, the default is false, and an individual artifact file is expected. When set to true, a .zip file is expected which can contain multiple artifact files\"
is_template: true, # Boolean |
type: 'Procedure', # String |
category: 'Implementation Guidance' # String |
}
begin
#Add one or many artifacts in a system
result = api_instance.add_artifacts_by_system_id(system_id, zipper, opts)
p result
rescue EmassClient::ApiError => e
puts "Exception when calling ArtifactsApi->add_artifacts_by_system_id: #{e}"
end
Documentation for API Endpoints
All URIs are relative to http://localhost:4010
Class | Method | HTTP request | Description |
---|---|---|---|
EmassClient::ArtifactsApi | add_artifacts_by_system_id | POST /api/systems/systemId/artifacts | Add one or many artifacts in a system |
EmassClient::ArtifactsApi | delete_artifact | DELETE /api/systems/systemId/artifacts | Remove one or many artifacts in a system |
EmassClient::ArtifactsApi | get_system_artifacts | GET /api/systems/systemId/artifacts | Get one or many artifacts in a system |
EmassClient::ArtifactsApi | update_artifact_by_system_id | PUT /api/systems/systemId/artifacts | Update one or many artifacts in a system |
EmassClient::ArtifactsExportApi | get_system_artifacts_export | GET /api/systems/systemId/artifacts-export | Get the file of an artifact in a system |
EmassClient::CACApi | add_system_cac | POST /api/systems/systemId/approval/cac | Submit control to second role of CAC |
EmassClient::CACApi | get_system_cac | GET /api/systems/systemId/approval/cac | Get location of one or many controls in CAC |
EmassClient::CMMCAssessmentsApi | get_cmmc_assessments | GET /api/cmmc-assessments | Get CMMC assessment information |
EmassClient::CloudResourceResultsApi | add_cloud_resources_by_system_id | POST /api/systems/systemId/cloud-resource-results | Add one or many cloud resources and their scan results |
EmassClient::ContainerScanResultsApi | add_container_sans_by_system_id | POST /api/systems/systemId/container-scan-results | Add one or many containers and their scan results |
EmassClient::ControlsApi | get_system_controls | GET /api/systems/systemId/controls | Get control information in a system for one or many controls |
EmassClient::ControlsApi | update_control_by_system_id | PUT /api/systems/systemId/controls | Update control information in a system for one or many controls |
EmassClient::DashboardsApi | get_system_artifacts_details | GET /api/dashboards/system-artifacts-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_artifacts_summary | GET /api/dashboards/system-artifacts-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_assessment_procedures_details | GET /api/dashboards/system-assessment-procedures-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_associations_details | GET /api/dashboards/system-associations-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_control_compliance_summary | GET /api/dashboards/system-control-compliance-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_hardware_details | GET /api/dashboards/system-hardware-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_hardware_summary | GET /api/dashboards/system-hardware-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_poam_details | GET /api/dashboards/system-poam-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_poam_summary | GET /api/dashboards/system-poam-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_ports_protocols_details | GET /api/dashboards/system-ports-protocols-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_ports_protocols_summary | GET /api/dashboards/system-ports-protocols-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_privacy_summary | GET /api/dashboards/system-privacy-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_security_control_details | GET /api/dashboards/system-security-controls-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_sensor_hardware_details | GET /api/dashboards/system-sensor-hardware-details | Get dashboard information |
EmassClient::DashboardsApi | get_system_sensor_hardware_summary | GET /api/dashboards/system-sensor-hardware-summary | Get dashboard information |
EmassClient::DashboardsApi | get_system_status_details | GET /api/dashboards/system-status-details | Get dashboard information |
EmassClient::DashboardsApi | get_user_system_assignments_details | GET /api/dashboards/user-system-assignments-details | Get dashboard information |
EmassClient::DashboardsApi | get_va_omb_fsma_saop_summary | GET /api/dashboards/va-omb-fisma-saop-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_a2_summary | GET /api/dashboards/va-system-a2-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_aa_summary | GET /api/dashboards/va-system-aa-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_fisma_invetory_crypto_summary | GET /api/dashboards/va-system-fisma-inventory-crypto-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_fisma_invetory_summary | GET /api/dashboards/va-system-fisma-inventory-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_pl109_reporting_summary | GET /api/dashboards/va-system-pl-109-reporting-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_threat_architecture_details | GET /api/dashboards/va-system-threat-architecture-details | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_threat_risk_summary | GET /api/dashboards/va-system-threat-risks-summary | Get dashboard information |
EmassClient::DashboardsApi | get_va_system_threat_source_details | GET /api/dashboards/va-system-threat-sources-details | Get dashboard information |
EmassClient::MilestonesApi | add_milestone_by_system_id_and_poam_id | POST /api/systems/systemId/poams/poamId/milestones | Add milestones to one or many POA&M items in a system |
EmassClient::MilestonesApi | delete_milestone | DELETE /api/systems/systemId/poams/poamId/milestones | Remove milestones in a system for one or many POA&M items |
EmassClient::MilestonesApi | get_system_milestones_by_poam_id | GET /api/systems/systemId/poams/poamId/milestones | Get milestones in one or many POA&M items in a system |
EmassClient::MilestonesApi | get_system_milestones_by_poam_id_and_milestone_id | GET /api/systems/systemId/poams/poamId/milestones/milestoneId | Get milestone by ID in POA&M item in a system |
EmassClient::MilestonesApi | update_milestone_by_system_id_and_poam_id | PUT /api/systems/systemId/poams/poamId/milestones | Update one or many POA&M items in a system |
EmassClient::PACApi | add_system_pac | POST /api/systems/systemId/approval/pac | Submit system package for review |
EmassClient::PACApi | get_system_pac | GET /api/systems/systemId/approval/pac | Get location of system package in PAC |
EmassClient::POAMApi | add_poam_by_system_id | POST /api/systems/systemId/poams | Add one or many POA&M items in a system |
EmassClient::POAMApi | delete_poam | DELETE /api/systems/systemId/poams | Remove one or many POA&M items in a system |
EmassClient::POAMApi | get_system_poams | GET /api/systems/systemId/poams | Get one or many POA&M items in a system |
EmassClient::POAMApi | get_system_poams_by_poam_id | GET /api/systems/systemId/poams/poamId | Get POA&M item by ID in a system |
EmassClient::POAMApi | update_poam_by_system_id | PUT /api/systems/systemId/poams | Update one or many POA&M items in a system |
EmassClient::RegistrationApi | register_user | POST /api/api-key | Register user certificate and obtain an API key |
EmassClient::StaticCodeScansApi | add_static_code_scans_by_system_id | POST /api/systems/systemId/static-code-scans | Upload static code scans or Clear static code scans |
EmassClient::SystemRolesApi | get_system_roles | GET /api/system-roles | Get available roles |
EmassClient::SystemRolesApi | get_system_roles_by_category_id | GET /api/system-roles/roleCategory | Get system roles |
EmassClient::SystemsApi | get_system | GET /api/systems/systemId | Get system information for a specific system |
EmassClient::SystemsApi | get_systems | GET /api/systems | Get system information |
EmassClient::TestApi | test_connection | GET /api | Test connection to the API |
EmassClient::TestResultsApi | add_test_results_by_system_id | POST /api/systems/systemId/test-results | Add one or many test results in a system |
EmassClient::TestResultsApi | get_system_test_results | GET /api/systems/systemId/test-results | Get one or many test results in a system |
EmassClient::WorkflowDefinitionsApi | get_workflow_definitions | GET /api/workflows/definitions | Get workflow definitions in a site |
EmassClient::WorkflowInstancesApi | get_system_workflow_instances | GET /api/workflows/instances | Get workflow instances in a site |
EmassClient::WorkflowInstancesApi | get_system_workflow_instances_by_workflow_instance_id | GET /api/workflows/instances/workflowInstanceId | Get workflow instance by ID |
Documentation for Models
- EmassClient::ArtifactsGet
- EmassClient::ArtifactsRequestDeleteBodyInner
- EmassClient::ArtifactsResponseDel
- EmassClient::ArtifactsResponseDelDataInner
- EmassClient::ArtifactsResponseGet
- EmassClient::ArtifactsResponsePutPost
- EmassClient::ArtifactsResponsePutPostDataInner
- EmassClient::CacGet
- EmassClient::CacResponseGet
- EmassClient::CacResponsePost
- EmassClient::CacResponsePostDataInner
- EmassClient::CloudResourcesPost
- EmassClient::CloudResourcesResponsePost
- EmassClient::CmmcGet
- EmassClient::CmmcResponseGet
- EmassClient::ConnectivityCcsd
- EmassClient::ContainersResourcesPost
- EmassClient::ContainersResponsePost
- EmassClient::ControlsGet
- EmassClient::ControlsPut
- EmassClient::ControlsResponseGet
- EmassClient::ControlsResponsePut
- EmassClient::DefinitionTransitions
- EmassClient::InstancesTransitions
- EmassClient::MilestoneResponseGet
- EmassClient::MilestoneResponseGetMilestone
- EmassClient::MilestoneResponsePost
- EmassClient::MilestoneResponsePut
- EmassClient::MilestonesGet
- EmassClient::MilestonesPutPostDelete
- EmassClient::MilestonesRequestDeleteBodyInner
- EmassClient::MilestonesRequiredPost
- EmassClient::MilestonesRequiredPut
- EmassClient::PacGet
- EmassClient::PacPost
- EmassClient::PacResponseGet
- EmassClient::PacResponsePost
- EmassClient::PoamGet
- EmassClient::PoamPostPutDel
- EmassClient::PoamRequestDeleteBodyInner
- EmassClient::PoamResponseDelete
- EmassClient::PoamResponseGetPoams
- EmassClient::PoamResponseGetSystems
- EmassClient::PoamResponsePost
- EmassClient::PoamResponsePut
- EmassClient::Register
- EmassClient::RegisterData
- EmassClient::RegisterUserRequestPostBody
- EmassClient::Response200
- EmassClient::Response201
- EmassClient::Response201Meta
- EmassClient::Response400
- EmassClient::Response400Meta
- EmassClient::Response401
- EmassClient::Response401Meta
- EmassClient::Response403
- EmassClient::Response403Meta
- EmassClient::Response404
- EmassClient::Response405
- EmassClient::Response405Meta
- EmassClient::Response411
- EmassClient::Response411Meta
- EmassClient::Response490
- EmassClient::Response490Meta
- EmassClient::Response500
- EmassClient::Response500Meta
- EmassClient::RoleCategory
- EmassClient::Roles
- EmassClient::Ssps
- EmassClient::Stage
- EmassClient::StaticCodeApplication
- EmassClient::StaticCodePost
- EmassClient::StaticCodeRequestPostBody
- EmassClient::StaticCodeRequestPostBodyApplication
- EmassClient::StaticCodeResponsePost
- EmassClient::Success200Response
- EmassClient::Success200ResponseDataInner
- EmassClient::SystemResponse
- EmassClient::SystemRolesCategoryResponse
- EmassClient::SystemRolesResponse
- EmassClient::SystemRolesResponseDataInner
- EmassClient::Systems
- EmassClient::SystemsResponse
- EmassClient::Test
- EmassClient::TestData
- EmassClient::TestResultsGet
- EmassClient::TestResultsPost
- EmassClient::TestResultsResponseGet
- EmassClient::TestResultsResponsePost
- EmassClient::Users
- EmassClient::WorkflowDefinitionGet
- EmassClient::WorkflowDefinitionResponseGet
- EmassClient::WorkflowInstanceGet
- EmassClient::WorkflowInstanceResponseGet
- EmassClient::WorkflowInstancesGet
- EmassClient::WorkflowInstancesResponseGet
- EmassClient::WorkflowInstancesResponseGetPagination
Documentation for Authorization
Authentication schemes defined for the API:
apiKey
- Type: API key
- API key parameter name: api-key
- Location: HTTP header
userId
- Type: API key
- API key parameter name: user-uid
- Location: HTTP header
mockType
- Type: API key
- API key parameter name: Prefer
- Location: HTTP header