HomeGuidesAPI ReferenceChangelog
Guides

The RegScale Model CLI is designed to easily upload or bulk edit various data models/modules within RegScale via an excel spreadsheet. It currently supports assessments, issues, components, or assets. The Model CLI current supports the following functions:

new: This function will create a local Excel spreadsheet for users to edit to be able to bulk create new records.

regscale model new --path <path to where to export files> --model [assessment|issue|component|asset]\

generate: This function will build and populate an Excel spreadsheet of records with the selected RegScale Parent Id and RegScale Module for users to edit.

regscale model generate --regscale_id <regscale record> --regscale_module <regscale module> --path <path to where to export the files> --model [assessment|issue|component|asset]\

load: This function uploads updated and new records to RegScale from the Excel spreadsheet created with the new function.

regscale model load --path <path to exported files> --model [assessment|issue|component|asset]

delete_files: This function will delete files created by the process.

regscale model delete_files --path <path to exported files> --model [assessment|issue|component|asset]

To use the Model CLI to bulk add issues as an example:

  1. Run the first command which creates a local spreadsheet template regscale model new --model issue
  2. Complete/Save the template excel created with issues to upload. Ensure that required fields for each record type are completed:
ModuleRequired Fields
AssessmentTitle, Lead Assessor, Assessment Type, Planned Start, Planned Finish, Status
IssueTitle, Severity Level, Issue Owner, Identification, Due Date for Remediation, Status (if Status is Closed Date Completed is additionally required)
ComponentTitle, Component Type, Component Owner, Status, Description, Default Control Assessment Schedule
ControlControl Owner, Control Name, Control Title, Description
AssetAsset Name, Asset Owner, Status, Asset Category, Asset Type
  1. Run the second command that creates the issue records based on the completed template regscale model load --path <path to exported files> --model issue