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.
domaintokenuserId
Commands
| Command | Description |
|---|---|
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_milestones_bulk | Add multiple milestones to a POA&M from JSON input. JSON format: [{"description": "...", "scheduledCompletionDate": 1234567890000}, ...] scheduledCompletionDate should be Unix timestamp in millisecon |
regscale emass_api authenticate | Configure eMASS authentication credentials. Sets environment variables for eMASS API access. |
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 get_system_info | Get detailed information about an eMASS system. Shows system metadata, authorization status, and contact information. |
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, a |
regscale emass_api list_artifacts | List all artifacts for an eMASS system. Displays artifact ID, filename, type, and associated control. |
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_systems | List all eMASS systems accessible to the user. Displays system ID, name, and authorization status. |
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 push_control | Push RegScale Control Implementation to eMASS as Test Result. Maps Control Implementation fields to eMASS Test Result format. |
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 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 show_config | Display current eMASS integration configuration. Shows all configuration variables and their current values. |
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 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_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 RegS |
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_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 RegS |
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, mileston |
regscale emass_api test_connection | Test connection to eMASS API. Validates credentials and verifies API accessibility. |
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 upload_artifact | Upload single artifact/evidence file to eMASS system. Associates artifact with specified system and optionally with a control. |
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 add_milestone
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_milestone [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--poam-id | integer | Yes | — | eMASS POA&M ID |
--description | text | Yes | — | Milestone description |
--due-date | text | Yes | — | Due date (YYYY-MM-DD format) |
regscale emass_api add_milestones_bulk
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 milliseconds.
regscale emass_api add_milestones_bulk [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--poam-id | integer | Yes | — | eMASS POA&M ID |
--milestones-json | text | Yes | — | JSON string with milestone array (description, scheduledCompletionDate) |
regscale emass_api authenticate
regscale emass_api authenticateConfigure eMASS authentication credentials.
Sets environment variables for eMASS API access.
regscale emass_api authenticate [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--api-key | text | Yes | — | eMASS API key to configure |
--base-url | text | Yes | — | eMASS API base URL |
--user-uid | text | No | — | User UID for eMASS operations |
regscale emass_api delete_milestones
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 delete_milestones [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--poam-id | integer | Yes | — | eMASS POA&M ID |
--milestone-ids | text | Yes | — | Comma-separated milestone IDs to delete |
regscale emass_api get_system_info
regscale emass_api get_system_infoGet detailed information about an eMASS system.
Shows system metadata, authorization status, and contact information.
regscale emass_api get_system_info [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
regscale emass_api import_xml
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, 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]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--xml-file | path | Yes | — | Path to eMASS XML export file |
--catalog-id | integer | No | — | RegScale Catalog ID to map eMASS controls to (required to import controls in live mode) |
--dry-run | boolean | No | false | Validate XML without creating records |
--create-custom-fields | boolean | No | false | Create custom fields for unmapped XML elements |
--output-format | choice | No | summary | Choices: summary, detailed, json |
regscale emass_api list_artifacts
regscale emass_api list_artifactsList all artifacts for an eMASS system.
Displays artifact ID, filename, type, and associated control.
regscale emass_api list_artifacts [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--output-format | choice | No | table | Choices: table, json |
regscale emass_api list_milestones
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_milestones [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--poam-id | integer | Yes | — | eMASS POA&M ID |
--output-format | choice | No | table | Choices: table, json |
regscale emass_api list_systems
regscale emass_api list_systemsList all eMASS systems accessible to the user.
Displays system ID, name, and authorization status.
regscale emass_api list_systems [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--output-format | choice | No | table | Choices: table, json |
regscale emass_api pull_poams
regscale emass_api pull_poamsPull POA&Ms from eMASS to RegScale format.
Retrieves POA&Ms and converts to RegScale Case format.
regscale emass_api pull_poams [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--control-acronyms | text | No | — | Comma-separated control acronyms to filter (e.g., 'AC-1,AC-2') |
--output | path | No | — | Output file for pulled POA&Ms (JSON) |
regscale emass_api push_control
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_control [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--control-impl-id | integer | Yes | — | RegScale Control Implementation ID |
--system-id | integer | Yes | — | eMASS system ID |
regscale emass_api push_poam
regscale emass_api push_poamPush RegScale Case to eMASS as POA&M.
Creates new POA&M or updates existing (idempotent operation).
regscale emass_api push_poam [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--case-id | integer | Yes | — | RegScale Case ID to push |
--system-id | integer | Yes | — | eMASS system ID |
--no-validate | boolean | No | false | Skip business rule validation |
regscale emass_api register
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 register [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--base-url | text | No | — | eMASS base URL (overrides init.yaml) |
--pkcs11-lib | text | No | — | PKCS#11 library path (overrides auto-detect) |
--token-label | text | No | — | PKCS#11 token label filter |
--cert-label | text | No | — | Certificate label on the token |
--slot | integer | No | — | PKCS#11 slot index |
--ca-cert | text | No | — | CA bundle (PEM file or dir) to trust the eMASS server cert (overrides emass.ssl_ca_cert) |
regscale emass_api show_config
regscale emass_api show_configDisplay 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
regscale emass_api show_field_mappingsDisplay 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
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_controls [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--ssp-id | integer | Yes | — | RegScale SSP ID to sync controls from |
--system-id | integer | Yes | — | eMASS system ID |
--control-family | text | No | — | Filter by control family (e.g., 'AC', 'AU') |
regscale emass_api sync_hw_baseline
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 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]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID. |
--regscale-id | integer | Yes | — | RegScale security plan (SSP) ID. |
--dry-run | boolean | No | false | Log planned changes without writing anything. |
regscale emass_api sync_poams
regscale emass_api sync_poamsBidirectional POA&M sync between RegScale and eMASS.
Pushes RegScale Cases and pulls eMASS POA&Ms.
regscale emass_api sync_poams [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--ssp-id | integer | No | — | RegScale SSP ID to sync cases from |
--direction | choice | No | bidirectional | Choices: push, pull, bidirectional |
regscale emass_api sync_sw_baseline
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 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]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID. |
--regscale-id | integer | Yes | — | RegScale security plan (SSP) ID. |
--dry-run | boolean | No | false | Log planned changes without writing anything. |
regscale emass_api sync_system
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, milestones, and artifacts in dependency order. Independent steps continue even if others fail.
regscale emass_api sync_system [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--regscale-id | integer | Yes | — | RegScale SSP ID. |
--dry-run | boolean | No | false | Log planned changes without writing anything. |
--skip | text | No | — | Step name to skip. Repeatable: --skip artifacts --skip milestones. Valid names: hw_assets, sw_assets, controls, poams, milestones, artifacts. |
regscale emass_api test_connection
regscale emass_api test_connectionTest connection to eMASS API.
Validates credentials and verifies API accessibility.
regscale emass_api test_connection [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--base-url | text | No | — | eMASS API base URL |
--api-key | text | No | — | eMASS API key |
regscale emass_api update_milestone
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 update_milestone [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--poam-id | integer | Yes | — | eMASS POA&M ID |
--milestone-id | integer | Yes | — | Milestone ID to update |
--description | text | Yes | — | Updated milestone description |
--due-date | text | Yes | — | Updated due date (YYYY-MM-DD format) |
regscale emass_api upload_artifact
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_artifact [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--file-path | path | Yes | — | Path to file to upload |
--artifact-type | text | Yes | — | Type of artifact (e.g., 'Test Results', 'Evidence') |
--control-acronym | text | No | — | Control acronym to associate with (e.g., 'AC-1') |
regscale emass_api upload_artifacts_bulk
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 upload_artifacts_bulk [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--system-id | integer | Yes | — | eMASS system ID |
--directory | path | Yes | — | Directory containing files to upload |
--artifact-type | text | Yes | — | Type of artifacts |
--pattern | text | No | * | File pattern to match (e.g., '*.pdf') |
Updated about 5 hours ago
