integrations

pollOutboundMessages

Changed on

Poll outbound messages for an integration's poll-mode use cases. Takes a lease on the head-of-line batch of the integration's FIFO stream: the returned messages stay invisible to subsequent polls until they are acknowledged or the visibility timeout elapses. POST because taking a lease mutates server state — auto-retrying middleware must not burn leases. One in-flight batch per stream: while a lease is active (or another poll wins the race), the response is an empty batch (messages: []), not an error. Each message's payload is the use case's JSONata transformation of the event when it has one (mapping_version identifies the transform), otherwise the raw event. Requires the integration:consume grant.

Ordering: messages are delivered in stream order, which follows the event time. An event that arrives after the consumer was already handed events with a later event time is not inserted behind them (it would never be delivered); it is appended at the end of the stream and a MSG_LATE_ARRIVAL warning is recorded. Delivery is at-least-once: a message whose lease expires is delivered again, and in rare races the same event can be delivered twice under different message ids, so consumers should deduplicate by event_id.

post/v1/integrations/{integrationId}/outbound/messages/poll

Request

  • Base URL
    https://integration-toolkit.sls.epilot.io
  • URL
    https://integration-toolkit.sls.epilot.io/v1/integrations/{integrationId}/outbound/messages/poll
  • Auth
    HTTP bearer

Path parameters

integrationIdstring uuid required

The integration ID

Request body

limitinteger

Maximum number of messages to lease in this batch. The ~5.5 MB response cap may truncate the batch earlier when payloads are large — the leased run shrinks accordingly.

Response

Leased batch of outbound messages (possibly empty)

visibility_timeout_secondsinteger required

Effective visibility timeout for this lease — a per-integration server-side setting (default 300 seconds)

has_moreboolean required

Whether more messages are available beyond this batch

Example response

{
  "messages": [
    {
      "mapping_version": "3f2a9c1b7d4e8f60"
    }
  ]
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status