Skip to main content
Five endpoints for message tracing and gap detection. All public.

GET /api/loft/traces

Trace a patient’s messages across all monitored interfaces.
Query ParamTypeDescription
patient_idstringPatient MRN
account_numberstringAccount/visit number
control_idstringMessage control ID
sinceISO 8601Start time
limitintMax results
curl
curl "https://api.pidgeon.health/api/loft/traces?patient_id=MRN12345&since=2026-02-01T00:00:00Z"

Response

{
  "success": true,
  "data": {
    "patientId": "MRN12345",
    "totalSpanMs": 14400000,
    "events": [
      {"interface": "ER ADT", "messageType": "ADT^A01", "timestamp": "2026-02-20T08:30:00Z", "status": "valid"},
      {"interface": "Lab", "messageType": "ORU^R01", "timestamp": "2026-02-20T09:15:00Z", "status": "valid"},
      {"interface": "ER ADT", "messageType": "ADT^A03", "timestamp": "2026-02-20T12:30:00Z", "status": "valid"}
    ],
    "gaps": []
  },
  "error": null
}

GET /api/loft/traces/

Get a specific trace by ID (treated as patient_id lookup).
curl
curl https://api.pidgeon.health/api/loft/traces/MRN12345

GET /api/loft/gaps

Detect gaps in message sequences.
Query ParamTypeDescription
interface_idstringInterface to check
sequencestringExpected sequence
sinceISO 8601Start time
patient_idstringFilter by patient
curl
curl "https://api.pidgeon.health/api/loft/gaps?interface_id=intf-001&since=2026-02-20T00:00:00Z"

GET /api/loft/latency

Measure message latency between interfaces.
Query ParamTypeDescription
from_interfacestringSource interface ID
to_interfacestringDestination interface ID
message_typestringFilter by message type
sinceISO 8601Start time
curl
curl "https://api.pidgeon.health/api/loft/latency?from_interface=intf-001&to_interface=intf-002"

GET /api/loft/sequences

List all known message sequences.
curl
curl https://api.pidgeon.health/api/loft/sequences