Loading…
Loading…
Ingest traffic logs from any HTTP-capable gateway or load balancer using a generic REST endpoint. Learn the JSON envelope format and how to send data.
The Generic HTTP Receiver provides a vendor-neutral ingest path for traffic logs. It allows any edge device capable of sending HTTP requests—such as a gateway, load balancer, application server, or appliance—to feed traffic data into the platform for discovery. This "bring-your-own-gateway" approach complements the dedicated, vendor-specific connectors.
The receiver exposes a single REST endpoint that accepts a standardized JSON payload. Once ingested, this traffic data flows through the same downstream pipeline as data from dedicated connectors. It is processed, aggregated into discovery tables, and used to generate learned examples of API behavior.
This component is ideal for API publishers whose edge infrastructure is not covered by a dedicated connector but can export traffic logs over HTTP.
The receiver operates by accepting HTTP POST requests containing traffic data at a single endpoint. The data can be sent in a canonical JSON format or a supported vendor-native format, which the receiver then normalizes.
The processing flow is as follows:
X-S2R-Vendor header or a parser query parameter) to determine if a specific parser is needed. If no hint is present, it expects the request body to be in the canonical JSON envelope format.event_id for duplicates, and verifies the timestamp_iso is not older than 24 hours.Invalid, duplicate, or stale events are handled gracefully to prevent senders from retrying indefinitely. See the Error Handling and Validation section for details.
flowchart TD
A[API Publisher's Gateway] -- HTTP POST --> B{Generic HTTP Receiver};
subgraph "Platform"
B -- "1. Authenticate & Parse" --> C{Validate & Deduplicate};
C -- "Valid Event" --> D[Traffic Log Storage];
C -- "Invalid/Stale/Duplicate Event" --> E[Acknowledge with 200 OK];
D -- "Flows to" --> F[Downstream Discovery Pipeline];
endThe receiver exposes one endpoint for ingesting traffic data.
POST /ingest/v1/generic/traffic
This endpoint accepts a single traffic event per request. The event can be sent directly as the canonical JSON envelope or as a vendor-native log format that the receiver can parse.
Requests must be authenticated using HTTP Basic authentication. The credential is set at deploy time. The receiver performs a constant-time comparison of the provided credential.
NOTE
A no-authentication mode exists for initial smoke testing only and logs a prominent warning at startup. Production deployments must configure a credential.
| Location | Name | Type | Description |
|---|---|---|---|
| Header | Content-Type | String | Must be application/json when sending the canonical envelope. |
| Header | X-S2R-Vendor | String | Optional. Specifies the vendor-specific parser to use. Takes precedence over the parser query parameter. See Vendor-Specific Parsers. |
| Query | parser | String | Optional. Specifies the vendor-specific parser to use. See Vendor-Specific Parsers. |
| Body | - | JSON Object | The traffic data. See JSON Envelope Format for the required structure. The total POST body size is capped at 30 MB. |
| Status | Code | Description |
|---|---|---|
200 OK | - | The request was successfully processed. This response is returned for valid new events, detected duplicates, stale events, and events that failed validation and were sent to the dead-letter queue. This behavior prevents misbehaving senders from retrying indefinitely. |
413 Payload Too Large | S2R-INGEST-0413 | The request body exceeds the 30 MB limit. The sender should not retry the request with the same payload. |
500 Internal Server Error | S2R-INGEST-0500 | A server-side error occurred (e.g., the database was unreachable). The sender should retry the request. |
When not using a vendor-specific parser, the body of the POST request must be a JSON object conforming to the canonical envelope format.
IMPORTANT
The envelope structure is a published, stable contract. The current version is "1".
| Field | Required | Type | Description |
|---|---|---|---|
envelope_version | Yes | String | The version of the envelope schema. Must be "1". |
gateway_type | Yes | String | An identifier for the gateway that generated the log. Use generic if no other value fits. See the list of recognized values below. |
event_id | Yes | String | A unique transaction or correlation ID from the source system. Used for deduplication. Maximum 128 characters. |
timestamp_iso | Yes | String | The event timestamp in RFC 3339 format (e.g., YYYY-MM-DDTHH:MM:SSZ). Events older than 24 hours are silently dropped. |
frontend_uri | Yes | String | The request URI as seen by the API consumer. Maximum 2048 characters. |
backend_uri | Yes | String | The resolved backend URL that the gateway routed the request to. Maximum 2048 characters. |
client_ip | Yes | String | The original IP address of the API consumer. Must be a valid IP address. |
gateway_client_ip | Yes | String | The IP address of the immediate hop that connected to the gateway (e.g., another proxy or the client itself). Must be a valid IP address. |
front_virtual_server | Yes | String | The name of the front-end virtual server or service that handled the request. Maximum 512 characters. |
http_method | Yes | String | The HTTP request method. Supported values: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD. |
http_status | Yes | Integer | The HTTP status code returned to the client (100–599). |
latency_ms | Yes | Integer | The total transaction latency in milliseconds (must be ≥ 0). |
back_virtual_server | No | String | The name of the backend pool or service that handled the request. |
request_payload | No | String | The request body, encoded in Base64. The decoded size must be ≤ 30 MB. |
response_payload | No | String | The response body, encoded in Base64. The decoded size must be ≤ 30 MB. |
request_headers | No | JSON Object | A key-value map of request headers. |
response_headers | No | JSON Object | A key-value map of response headers. |
tls_version | No | String | The TLS version used for the client connection. |
cipher_suite | No | String | The cipher suite used for the client connection. |
correlation_id | No | String | An additional correlation key, if it is distinct from event_id. |
vendor_extensions | No | JSON Object | A container for any vendor-specific metadata. The serialized object must be ≤ 64 KB. |
gateway_type ValuesThe gateway_type field should be one of the following recognized strings: f5, datapower, citrix_netscaler, haproxy, nginx, kemp, a10, radware, layer7, oracle-oag, webmethods, akana, tibco_mashery, or generic.
{
"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_HOST_AND_PORT>/SoapService/services/Charge",
"client_ip": "<CLIENT_IP>",
"gateway_client_ip": "<GATEWAY_IP>",
"front_virtual_server": "soap-vip-payments",
"http_method": "POST",
"http_status": 200,
"latency_ms": 42
}
For edge devices that emit logs in a native format (e.g., syslog or a vendor-specific JSON structure), the receiver can automatically parse the raw body into the canonical envelope. This avoids the need for the sending system to perform the transformation itself.
To select a parser, provide one of the following hints in the request:
X-S2R-Vendor: <gateway_type> (HTTP Header, takes priority)?parser=<gateway_type> (URL Query Parameter)The <gateway_type> value must be one of the supported parser types. If no hint is provided, the receiver assumes the request body is already in the canonical JSON envelope format.
The platform includes built-in parsers for: DataPower, Citrix NetScaler, HAProxy, nginx, Kemp, A10, Radware, Layer7, webMethods, Akana, TIBCO Mashery, and Oracle OAG. An identity parser is also available for generic.
The receiver is designed to be resilient and provide clear feedback without causing cascading failures.
200 OK to the sender to prevent infinite retries of a malformed event.event_id is received, it is acknowledged with a 200 OK but is not processed again.timestamp_iso older than 24 hours are considered stale. They are silently dropped and the receiver returns 200 OK to signal completion to the sender.S2R-INGEST-0413 error.S2R-INGEST-0500 error. This signals to the sender that the error is transient and the request should be retried.The dead-letter queue preserves the raw body, detected format, parse error, and source IP for each failed event, and its volume is monitored to alert operators of potential sender issues.