eMASS API

Overview

eMASS API integration - Bidirectional POA&M and Control sync, artifacts, and milestones.

Configuration

This command reads the following keys from init.yaml. Any of them can also be supplied as an environment variable of the same name. See CLI Configuration File for the full reference.

  • domain
  • token
  • userId

Commands

CommandDescription
regscale emass_api add_milestoneAdd a single milestone to a POA&M. Due date should be in YYYY-MM-DD format (e.g., 2025-03-15).
regscale emass_api add_milestones_bulkAdd multiple milestones to a POA&M from JSON input. JSON format: [{"description": "...", "scheduledCompletionDate": 1234567890000}, ...] scheduledCompletionDate should be Unix timestamp in millisecon
regscale emass_api authenticateConfigure eMASS authentication credentials. Sets environment variables for eMASS API access.
regscale emass_api delete_milestonesDelete one or more milestones from a POA&M. Milestone IDs should be comma-separated (e.g., "123,456,789").
regscale emass_api get_system_infoGet detailed information about an eMASS system. Shows system metadata, authorization status, and contact information.
regscale emass_api import_xmlImport an eMASS XML export file into RegScale. This command implements AC7 and AC8: - Parses valid eMASS XML exports - Maps XML fields to RegScale models - Creates SSP, controls, POA&Ms, artifacts, a
regscale emass_api list_artifactsList all artifacts for an eMASS system. Displays artifact ID, filename, type, and associated control.
regscale emass_api list_milestonesList all milestones for a POA&M. Displays milestone ID, description, scheduled completion date, and review status.
regscale emass_api list_systemsList all eMASS systems accessible to the user. Displays system ID, name, and authorization status.
regscale emass_api pull_poamsPull POA&Ms from eMASS to RegScale format. Retrieves POA&Ms and converts to RegScale Case format.
regscale emass_api push_controlPush RegScale Control Implementation to eMASS as Test Result. Maps Control Implementation fields to eMASS Test Result format.
regscale emass_api push_poamPush RegScale Case to eMASS as POA&M. Creates new POA&M or updates existing (idempotent operation).
regscale emass_api registerExchange a CAC certificate for an eMASS API key. Connects to the eMASS server using your CAC (via PKCS#11), calls POST /api/api-key, and writes the returned key to init.yaml.
regscale emass_api show_configDisplay current eMASS integration configuration. Shows all configuration variables and their current values.
regscale emass_api show_field_mappingsDisplay summary of field mappings between RegScale and eMASS. Shows count of mapped fields per category.
regscale emass_api sync_controlsSync Control Implementations from RegScale SSP to eMASS Test Results. Pushes all controls in SSP to eMASS as Test Results.
regscale emass_api sync_hw_baselineSync the hardware baseline from eMASS to RegScale (eMASS-authoritative, net-new push-back). Pulls hardware assets from eMASS, deconflicts with existing RegScale Assets, creates/updates Assets in RegS
regscale emass_api sync_poamsBidirectional POA&M sync between RegScale and eMASS. Pushes RegScale Cases and pulls eMASS POA&Ms.
regscale emass_api sync_sw_baselineSync the software baseline from eMASS to RegScale (eMASS-authoritative, net-new push-back). Pulls software assets from eMASS, deconflicts with existing RegScale Assets, creates/updates Assets in RegS
regscale emass_api sync_systemFull bidirectional sync between a RegScale SSP and its linked eMASS system. Reads the eMASS system ID from SecurityPlan.emassId, then syncs hardware assets, software assets, controls, POAMs, mileston
regscale emass_api test_connectionTest connection to eMASS API. Validates credentials and verifies API accessibility.
regscale emass_api update_milestoneUpdate an existing milestone. Due date should be in YYYY-MM-DD format (e.g., 2025-03-15).
regscale emass_api upload_artifactUpload single artifact/evidence file to eMASS system. Associates artifact with specified system and optionally with a control.
regscale emass_api upload_artifacts_bulkUpload multiple artifacts from directory to eMASS system. Processes all files matching the pattern in the specified directory. Uses automatic retry logic and chunking for large batches.

regscale emass_api add_milestone

Add a single milestone to a POA&M.

Due date should be in YYYY-MM-DD format (e.g., 2025-03-15).

regscale emass_api add_milestone [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--poam-idintegerYeseMASS POA&M ID
--descriptiontextYesMilestone description
--due-datetextYesDue date (YYYY-MM-DD format)

regscale emass_api add_milestones_bulk

Add multiple milestones to a POA&M from JSON input.

JSON format: [{"description": "...", "scheduledCompletionDate": 1234567890000}, ...] scheduledCompletionDate should be Unix timestamp in milliseconds.

regscale emass_api add_milestones_bulk [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--poam-idintegerYeseMASS POA&M ID
--milestones-jsontextYesJSON string with milestone array (description, scheduledCompletionDate)

regscale emass_api authenticate

Configure eMASS authentication credentials.

Sets environment variables for eMASS API access.

regscale emass_api authenticate [OPTIONS]
FlagTypeRequiredDefaultDescription
--api-keytextYeseMASS API key to configure
--base-urltextYeseMASS API base URL
--user-uidtextNoUser UID for eMASS operations

regscale emass_api delete_milestones

Delete one or more milestones from a POA&M.

Milestone IDs should be comma-separated (e.g., "123,456,789").

regscale emass_api delete_milestones [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--poam-idintegerYeseMASS POA&M ID
--milestone-idstextYesComma-separated milestone IDs to delete

regscale emass_api get_system_info

Get detailed information about an eMASS system.

Shows system metadata, authorization status, and contact information.

regscale emass_api get_system_info [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID

regscale emass_api import_xml

Import an eMASS XML export file into RegScale.

This command implements AC7 and AC8: - Parses valid eMASS XML exports - Maps XML fields to RegScale models - Creates SSP, controls, POA&Ms, artifacts, and milestones - Generates comprehensive import summary

Example: regscale emass_api import_xml --xml-file system_export.xml --dry-run

regscale emass_api import_xml [OPTIONS]
FlagTypeRequiredDefaultDescription
--xml-filepathYesPath to eMASS XML export file
--catalog-idintegerNoRegScale Catalog ID to map eMASS controls to (required to import controls in live mode)
--dry-runbooleanNofalseValidate XML without creating records
--create-custom-fieldsbooleanNofalseCreate custom fields for unmapped XML elements
--output-formatchoiceNosummaryChoices: summary, detailed, json

regscale emass_api list_artifacts

List all artifacts for an eMASS system.

Displays artifact ID, filename, type, and associated control.

regscale emass_api list_artifacts [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--output-formatchoiceNotableChoices: table, json

regscale emass_api list_milestones

List all milestones for a POA&M.

Displays milestone ID, description, scheduled completion date, and review status.

regscale emass_api list_milestones [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--poam-idintegerYeseMASS POA&M ID
--output-formatchoiceNotableChoices: table, json

regscale emass_api list_systems

List all eMASS systems accessible to the user.

Displays system ID, name, and authorization status.

regscale emass_api list_systems [OPTIONS]
FlagTypeRequiredDefaultDescription
--output-formatchoiceNotableChoices: table, json

regscale emass_api pull_poams

Pull POA&Ms from eMASS to RegScale format.

Retrieves POA&Ms and converts to RegScale Case format.

regscale emass_api pull_poams [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--control-acronymstextNoComma-separated control acronyms to filter (e.g., 'AC-1,AC-2')
--outputpathNoOutput file for pulled POA&Ms (JSON)

regscale emass_api push_control

Push RegScale Control Implementation to eMASS as Test Result.

Maps Control Implementation fields to eMASS Test Result format.

regscale emass_api push_control [OPTIONS]
FlagTypeRequiredDefaultDescription
--control-impl-idintegerYesRegScale Control Implementation ID
--system-idintegerYeseMASS system ID

regscale emass_api push_poam

Push RegScale Case to eMASS as POA&M.

Creates new POA&M or updates existing (idempotent operation).

regscale emass_api push_poam [OPTIONS]
FlagTypeRequiredDefaultDescription
--case-idintegerYesRegScale Case ID to push
--system-idintegerYeseMASS system ID
--no-validatebooleanNofalseSkip business rule validation

regscale emass_api register

Exchange a CAC certificate for an eMASS API key.

Connects to the eMASS server using your CAC (via PKCS#11), calls POST /api/api-key, and writes the returned key to init.yaml.

regscale emass_api register [OPTIONS]
FlagTypeRequiredDefaultDescription
--base-urltextNoeMASS base URL (overrides init.yaml)
--pkcs11-libtextNoPKCS#11 library path (overrides auto-detect)
--token-labeltextNoPKCS#11 token label filter
--cert-labeltextNoCertificate label on the token
--slotintegerNoPKCS#11 slot index
--ca-certtextNoCA bundle (PEM file or dir) to trust the eMASS server cert (overrides emass.ssl_ca_cert)

regscale emass_api show_config

Display current eMASS integration configuration.

Shows all configuration variables and their current values.

regscale emass_api show_config

This command takes no parameters.

regscale emass_api show_field_mappings

Display summary of field mappings between RegScale and eMASS.

Shows count of mapped fields per category.

regscale emass_api show_field_mappings

This command takes no parameters.

regscale emass_api sync_controls

Sync Control Implementations from RegScale SSP to eMASS Test Results.

Pushes all controls in SSP to eMASS as Test Results.

regscale emass_api sync_controls [OPTIONS]
FlagTypeRequiredDefaultDescription
--ssp-idintegerYesRegScale SSP ID to sync controls from
--system-idintegerYeseMASS system ID
--control-familytextNoFilter by control family (e.g., 'AC', 'AU')

regscale emass_api sync_hw_baseline

Sync the hardware baseline from eMASS to RegScale (eMASS-authoritative, net-new push-back).

Pulls hardware assets from eMASS, deconflicts with existing RegScale Assets, creates/updates Assets in RegScale, and pushes RegScale-only (net-new) Assets back to eMASS. eMASS is authoritative: on field conflicts the eMASS value wins, and existing eMASS records are never edited.

regscale emass_api sync_hw_baseline [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID.
--regscale-idintegerYesRegScale security plan (SSP) ID.
--dry-runbooleanNofalseLog planned changes without writing anything.

regscale emass_api sync_poams

Bidirectional POA&M sync between RegScale and eMASS.

Pushes RegScale Cases and pulls eMASS POA&Ms.

regscale emass_api sync_poams [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--ssp-idintegerNoRegScale SSP ID to sync cases from
--directionchoiceNobidirectionalChoices: push, pull, bidirectional

regscale emass_api sync_sw_baseline

Sync the software baseline from eMASS to RegScale (eMASS-authoritative, net-new push-back).

Pulls software assets from eMASS, deconflicts with existing RegScale Assets, creates/updates Assets in RegScale, and pushes RegScale-only (net-new) Assets back to eMASS. eMASS is authoritative: on field conflicts the eMASS value wins, and existing eMASS records are never edited.

regscale emass_api sync_sw_baseline [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID.
--regscale-idintegerYesRegScale security plan (SSP) ID.
--dry-runbooleanNofalseLog planned changes without writing anything.

regscale emass_api sync_system

Full bidirectional sync between a RegScale SSP and its linked eMASS system.

Reads the eMASS system ID from SecurityPlan.emassId, then syncs hardware assets, software assets, controls, POAMs, milestones, and artifacts in dependency order. Independent steps continue even if others fail.

regscale emass_api sync_system [OPTIONS]
FlagTypeRequiredDefaultDescription
--regscale-idintegerYesRegScale SSP ID.
--dry-runbooleanNofalseLog planned changes without writing anything.
--skiptextNoStep name to skip. Repeatable: --skip artifacts --skip milestones. Valid names: hw_assets, sw_assets, controls, poams, milestones, artifacts.

regscale emass_api test_connection

Test connection to eMASS API.

Validates credentials and verifies API accessibility.

regscale emass_api test_connection [OPTIONS]
FlagTypeRequiredDefaultDescription
--base-urltextNoeMASS API base URL
--api-keytextNoeMASS API key

regscale emass_api update_milestone

Update an existing milestone.

Due date should be in YYYY-MM-DD format (e.g., 2025-03-15).

regscale emass_api update_milestone [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--poam-idintegerYeseMASS POA&M ID
--milestone-idintegerYesMilestone ID to update
--descriptiontextYesUpdated milestone description
--due-datetextYesUpdated due date (YYYY-MM-DD format)

regscale emass_api upload_artifact

Upload single artifact/evidence file to eMASS system.

Associates artifact with specified system and optionally with a control.

regscale emass_api upload_artifact [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--file-pathpathYesPath to file to upload
--artifact-typetextYesType of artifact (e.g., 'Test Results', 'Evidence')
--control-acronymtextNoControl acronym to associate with (e.g., 'AC-1')

regscale emass_api upload_artifacts_bulk

Upload multiple artifacts from directory to eMASS system.

Processes all files matching the pattern in the specified directory. Uses automatic retry logic and chunking for large batches.

regscale emass_api upload_artifacts_bulk [OPTIONS]
FlagTypeRequiredDefaultDescription
--system-idintegerYeseMASS system ID
--directorypathYesDirectory containing files to upload
--artifact-typetextYesType of artifacts
--patterntextNo*File pattern to match (e.g., '*.pdf')

Did this page help you?