HTTP / REST Source
The HTTP source starts a lightweight HTTP server inside the Intuware engine, allowing external systems to push data into a channel via standard REST calls.
It is ideal for receiving webhooks, EHR push notifications, and any REST-based integration where the remote system initiates the connection.
Configuration
Section titled “Configuration”source: type: http port: 8080 path: /intake methods: - POST - PUT tls: cert_file: ./certs/server.crt key_file: ./certs/server.key auth: type: bearer token: ${INTAKE_TOKEN}Properties
Section titled “Properties”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
port | int | Yes | — | TCP port the HTTP server binds to. |
path | string | No | / | URL path to listen on. |
methods | string[] | No | ["POST"] | HTTP methods to accept. |
tls | object | No | — | TLS certificate and key for HTTPS. |
auth | object | No | — | Authentication configuration. |
Authentication
Section titled “Authentication”The auth block supports several strategies. Set auth.type to one of the following:
auth: type: basic username: ehr_system password: ${BASIC_PASSWORD}Bearer Token
Section titled “Bearer Token”auth: type: bearer token: ${BEARER_TOKEN}API Key
Section titled “API Key”auth: type: api_key header: X-Api-Key key: ${API_KEY}OAuth 2.0 (JWT Validation)
Section titled “OAuth 2.0 (JWT Validation)”auth: type: oauth2 issuer: https://idp.example.com audience: intuware-intake jwks_url: https://idp.example.com/.well-known/jwks.jsonMutual TLS (mTLS)
Section titled “Mutual TLS (mTLS)”auth: type: mtls ca_file: ./certs/client-ca.crtComplete Example
Section titled “Complete Example”channel: name: ehr-webhook-intake description: Receive ADT events from the EHR via webhook
source: type: http port: 443 path: /ehr/adt methods: - POST tls: cert_file: ./certs/server.crt key_file: ./certs/server.key auth: type: bearer token: ${EHR_WEBHOOK_TOKEN}
transformer: type: typescript file: ./transforms/adt-to-fhir.ts
destination: type: http url: https://fhir.hospital.org/r4/Bundle method: POST headers: Content-Type: application/fhir+jsonTransformer Example
Section titled “Transformer Example”A TypeScript transformer that converts an incoming HTTP request body into a FHIR Patient resource:
export default function transform(msg: IntuMessage): IntuMessage { const body = JSON.parse(msg.payload);
const patient = { resourceType: "Patient", identifier: [ { system: "urn:oid:2.16.840.1.113883.19.5", value: body.patient_id, }, ], name: [ { family: body.last_name, given: [body.first_name], }, ], birthDate: body.dob, };
msg.payload = JSON.stringify(patient); return msg;}