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”Configure the HTTP source under listener in channel.yaml, with type: http and a http block:
listener: type: http 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”id: ehr-webhook-intakeenabled: truedescription: Receive ADT events from the EHR via webhook
listener: type: http 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: entrypoint: transformer.ts
destinations: - fhir-serverNamed destination fhir-server would be defined in intu.yaml with type: http, http.url, etc.
Transformer Example
Section titled “Transformer Example”A TypeScript transformer that converts an incoming HTTP request body into a FHIR Patient resource:
export function transform(msg: IntuMessage, ctx: IntuContext): IntuMessage { const body = (typeof msg.body === "object" && msg.body !== null) ? msg.body as Record<string, unknown> : {};
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, };
return { body: patient };}