HomeGuidesAPI ReferenceChangelogDiscussions
Log In

Catalog Tools

Catalog Compare CLI

This command queries the master list of catalogues contained within https://regscale.com/regulations/ and runs the catalog diagnostic process on the selected catalog.

It will then locate the respective catalog in the RegScale application based on a matching uuid, run the diagnostics process on that catalog, perform a comparison of the diagnostic results and then display the results of that comparison in the terminal.

Init.yaml

The init.yaml file does not have any required field values for this command, but you must be logged into regscale with a valid token to complete the comparison process.

Example Commands

Log into RegScale to set the token which is good for 24 hours and will secure all future RegScale API calls.

(NOTE: You can skip this step if you are using a RegScale Service Account).

  • regscale login

Run the catalog comparison process to select and perform a comparison between the respective catalog versions between https://regscale.com/regulations/ and the application.

  • regscale catalog compare

Example Output

The display of results to the terminal will follow a basic pattern of 2 results:

  1. Match (Equals)
  2. Do Not Match (Does Not Equal)

An example output from a catalog comparison follows this structure:

Catalog titles are not the same.                    
Catalog uuids match.                                    
The list of keywords for this catalog are not the same.
The count of CCIs for this catalog match.
The count of Objectives for this catalog match. 
The count of Parameters for this catalog match.
The count of Security Controls for this catalog is not the same.
The count of Tests for this catalog match.

Catalog Diagnostic CLI

This command queries the master list of catalogues contained within https://regscale.com/regulations/ and runs the catalog diagnostic process on the selected catalog.

It will then output the results of the catalog diagnostic process to the root directory as a .json file and then display the results in the terminal.

Init.yaml

The init.yaml file does not have any required field values for this command, but you must be logged into regscale with a valid token to complete the comparison process.

Example Commands

Log into RegScale to set the token which is good for 24 hours and will secure all future RegScale API calls.

(NOTE: You can skip this step if you are using a RegScale Service Account).

  • regscale login

Run the catalog diagnostic process to select and diagnose the required catalog then output the results to a .json file in the root directory and display the results in the terminal.

  • regscale catalog diagnose

Diagnostics.json

The output file from the diagnostics process contains the following fields in a JSON format:

  • title - The title of the selected catalog
  • uuid - The globally unique ID of the selected catalog
  • keywords - The contained list of keywords within the selected catalog
  • security_control_count - The count of security controls within the selected catalog
  • cci_count - The count of security controls within the selected catalog
  • objective_count - The count of objectives within the selected catalog
  • parameter_count - The count of parameters within the selected catalog
  • test_count - The count of tests within the selected catalog

The file contents of the file will follow this format:

{
    "title": string,
    "uuid": string, 
    "keywords": list[string],
    "security_control_count": int,
    "cci_count": int,
    "objective_count": int,
    "parameter_count": int,
    "test_count": int
}

This file will be exported to your root directory and will be overwritten by each successive call of regscale catalog diagnose.


Catalog Download CLI

This command queries the master list of catalogues contained within https://regscale.com/regulations/ and downloads the selected catalog to the root directory.

Init.yaml

The init.yaml file does not have any required field values for this command, but you must be logged into regscale with a valid token to complete the comparison process.

Example Commands

Log into RegScale to set the token which is good for 24 hours and will secure all future RegScale API calls.

(NOTE: You can skip this step if you are using a RegScale Service Account).

  • regscale login

Run the catalog export process to select and export the required catalog.

  • regscale catalog download

Example Catalog .json File

The selected catalog file from the download process will be output in a JSON format.

The contents of the catalog file will mostly follow this format, but there are a few exceptions:

{
    "catalogue": {
        "version": string,
        "id": string,
        "uuid": string,
        "title": string,
        "description": string,
        "datePublished": string,
        "lastRevisionDate": string,
        "url": string,
        "abstract": string,
        "keywords": list[string],
        "master": bool,
        "securityControls": list[dict],
        "createdById": string,
        "dateCreated": string,
        "lastUpdatedById": string,
        "isPublic": bool,
        "tenantsId": int,
        "dateLastUpdated": string,
        "archived": bool,
        "ccis": list[dict],
        "objectives": list[dict],
        "parameters": list[dict],
        "tests": list[dict]
    }
}

The output of the selected catalog file will be downloaded to your root directory.

Catalog Update CLI

This command queries the master list of catalogues contained within regscale.com/regulations and runs the catalog update process on the selected catalog.

It will then locate the respective catalog in the regscale application based on a matching uuid and match the selected application catalog against a new version of that catalog from regscale.com/regulations. Once it has matched the respective catalogs, it will then match the following data elements:

  • Security Controls
  • CCIs
  • Objectives
  • Parameters
  • Tests

Once the match has been completed it will then make 1 of 3 determinations:

  1. If it exists in both catalogs, make a PUT request to update the application instance data with data from the new catalog
  2. If it exists in the new catalog, but not in the application instance then make a POST request to create a new entry in the application instance
  3. If the data element has been archived in the new catalog then archive the data element in the application instance

Example Commands

Log into RegScale to set the token which is good for 24 hours and will secure all future RegScale API calls.

(NOTE: You can skip this step if you are using a RegScale Service Account).

  • regscale login

Run the catalog comparison process to select and perform a comparison between the respective catalog versions between regscale.com/regulations and the application.

  • regscale catalog update

Example Output

The display of results to the terminal will show an output for either 1 of 2 operations:

  1. Updated Data Element for Data Element ID: {ID}
  2. Created Data Element for Data Element ID: {ID}

Additionally, an Excel (.xlsx) file will be created for each data element with 3 tabs depending on the operations completed:

  1. Archived
  2. Updated
  3. Completed

Each field of the model relating to the particular data element will be captured as a separate column in the respective tab so all particular fields of the changed data element is captured

Init.yaml

The init.yaml file does not have any required field values for this command, but you must be logged into regscale with a valid token to complete the comparison process.