Skip to content

HTTP Destination

The HTTP destination sends processed messages to any HTTP or REST endpoint. It supports multiple authentication schemes, configurable retry policies, and mutual TLS — making it suitable for everything from internal microservices to external FHIR servers.

Add an HTTP destination to a channel in intu.yaml:

destinations:
- name: fhir-server
type: http
properties:
url: "https://fhir.example.com/Patient"
method: POST
headers:
Content-Type: "application/fhir+json"
X-Correlation-Id: "${messageId}"
timeout_ms: 30000
PropertyTypeDefaultDescription
urlstring(required)Target URL. Supports ${VAR} environment variable substitution.
methodstringPOSTHTTP method — GET, POST, PUT, PATCH, DELETE.
headersmap{}Key-value pairs sent as request headers. Values support ${VAR} substitution.
timeout_msinteger30000Request timeout in milliseconds.

Configure authentication under the auth block. Four schemes are supported.

auth:
type: basic
username: "${HTTP_USER}"
password: "${HTTP_PASS}"
auth:
type: bearer
token: "${API_TOKEN}"
auth:
type: api_key
header: X-API-Key
value: "${API_KEY}"
auth:
type: oauth2
token_url: "https://auth.example.com/oauth2/token"
client_id: "${OAUTH_CLIENT_ID}"
client_secret: "${OAUTH_CLIENT_SECRET}"
scopes:
- "system/Patient.write"
- "system/Observation.write"

Intu automatically fetches and caches the access token, refreshing it before expiry.

PropertyTypeDefaultDescription
insecure_skip_verifybooleanfalseSkip server certificate verification. Not recommended for production.
ca_certstringPath to a custom CA certificate file (PEM).
client_certstringPath to the client certificate for mutual TLS.
client_keystringPath to the client private key for mutual TLS.
tls:
ca_cert: "/etc/intu/certs/ca.pem"
client_cert: "/etc/intu/certs/client.pem"
client_key: "/etc/intu/certs/client-key.pem"

Configure retry behaviour under the retry block.

PropertyTypeDefaultDescription
max_attemptsinteger3Total number of attempts (including the initial request).
backoffstringexponentialStrategy: constant, linear, or exponential.
initial_delay_msinteger1000Delay before the first retry.
max_delay_msinteger30000Upper bound on delay between retries.
jitterbooleantrueAdd random jitter to avoid thundering-herd effects.
retry_onlist[500, 502, 503, 504]HTTP status codes that trigger a retry.
no_retry_onlist[]Status codes that should never be retried, even if they appear in retry_on.

An HTTP destination with OAuth 2.0 authentication and custom retry policy:

destinations:
- name: fhir-patient-feed
type: http
properties:
url: "https://fhir.hospital.org/r4/Patient"
method: POST
headers:
Content-Type: "application/fhir+json"
Accept: "application/fhir+json"
timeout_ms: 15000
auth:
type: oauth2
token_url: "https://auth.hospital.org/oauth2/token"
client_id: "${FHIR_CLIENT_ID}"
client_secret: "${FHIR_CLIENT_SECRET}"
scopes:
- "system/Patient.write"
tls:
ca_cert: "/etc/intu/certs/hospital-ca.pem"
retry:
max_attempts: 5
backoff: exponential
initial_delay_ms: 500
max_delay_ms: 15000
jitter: true
retry_on: [500, 502, 503, 504, 429]