Loading…
Loading…
Use the generic HTTP receiver to ingest traffic logs from any API gateway or edge device. Learn the JSON envelope format, authentication, and validation.
The generic HTTP receiver provides a vendor-neutral ingest path for traffic-driven discovery. It allows any API gateway, load balancer, or edge appliance capable of emitting HTTP traffic logs to send that data to the platform. This "bring-your-own-gateway" approach complements the dedicated, vendor-specific connectors.
The receiver exposes a single HTTP endpoint that accepts transaction data in a standardized JSON format. Once ingested, this traffic data flows into the same downstream pipeline as data from dedicated connectors. It is processed by the same aggregation, discovery, and learned example generation systems.
This component is ideal for integrating traffic sources for which no dedicated connector exists. It can be deployed as a public-facing service or as a local container within a private network, similar to the deployment pattern for dedicated connector relays.
The data flow begins when an API publisher's edge device sends an HTTP POST request containing a JSON envelope for each transaction to the /ingest/v1/generic/traffic endpoint.
The receiver is designed for high-volume, reliable ingestion and follows these steps for each received event:
200 OK is returned to the client to prevent retries of a malformed event.event_id has been seen before. Duplicates are acknowledged and discarded to prevent double-counting.timestamp_iso. Events older than 24 hours are considered stale, acknowledged, and silently dropped.This process ensures that misbehaving senders do not retry indefinitely and that no valid record is silently lost.
The following diagram illustrates the ingestion flow and decision logic:
flowchart TD
A[API Publisher Edge] -- "POST JSON Envelope" --> B(Ingest Endpoint);
subgraph "Receiver Processing"
B --> C{Validate & Parse};
C -- "Valid" --> D{Is event_id a duplicate?};
C -- "Invalid" --> G[Write to Dead-Letter Queue];
D -- "No" --> E{Is timestamp > 24h old?};
D -- "Yes" --> H[Acknowledge Duplicate];
E -- "No" --> F[Write to Unified Log Table];
E -- "Yes" --> H;
end
subgraph "Downstream"
F --> I[Aggregation & Discovery];
end
subgraph "Response to Caller"
G -- "Prevents retry" --> R1[Return 200 OK];
H -- "Prevents retry" --> R1;
F -- "Success" --> R1;
B -- "Oversized Payload" --> R2[Return S2R-INGEST-0413];
B -- "Internal Server Error" --> R3[Return S2R-INGEST-0500];
endThe receiver exposes a single endpoint for ingesting all traffic data.
POST /ingest/v1/generic/trafficThis endpoint accepts a single traffic event formatted as a JSON envelope.
Requests must be authenticated using HTTP Basic authentication. The credential is set at deploy time.
WARNING
A no-authentication mode exists for initial smoke testing only. It generates a prominent warning at startup and must not be used in production deployments.
For edge devices that emit logs in a native format rather than the canonical JSON envelope, you can specify a per-vendor parser to normalize the data. The receiver will route the raw request body through the specified parser.
Select a parser using one of the following methods:
X-S2R-Vendor: <gateway_type>?parser=<gateway_type>The X-S2R-Vendor header takes precedence if both are provided. If neither is present, the receiver assumes the request body is already in the canonical JSON envelope format.
The recognized gateway_type values are: f5, datapower, citrix_netscaler, haproxy, nginx, kemp, a10, radware, layer7, oracle-oag, webmethods, akana, tibco_mashery, and generic. Use generic when sending the canonical envelope directly or when no other type fits.
200 OK: The event was successfully accepted, or it was a malformed/duplicate/stale event that was handled and should not be retried.S2R-INGEST-0413: The request body is larger than the 30 MB limit.S2R-INGEST-0500: A genuine server-side error occurred (e.g., database is unreachable). The client should retry the request.IMPORTANT
The JSON envelope is a published, stable contract. The current version is "1".
All requests to the ingest endpoint must have a Content-Type of application/json and a body conforming to the following schema. The total POST body size is capped at 30 MB.
| Field | Type | Required | Description |
|---|---|---|---|
envelope_version | String | Yes | The version of the envelope schema. Must be "1". |
gateway_type | String | Yes | The type of gateway that generated the event. See the list of recognized values under "Vendor-Specific Parsers". Use generic if no other value applies. |
event_id | String | Yes | A unique transaction or correlation ID from the source system. Used for deduplication. Maximum 128 characters. |
timestamp_iso | String | Yes | The event timestamp in RFC 3339 format (e.g., 2026-05-25T08:00:00Z). Events older than 24 hours are silently dropped. |
frontend_uri | String | Yes | The full request URI as seen by the API consumer. Maximum 2048 characters. |
backend_uri | String | Yes | The resolved backend URL the gateway routed the request to. Maximum 2048 characters. |
client_ip | String | Yes | The original API consumer's IP address. Must be a valid IP address. |
gateway_client_ip | String | Yes | The immediate-hop IP address that connected to the gateway. Must be a valid IP address. |
front_virtual_server | String | Yes | The name of the front-end virtual server or service that handled the request. Maximum 512 characters. |
http_method | String | Yes | The HTTP request method. Allowed values: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD. |
http_status | Integer | Yes | The HTTP status code returned to the client (100-599). |
latency_ms | Integer | Yes | The total transaction latency in milliseconds. Must be ≥ 0. |
back_virtual_server | String | No | The name of the backend pool or service that handled the request. |
request_payload | String | No | The full request body, encoded in Base64. The decoded size must not exceed 30 MB. |
response_payload | String | No | The full response body, encoded in Base64. The decoded size must not exceed 30 MB. |
request_headers | Object | No | A JSON object of request headers, where keys are header names and values are header values. |
response_headers | Object | No | A JSON object of response headers, where keys are header names and values are header values. |
tls_version | String | No | The TLS version used for the client connection. |
cipher_suite | String | No | The cipher suite used for the client connection. |
correlation_id | String | No | An additional correlation key, if one exists that is distinct from event_id. |
vendor_extensions | Object | No | A JSON object for any vendor-specific metadata not covered by the canonical fields. The serialized object must not exceed 64 KB. |
The following is an example of a minimal valid JSON envelope.
{
"envelope_version": "1",
"gateway_type": "generic",
"event_id": "tx-2026-05-25-0001",
"timestamp_iso": "2026-05-25T08:00:00Z",
"frontend_uri": "/SoapService/services/Charge",
"backend_uri": "http://<BACKEND_IP>:9080/SoapService/services/Charge",
"client_ip": "<CLIENT_IP>",
"gateway_client_ip": "<GATEWAY_HOP_IP>",
"front_virtual_server": "soap-vip-payments",
"http_method": "POST",
"http_status": 200,
"latency_ms": 42
}
The receiver is designed to be resilient and provide clear feedback to both clients and operators.
| Condition | Trigger | Receiver Behavior | Client Action |
|---|---|---|---|
| Invalid Envelope | The JSON payload has missing required fields, incorrect data types, or other schema violations. | All validation errors are collected. The raw request body and errors are written to the dead-letter queue (DLQ). A 200 OK is returned. | Do not retry. Fix the envelope generation logic. Monitor the DLQ volume for systemic issues. |
| Duplicate Event | An event with a previously seen event_id is received. | The event is acknowledged and discarded without being written to the log table. A 200 OK is returned. | Do not retry. This is expected behavior and prevents data duplication. |
| Stale Event | An event with a timestamp_iso older than 24 hours is received. | The event is silently dropped. A 200 OK is returned. | Do not retry. The event is considered too old to be relevant for discovery. |
| Oversized Payload | The total size of the POST request body exceeds 30 MB. | The request is rejected immediately. | The client receives an S2R-INGEST-0413 response. Reduce payload size or investigate why it is so large. |
| Internal Server Error | The receiver encounters a problem preventing it from processing the request (e.g., database connection failure). | The error is logged internally. | The client receives an S2R-INGEST-0500 response. Retry the request after a backoff period. |