External endpoints

For an external endpoint, the Snaplex that receives the request forwards it to a third party or to another Snaplex, and relays the response to the client. Refer to Request execution flow for more information.

Response streaming

A Snaplex passes an external endpoint's response to the client in one of two ways:

  • Buffered: reads the whole response body before replying.
  • Streaming: passes each part of the body to the client as the upstream sends it.

Streaming requires a Snaplex running 4.46 or higher; a Snaplex on an earlier build buffers every response. Response streaming applies to external endpoints. It doesn't change how a native endpoint returns the response from a Triggered or Ultra Task.

Streaming matters when the upstream produces its response over time. A client receives each token or event as the upstream sends it, so a long task such as an LLM completion doesn't leave the client waiting for the whole response or time out before it arrives. Streaming is what makes it practical to front Server-Sent Events (SSE) feeds, LLM and chat APIs, and MCP servers with an external endpoint.

A client asks the upstream for a stream in its request. A browser EventSource client or an MCP client sends an Accept: text/event-stream header; most LLM SDKs send "stream": true in the request body. The Snaplex forwards the request unchanged, so this exchange stays between the client and the upstream API. A request sending "stream": false gets a single JSON response instead.

The Snaplex then reads what the upstream returned. It streams the response when the upstream sends one of these content types with no Content-Length header:

  • text/event-stream (Server-Sent Events)
  • application/x-ndjson (newline-delimited JSON)
  • application/stream+json (an older name for newline-delimited JSON)
  • application/json-seq (JSON text sequences)

Any other content type, and any response that carries a Content-Length, takes the buffered path.

Some configurations need the whole body, so the Snaplex buffers the response even when the upstream streams it:

  • A Response Cache rule, which stores the complete response.
  • A response rule that reads the body, such as the Response Mapper rule.
  • An endpoint with REST to SOAP selected, which converts the response before replying.

When the Snaplex buffers, it reads the response body to its end before it replies, and holds the whole body in memory. A response that ends on its own still reaches the client complete, after the upstream finishes it. An upstream that doesn't end, such as an open-ended event feed, never reaches that point: the Snaplex sends the client nothing, so the client's connection sits idle until it times out, and the body the node holds keeps growing. An endpoint that fronts a feed like that can't use these rules. A rule that reads or sets headers alone, including the HTTP Retry rule and the Response Transformer rule, runs as usual and leaves streaming in place.

A stream has no time limit. The idle timeout on the client connection resets each time the Snaplex sends another part of the body, so a response that takes a long time to produce stays open while the upstream keeps sending. A proxy, load balancer, or ingress controller in front of the Snaplex can apply its own idle timeout and close a long stream before the upstream finishes. If streams are getting cut off, check the timeout values on the load balancer.

Each Snaplex node streams up to 10 responses at the same time by default. A streaming request that arrives while 10 streams are already open gets a 503 with the message "Too many streaming responses on this node, retry later". The client can retry, because a stream that finishes frees a slot. To raise the limit, consult your CSM.

Important: On a Snaplex running 4.46 or higher, an endpoint that fronts a streaming upstream starts streaming without any change to the endpoint or its rules. A streamed response arrives in parts and carries no Content-Length header. Before you upgrade, confirm that the clients calling these endpoints can parse a body that arrives in parts and don't require a Content-Length header.

DELETE requests

As of Snaplex build 4.45.2.0, the endpoint forwards the request body on DELETE requests to the upstream URL. Earlier builds drop the body, so a backend that needs it to identify the record rejects the call, often with 410 Gone.

The endpoint forwards the body only when the caller sends one. DELETE requests sent without a body are unchanged.

To work around the dropped body on an earlier Snaplex build, pass the record ID in the URL path or query string, which works only if the backend reads the ID from there instead of from the body. You can also send a POST with a method-override header such as X-HTTP-Method-Override: DELETE, but only if you add POST to the methods on the path that handles the request and the backend acts on the header. SnapLogic forwards the header and doesn't interpret it.

A retry resends a body of up to 10 MB by default. For what reaches the upstream when a retried DELETE request has a larger body, refer to Retry logic.

Fields and options

The following shows the fields available for external endpoints:


Add new external endpoint

Upstream URL

The upstream URL is the address the Snaplex forwards the request to. It can be a literal value or an expression. Refer to Path resolution to learn how APIM 3.0 resolves the upstream URL with the path values.

Options

  • Trust all certificates: The receiving Snaplex trusts all certificates supplied by the server for the external endpoint.
  • REST to SOAP: Exposes SOAP endpoints to clients through REST and translates SOAP responses to JSON. Refer to Wrap legacy SOAP APIs in a Service for more information

Configuration shared with native endpoints

Tags, Server overrides, paths, HTTP methods, and advanced routing rules work the same way for both endpoint types. For more details, refer to Endpoint configuration.

Related content