Skip to content

Side-by-side rule comparison between two peer components​

GET
/api/components/compare

Compares rules between a base (older) and diff (newer) component sharing the same SRG. Returns a rule-by-rule diff keyed by field name, with metadata about both components. Used by the DiffViewer stepper in the component editor. Requires authentication and access to both components.

Authorizations​

cookieAuth
Type
API Key (cookie: _vulcan_session)
or
tokenAuth

Personal access token authentication. Send via Authorization header: Authorization: Token vulcan_xxx. Tokens are SHA-256 hashed server-side (never stored in plaintext). Scopes: read (GET), write (mutations), admin (everything). Create tokens via Settings → API Tokens in the web UI.

Type
HTTP (token)

Parameters​

Query Parameters

base_id*

ID of the base (older) component to compare from.

Type
integer
Required
Example29
diff_id*

ID of the diff (newer) component to compare against.

Type
integer
Required
Example30

Responses​

Rule-by-rule diff with metadata envelope

application/json
JSON
{
  
"data": {
  
  
"000050": {
  
  
  
"base": "control 'CNTR-00-000050' do title 'Container images must be signed' end",
  
  
  
"diff": "control 'CNTR-00-000050' do title 'Container images must be signed and verified' end",
  
  
  
"changed": true
  
  
},
  
  
"000051": {
  
  
  
"base": "control 'CNTR-00-000051' do title 'Approved registries only' end",
  
  
  
"diff": "control 'CNTR-00-000051' do title 'Approved registries only' end",
  
  
  
"changed": false
  
  
}
  
},
  
"meta": {
  
  
"base_id": 29,
  
  
"diff_id": 30,
  
  
"rules_count": 264
  
}
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Part of the MITRE Security Automation Framework (SAF)