API adapter
The HTTP transport. Hosts an endpoint when bound to a receive port, dispatches outbound requests when bound to a send port. Both directions support one-way and two-way modes.
The API adapter is the HTTP transport for Art2link ESB. The platform exposes it as two adapter objects according to the Listener/Caller naming convention: bound to a receive port it is the API Listener (hosts an endpoint and accepts inbound traffic); bound to a send port it is the API Caller (reaches outbound to an endpoint). The two objects are different selections in the UI; this article treats them as one adapter because the underlying protocol and configuration model is one.
The split is direction, not function. A Listener has to expose an endpoint and accept inbound connections; a Caller has to reach out and manage retries, timeouts, and response handling. Splitting them in the platform lets each adapter focus on the work its side requires.
Bound to a receive port, the API adapter turns the port into an addressable HTTP endpoint. External callers issue requests against the configured path; the adapter accepts them, runs the receive port's inbound stages, and publishes the resulting message to the bus.
Both modes are supported. One-way returns immediately after publishing; two-way holds the caller's connection open and waits for a matching response message on the bus.
In two-way mode on the receive side, the adapter has to know which bus message is the response to the request it just received. That is the job of the receive port's Response Subscription Expression: a Boolean predicate the bus evaluates against every published message; the first match becomes the response delivered back to the caller.
The expression is evaluated in the same engine used by send/loopback/null port subscriptions, with one important addition: it can reference values that belong to the original inbound request. The most useful of these is a correlation token (a request id, a unique header, a generated GUID) promoted as a variable at the start of the receive port's inbound flow and matched on the outbound side of whichever port produces the response.
504) and the held connection is released. The bus state itself is unaffected — the in-flight messages are not rolled back. If a late response arrives after the timeout, it remains on the bus and is treated as an unsubscribed message.Bound to a send port, the API adapter dispatches an HTTP request to a configured endpoint. The send port carries the request configuration — method, URL, headers, body — and the adapter handles the dispatch and response.
One-way mode fires the request and continues; the HTTP status is checked for success/failure but the response body is discarded. Two-way mode waits for the HTTP response and republishes it to the bus as a payload message, ready for a downstream port to subscribe to.
The send port configures the outbound request the API Caller will issue. URL and body support templating against variables, message properties, and xPath into the message body — the same expression engine used elsewhere on the port.
The API adapter pairs with an API Authentication. The same Authentication shape is used on both sides — the runtime applies it differently depending on direction:
- Send side (API Caller): the Authentication presents credentials on the outbound request. The adapter injects them automatically — never set an Authorization header by hand on the Request Headers list; it will be overwritten.
- Receive side (API Listener): the Authentication validates credentials presented by inbound callers. Where an Authentication is required and the inbound credential is missing or invalid, the listener returns
401without invoking the rest of the receive port.
Supported credential shapes (verify against product before relying on names): Bearer token, Basic, API key in header, API key in query, OAuth 2.0 client credentials, and (receive-side only) mTLS.
Every API Listener in the solution is hosted under the same base URL. The path alone does not tell the runtime which receive port a request belongs to, so the listener routes on the inbound credential and headers instead: the combination of the Bearer token value and the matching header properties is what selects the destination port.
That combination has to be unique. If two Published receive ports declare the same Bearer-plus-header combination, an inbound request matches both and the runtime cannot decide where to route it. To prevent it, the combination is validated for uniqueness across the whole system — not just within an Application — at the moment a port is Published.
- Draft — allowed. A Draft is inert and takes no part in routing, so a colliding combination can sit in Draft without conflict.
- Publish — blocked. Publishing a port whose Bearer-plus-header combination already belongs to another Published port fails validation; the port stays a Draft with nothing lost.
X: 1 and another matching X: 1 plus Y: 2, where a request carrying both still satisfies both ports. Keep header match sets disjoint until overlap detection is added.Placeholder field sets — verify against the running product. Fields differ by side.
/orders/{id}) that are promoted into properties on the inbound message.HTTP Methods — required; one or more of GET, POST, PUT, PATCH, DELETE. Methods not selected return
405.Accepted Content Types — optional; restricts inbound media types.
Max Body Size — optional; rejects oversized bodies with
413.Request Timeout — required for two-way; how long the listener will hold the connection waiting for a matching response message before returning a timeout status.
Default Response Status — one-way only; the status code returned after publishing to the bus. Defaults to
202 Accepted.Response Status From Message — two-way only; an optional expression letting the matching response message specify the HTTP status (e.g.
{{Promoted.Response.status_code}}). Defaults to 200.Authentication — required when the endpoint is not anonymous; picker filtered to API Authentication objects in the same Application.
URL Template — required; absolute URL with optional template tokens for variables, message properties, and xPath expressions.
Request Headers — optional; one row per header. Values are templatable. The Authorization header is owned by the Authentication.
Request Body — optional; raw body or templated payload. Ignored for methods that do not carry a body.
Content-Type — optional shortcut; sets the Content-Type header without typing it in the Headers list.
Timeout (seconds) — optional; per-request timeout.
Follow Redirects — optional toggle; default off.
Authentication — required when the endpoint requires credentials; picker filtered to API Authentication objects in the same Application.
That is the API adapter
HTTP transport, one adapter, two product objects. API Listener accepts, API Caller dispatches. Two-way correlation on the receive side via Response Subscription Expression; two-way payload return on the send side. Back to Adapters.