{
  "info": {
    "name": "EventHub Esper PoC",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Evaluate tachograph driver-card activities",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/eventhub/esper-poc/tachograph/driver-card-activities?tenantKey={{tenantKey}}&driverEntityId={{driverEntityId}}&occurredFrom={{occurredFrom}}&occurredTo={{occurredTo}}&guardHours=24&significantDrivingMinutes=3&mergeGapSeconds=60&operatingPeriodSplitRestHours=7",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "eventhub",
            "esper-poc",
            "tachograph",
            "driver-card-activities"
          ],
          "query": [
            {
              "key": "tenantKey",
              "value": "{{tenantKey}}"
            },
            {
              "key": "driverEntityId",
              "value": "{{driverEntityId}}"
            },
            {
              "key": "occurredFrom",
              "value": "{{occurredFrom}}"
            },
            {
              "key": "occurredTo",
              "value": "{{occurredTo}}"
            },
            {
              "key": "guardHours",
              "value": "24"
            },
            {
              "key": "significantDrivingMinutes",
              "value": "3"
            },
            {
              "key": "mergeGapSeconds",
              "value": "60"
            },
            {
              "key": "operatingPeriodSplitRestHours",
              "value": "7"
            }
          ]
        }
      }
    },
    {
      "name": "Evaluate tachograph operating periods",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/eventhub/esper-poc/tachograph/operating-period-evaluation?tenantKey={{tenantKey}}&driverId={{driverId}}&occurredFrom={{occurredFrom}}&occurredTo={{occurredTo}}&guardHours=24&operatingSplitIdleHours=7&significantDrivingMinutes=3&mergeGapSeconds=0&gapDetectionToleranceSeconds=0&sourceSelectionMode=MIXED&unknownTreatmentMode=AS_BREAK_REST",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "eventhub",
            "esper-poc",
            "tachograph",
            "operating-period-evaluation"
          ],
          "query": [
            {
              "key": "tenantKey",
              "value": "{{tenantKey}}"
            },
            {
              "key": "driverId",
              "value": "{{driverId}}"
            },
            {
              "key": "occurredFrom",
              "value": "{{occurredFrom}}"
            },
            {
              "key": "occurredTo",
              "value": "{{occurredTo}}"
            },
            {
              "key": "guardHours",
              "value": "24"
            },
            {
              "key": "operatingSplitIdleHours",
              "value": "7"
            },
            {
              "key": "significantDrivingMinutes",
              "value": "3"
            },
            {
              "key": "mergeGapSeconds",
              "value": "0"
            },
            {
              "key": "gapDetectionToleranceSeconds",
              "value": "0"
            },
            {
              "key": "sourceSelectionMode",
              "value": "MIXED"
            },
            {
              "key": "unknownTreatmentMode",
              "value": "AS_BREAK_REST"
            }
          ]
        }
      }
    },
    {
      "name": "Evaluate tachograph DTI enrichment",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/eventhub/esper-poc/tachograph/dti-enrichment?tenantKey={{tenantKey}}&driverId={{driverId}}&occurredFrom={{occurredFrom}}&occurredTo={{occurredTo}}&guardHours=24&operatingSplitIdleHours=7&significantDrivingMinutes=3&mergeGapSeconds=0&gapDetectionToleranceSeconds=0&sourceSelectionMode=MIXED&unknownTreatmentMode=AS_BREAK_REST&vehicleEvidenceLookbackHours=720&geoSearchWindowMinutes=180&vicinityWindowMinutes=180",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "eventhub",
            "esper-poc",
            "tachograph",
            "dti-enrichment"
          ],
          "query": [
            {
              "key": "tenantKey",
              "value": "{{tenantKey}}"
            },
            {
              "key": "driverId",
              "value": "{{driverId}}"
            },
            {
              "key": "occurredFrom",
              "value": "{{occurredFrom}}"
            },
            {
              "key": "occurredTo",
              "value": "{{occurredTo}}"
            },
            {
              "key": "guardHours",
              "value": "24"
            },
            {
              "key": "operatingSplitIdleHours",
              "value": "7"
            },
            {
              "key": "significantDrivingMinutes",
              "value": "3"
            },
            {
              "key": "mergeGapSeconds",
              "value": "0"
            },
            {
              "key": "gapDetectionToleranceSeconds",
              "value": "0"
            },
            {
              "key": "sourceSelectionMode",
              "value": "MIXED"
            },
            {
              "key": "unknownTreatmentMode",
              "value": "AS_BREAK_REST"
            },
            {
              "key": "vehicleEvidenceLookbackHours",
              "value": "720"
            },
            {
              "key": "geoSearchWindowMinutes",
              "value": "180"
            },
            {
              "key": "vicinityWindowMinutes",
              "value": "180"
            }
          ]
        }
      }
    },
    {
      "name": "Tachograph file sessions",
      "item": [
        {
          "name": "Create tachograph file session",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": "{{tachographDddFile}}"
                },
                {
                  "key": "tenantKey",
                  "type": "text",
                  "value": "{{tenantKey}}"
                },
                {
                  "key": "sourceInstanceKey",
                  "type": "text",
                  "value": "{{sourceInstanceKey}}"
                },
                {
                  "key": "sessionLabel",
                  "type": "text",
                  "value": "{{sessionLabel}}"
                }
              ]
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions"
              ]
            }
          }
        },
        {
          "name": "Create tachograph vehicle unit file session",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": "{{tachographVuDddFile}}"
                },
                {
                  "key": "tenantKey",
                  "type": "text",
                  "value": "{{tenantKey}}"
                },
                {
                  "key": "sourceInstanceKey",
                  "type": "text",
                  "value": "legalrequirements-vehicleunit"
                },
                {
                  "key": "sessionLabel",
                  "type": "text",
                  "value": "vehicle-unit upload sample"
                }
              ]
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions"
              ]
            }
          }
        },
        {
          "name": "Get tachograph file session",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}"
              ]
            }
          }
        },
        {
          "name": "List tachograph file session drivers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}/drivers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}",
                "drivers"
              ]
            }
          }
        },
        {
          "name": "Get tachograph file session driver detail",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}/drivers/{{driverKey}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}",
                "drivers",
                "{{driverKey}}"
              ]
            }
          }
        },
        {
          "name": "Get tachograph file session driver Esper events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}/drivers/{{driverKey}}/processing/esper-events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}",
                "drivers",
                "{{driverKey}}",
                "processing",
                "esper-events"
              ]
            }
          }
        },
        {
          "name": "Process tachograph file session Esper events",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"significantDrivingMinutes\": 3,\n  \"minimumRestPeriodMinutes\": 720\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}/drivers/{{driverKey}}/processing/esper-events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}",
                "drivers",
                "{{driverKey}}",
                "processing",
                "esper-events"
              ]
            }
          }
        },
        {
          "name": "Process tachograph file session operating periods",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"operatingSplitIdleHours\": 7,\n  \"significantDrivingMinutes\": 3,\n  \"mergeGapSeconds\": 0,\n  \"gapDetectionToleranceSeconds\": 0\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}/drivers/{{driverKey}}/processing/operating-periods",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}",
                "drivers",
                "{{driverKey}}",
                "processing",
                "operating-periods"
              ]
            }
          }
        },
        {
          "name": "Delete tachograph file session",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-file-sessions/{{sessionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-file-sessions",
                "{{sessionId}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Runtime processing",
      "item": [
        {
          "name": "Load runtime driver events from tachograph file session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sessionId\": \"{{sessionId}}\",\n  \"sourceFamilies\": [\"TACHOGRAPH_FILE_SESSION\"],\n  \"driverKey\": \"{{driverKey}}\",\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"expandVehicleEvents\": true,\n  \"vehicleExpansionPaddingMinutes\": 0\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/runtime-processing/driver-events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "runtime-processing",
                "driver-events"
              ]
            }
          }
        },
        {
          "name": "Load runtime driver timeline from tachograph file session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sessionId\": \"{{sessionId}}\",\n  \"sourceFamilies\": [\"TACHOGRAPH_FILE_SESSION\"],\n  \"driverKey\": \"{{driverKey}}\",\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"expandVehicleEvents\": true,\n  \"vehicleExpansionPaddingMinutes\": 0\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/runtime-processing/driver-timeline",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "runtime-processing",
                "driver-timeline"
              ]
            }
          }
        },
        {
          "name": "Load runtime driver events from source DBs",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantKey\": \"{{tenantKey}}\",\n  \"sourceFamilies\": [\"TACHOGRAPH_DB\", \"YELLOWFOX_DB\"],\n  \"eventBackend\": \"SOURCE_DB\",\n  \"driverSourceEntityId\": \"{{runtimeDriverSourceEntityId}}\",\n  \"driverCardNation\": \"{{runtimeDriverCardNation}}\",\n  \"driverCardNumber\": \"{{runtimeDriverCardNumber}}\",\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"expandVehicleEvents\": true,\n  \"vehicleExpansionPaddingMinutes\": 30\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/runtime-processing/driver-events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "runtime-processing",
                "driver-events"
              ]
            }
          }
        },
        {
          "name": "Load runtime driver timeline from source DBs",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantKey\": \"{{tenantKey}}\",\n  \"sourceFamilies\": [\"TACHOGRAPH_DB\", \"YELLOWFOX_DB\"],\n  \"eventBackend\": \"SOURCE_DB\",\n  \"driverSourceEntityId\": \"{{runtimeDriverSourceEntityId}}\",\n  \"driverCardNation\": \"{{runtimeDriverCardNation}}\",\n  \"driverCardNumber\": \"{{runtimeDriverCardNumber}}\",\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"expandVehicleEvents\": true,\n  \"vehicleExpansionPaddingMinutes\": 30\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/runtime-processing/driver-timeline",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "runtime-processing",
                "driver-timeline"
              ]
            }
          }
        },
        {
          "name": "Load runtime driver events from local EventHub DB",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantKey\": \"{{tenantKey}}\",\n  \"sourceFamilies\": [\"TACHOGRAPH_DB\", \"YELLOWFOX_DB\"],\n  \"eventBackend\": \"EVENTHUB_DB\",\n  \"driverSourceEntityId\": \"{{runtimeDriverSourceEntityId}}\",\n  \"driverCardNation\": \"{{runtimeDriverCardNation}}\",\n  \"driverCardNumber\": \"{{runtimeDriverCardNumber}}\",\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"expandVehicleEvents\": true,\n  \"vehicleExpansionPaddingMinutes\": 30\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/runtime-processing/driver-events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "runtime-processing",
                "driver-events"
              ]
            }
          }
        },
        {
          "name": "Load runtime driver timeline from local EventHub DB",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantKey\": \"{{tenantKey}}\",\n  \"sourceFamilies\": [\"TACHOGRAPH_DB\", \"YELLOWFOX_DB\"],\n  \"eventBackend\": \"EVENTHUB_DB\",\n  \"driverSourceEntityId\": \"{{runtimeDriverSourceEntityId}}\",\n  \"driverCardNation\": \"{{runtimeDriverCardNation}}\",\n  \"driverCardNumber\": \"{{runtimeDriverCardNumber}}\",\n  \"occurredFrom\": \"{{occurredFrom}}\",\n  \"occurredTo\": \"{{occurredTo}}\",\n  \"expandVehicleEvents\": true,\n  \"vehicleExpansionPaddingMinutes\": 30\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/runtime-processing/driver-timeline",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "runtime-processing",
                "driver-timeline"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Tachograph composite sessions",
      "item": [
        {
          "name": "Create tachograph composite session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sessionIds\": [\n    \"{{sessionId}}\",\n    \"{{additionalSessionId}}\"\n  ],\n  \"label\": \"{{compositeSessionLabel}}\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-composite-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-composite-sessions"
              ]
            }
          }
        },
        {
          "name": "Get tachograph composite session",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-composite-sessions/{{compositeSessionId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-composite-sessions",
                "{{compositeSessionId}}"
              ]
            }
          }
        },
        {
          "name": "List tachograph composite session drivers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-composite-sessions/{{compositeSessionId}}/drivers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-composite-sessions",
                "{{compositeSessionId}}",
                "drivers"
              ]
            }
          }
        },
        {
          "name": "Load tachograph composite driver events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-composite-sessions/{{compositeSessionId}}/drivers/{{driverKey}}/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-composite-sessions",
                "{{compositeSessionId}}",
                "drivers",
                "{{driverKey}}",
                "events"
              ]
            }
          }
        },
        {
          "name": "Load tachograph composite driver timeline",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/eventhub/tachograph-composite-sessions/{{compositeSessionId}}/drivers/{{driverKey}}/timeline",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "eventhub",
                "tachograph-composite-sessions",
                "{{compositeSessionId}}",
                "drivers",
                "{{driverKey}}",
                "timeline"
              ]
            }
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:8080"
    },
    {
      "key": "tenantKey",
      "value": "default"
    },
    {
      "key": "driverEntityId",
      "value": "00000000-0000-0000-0000-000000000000"
    },
    {
      "key": "driverId",
      "value": "00000000-0000-0000-0000-000000000000"
    },
    {
      "key": "occurredFrom",
      "value": "2026-04-01T00:00:00Z"
    },
    {
      "key": "occurredTo",
      "value": "2026-05-01T00:00:00Z"
    },
    {
      "key": "sourceInstanceKey",
      "value": "legalrequirements-drivercard"
    },
    {
      "key": "sessionLabel",
      "value": "driver-card upload sample"
    },
    {
      "key": "sessionId",
      "value": "00000000-0000-0000-0000-000000000000"
    },
    {
      "key": "additionalSessionId",
      "value": "00000000-0000-0000-0000-000000000001"
    },
    {
      "key": "compositeSessionId",
      "value": "00000000-0000-0000-0000-000000000100"
    },
    {
      "key": "compositeSessionLabel",
      "value": "driver-multi-file sample"
    },
    {
      "key": "driverKey",
      "value": "12:12345678901200"
    },
    {
      "key": "runtimeDriverSourceEntityId",
      "value": "DRIVER:42"
    },
    {
      "key": "runtimeDriverCardNation",
      "value": "12"
    },
    {
      "key": "runtimeDriverCardNumber",
      "value": "12345678901200"
    },
    {
      "key": "tachographDddFile",
      "value": "C:\\\\temp\\\\driver-card.ddd"
    },
    {
      "key": "tachographVuDddFile",
      "value": "C:\\\\temp\\\\vehicle-unit.ddd"
    }
  ]
}
