Replay Log Entry

POST /v1/traffic/logs/{id}/replay

Re-fire a previously-logged request against the same endpoint. The platform reconstructs the original request from the log (method, path, headers, body sample) and sends it through the same routing path again. The replayed request is itself logged — the response includes the new log ID for follow-up analysis.

Use cases:

  • Reproducing an upstream failure after deploying a fix.
  • Walking through a CORS / auth issue with the agent's logs side-by-side.
  • Testing the impact of a new traffic policy.

Idempotency is the caller's responsibility — replaying a POST /v1/payments/charge may double-charge. Limit replays to read-only operations or coordinate with the upstream first.

Path parameters

id string Req
Log entry ID.

Request body

Optional — send an empty body or {} to replay the stored request unchanged.

method string
Optional. Override the HTTP method.
url string
Optional. Override the request path + query. The scheme/host are always forced to the tunnel's public URL (SSRF protection), so any host you pass is ignored.
headers object
Optional. Header name → value overrides.
body string
Optional. Override the request body.
timeout int
Optional. Replay timeout in seconds. Defaults to 30.
replay_type string
Optional. original forces the stored request data and ignores any override fields above. Any other value is a modified replay and applies your overrides.

Modified replays are plan-gated: any replay_type other than original requires the replay_with_modification entitlement (403 Forbidden without it). Replaying the stored request unchanged is available to all traffic_inspector holders.

Response (200 OK)

replayed boolean
Always true on success (the request reached the agent). For replay-failed cases the call returns a 4xx/5xx error directly.
new_log_id string
The new log entry ID for the replayed request. Use GET /v1/traffic/logs/{id} to inspect.
status int
HTTP status of the replayed request.
duration_ms int
How long the replayed request took.

Errors

401 Unauthorized
Missing auth.
403 Forbidden
Plan doesn't include traffic_inspector, or a modified replay (replay_typeoriginal) was requested without the replay_with_modification entitlement.
404 Not Found
Log doesn't exist or its body sample was truncated to nothing (can't reconstruct).
502 Bad Gateway
Endpoint has no agent connected — replay can't be delivered.
Request
curl -X POST "https://api.ngris.com/v1/traffic/logs/log-abc-123/replay" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") result = client.traffic.replay_log("log-abc-123") print(f"Replayed → {result['status']} in {result['duration_ms']}ms") print(f"New log: {result['new_log_id']}")
Response — 200 OK
{ "replayed": true, "new_log_id": "log-def-456", "status": 200, "duration_ms": 47 }
On this page
Replay Log Entry
Iris