Last updated Nov 7, 2024
Internal use only

Loading Data on your local machine

In order to effectively develop new features in EPM. It is often helpful to have an understanding of the existing jobs, and be able to utilize them to load certain data. In this page, we provide an explanation of all the EPM jobs. Focusing on their purpose and how to call them.

Please run these jobs in the sequence in which they are listed on this page if your goal is to replicate the entire state.

Note: Our goal is to eventually build an orchestrator service that runs the below operations in the necessary sequence This page will be updated when the development effort for that is completed.

Import/Export Job (Loading Standard Data)

There's plenty of data that is unique to production and staging, and it's often helpful to be able to somehow get that data locally. The import/export job exists to help you load a whole lot of data that would otherwise require manual creation, saving you countless hours.

Here is a list of the data that can be exported

  • Frameworks (Standards)
  • Controls
  • Requirements
  • Responsibilities
  • Components
  • Tags
  • MCD (Manually contributed component instances)
  • Attestations
  • In Scope Standards
  • Services (Component Instances of Component Type Service)

All necessary junctions get exported as well.

Exporting

To export the data from a particular environment, run the following API:

  • Method: GET
  • URL: /api/admin/export-all

Importing

To import the data into a particular environment, copy the dataset that you receive in the response from running the export API. Then, paste it into the part that says //PASTE_EXPORT_HERE.

  • Method: POST
  • URL: /api/admin/import-all
1
2
{
    "config": "UPSERT",
    "withServicesAttestationsAndMCD": true,
    "exportedData": //PASTE_EXPORT_HERE
}

Available Configurations

Config OptionDescription
UPSERTUpdates the existing state or adds additional data without removing existing entries.
REPLACE_ALLPerforms a hard reset, deleting all existing state. Use this option if you want a clean slate.

Additional Options

  • withServicesAttestationsAndMCD:
    • If true, it will include attestations, services, and MCD.
    • If false, it will exclude attestations, services, and MCD.

Loading Services

You typically do not need to run this API if you've just completed the import/export sequence. However, if you did not load services and wish to do so deliberately, call the following API:

  • Method: POST
  • URL: /api/workflow/load-service-instances

Loading Component Instances (Inventory)

Run this job to obtain the latest inventory data for all components, excluding components of type service:

  • Method: POST
  • URL: /api/workflow/load-asset-instances

Synching Responsibilities

Run this job to instantiate CIRs/CIRFs (Component Instance Responsibilities). These entities capture default compliance posture records for responsibilities against instances. This job creates these junction records but does not evaluate their compliance state. As a result, you'll be able to see responsibilities/requirements for services that are in-scope in the service owner view.

  • Method: POST
  • URL: /api/workflow/sync-responsibilities-to-instances

Component Adoption Evaluation

Prerequisite: Run the responsibility synchronization first.

All CIRs that belong to responsibilities of type adoption can be evaluated by inspecting the contextual state. This job evaluates and updates the state of those records to Compliant.

The process works as follows: For a given responsibility under a specific service, check if the service is using any of the components that must be adopted. If any such instances exist, the CIR is deemed "Compliant."

  • Method: POST
  • URL: /api/workflow/evaluate-component-adoption

Instance Assessment Upload/Evaluation

Prerequisite: Run the responsibility synchronization first.

After running the synchronization job, execute this job to upload the latest assessment result. This job inspects a table in Socrates maintained by Asset Readiness, uploading the latest assessment results into our database and then evaluating them.

  • Method: POST
  • URL: /api/workflow/upload-assessment-results

If your goal is to run only the evaluation without the upload, you can optionally use the following API:

  • Method: POST
  • URL: /api/workflow/synch-assessment-results

Generate Report View Data (Optional if developing vulnerability view)

The Report view requires a CSV file, which can be generated by running the following job:

  • Method: POST
  • URL: /api/workflow/generate-requirement-report/bulk

Load In-Scope Standards (Optional if you need to refresh in-scope data)

If you used the Export/Import sequence with the withServicesAttestationsAndMCD setting set to true, you should not need to run this job. However, if you would like to reload in-scope standards only, you may do so by executing the API below:

  • Method: POST
  • URL: /api/workflow/load-services-in-scope-standards

Rate this page: