API ReferenceHistorical Delta
POST

/modules/historical-delta

Executes a bi-directional inference on two datasets across time, returning aberration trends and shifts rather than point-in-time anomalies.

Bi-Directional Analysis

As outlined in the -3 Mapping Standard, Marigold does not archive deep historical payloads in memory. For vendors requiring long-term aberration detection (e.g., comparing a Q1 baseline to a Q4 baseline), you must provide both encrypted vaults.

The historical-delta endpoint acts as a bi-directional pipe, calculating the ∆ (delta) shift between vault_a (historical) and vault_b (current).

Request Schema

session_fingerprintstringRequired

SHA-256 hash representing this specific delta comparison run.

encrypted_vault_aobjectRequired

The baseline/historical dataset encrypted via AES-GCM.

encrypted_vault_bobjectRequired

The current dataset encrypted via AES-GCM.

Delta Request Example
1{
2 "session_fingerprint": "9a8b7c6d5e4f3a...",
3 "encrypted_vault_a": {
4 "payload": "OLD_DATA_BASE64_CIPHERTEXT"
5 },
6 "encrypted_vault_b": {
7 "payload": "NEW_DATA_BASE64_CIPHERTEXT"
8 }
9}

Response Schema

The response yields the statistical shifts and aberrant trend lines across the two datasets.

Delta Response Example
1{
2 "status": "SUCCESS",
3 "delta_metrics": {
4 "volume_shift_percentage": "+4.2%",
5 "aberration_velocity": "HIGH"
6 },
7 "flag_deltas": [
8 {
9 "record_id": "ROW_0001",
10 "shift_reason": "SUDDEN_DENSITY_INCREASE",
11 "severity": "CRITICAL"
12 }
13 ]
14}