Replay a request

Re-sends the captured request through the endpoint's actions and waits for the outcome. The attempt is recorded in the delivery history like any other. Requires an action to be switched on.

Duplicate protection. Pass guard=true to have the replay refused (409, code: already_delivered) when a chosen action already received this request or is still delivering it. Each chosen action's earlier delivery of this request is checked: a delivery still pending or retrying counts as in_progress, otherwise the latest success counts as delivered. Cancelled and dead-lettered deliveries never count, and an action with warnBeforeDuplicate: false is never checked. The refusal is all or nothing and lists each earlier delivery. To send anyway, repeat the call with allowDuplicates=true. Without guard the replay sends as it always has, and warnings names each action that already had the request.

By default the request goes to the switched-on actions that are included in replays (includeInReplays). Pass actionId or actionIds to choose: the other actions send nothing. Each must belong to this endpoint (an action of any other endpoint answers 404, the same as one that never existed) and be switched on (code: action_inactive otherwise).

POST
/api/v1/endpoints/{endpointId}/requests/{requestId}/replay
AuthorizationBearer <token>

API key in the Authorization header: Authorization: Bearer wv_live_…. Keys are created on the API keys page in the app, shown once, and scoped to your workspace. A key acts for the person who created it: each call needs the operation's scope (x-wv-scope) and is limited to what that person's role allows now. X-Api-Key: wv_live_… is accepted as a fallback for tools that can't set Authorization.

In: header

Path Parameters

endpointId*string

The endpoint id (also the capture token in its URL).

Formatuuid
requestId*integer

The captured request id.

Formatint64

Query Parameters

actionId?string

Optional. One action (from GET /api/v1/endpoints/:endpointId/actions) to replay the request through. Omit it (and actionIds) to replay to the switched-on actions that are included in replays.

Formatuuid
actionIds?array<>

Optional, repeated (?actionIds=a&actionIds=b). Several actions, merged with actionId; at most 50.

Itemsitems <= 50
guard?boolean

Refuse with 409 already_delivered instead of re-sending to an action that already has this request. Default false: send as before and report it in warnings.

Defaultfalse
allowDuplicates?boolean

With guard=true: send anyway. Pass it only after checking the 409's actions and deciding a repeat is acceptable for those receivers.

Defaultfalse

Header Parameters

Idempotency-Key?string

1 to 255 printable ASCII characters you choose, kept 24 hours per key. Sending the same request again with the same value returns the first answer (with Idempotent-Replayed: true) instead of running again. The same value with a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.

Lengthlength <= 255
Approval-Id?string

The approval a 202 approval_required answer gave. Send exactly the same request again (method, path, query and body) with this header once the person has approved: it runs once. Refusals: 404 approval_not_found, 409 approval_pending, approval_declined, approval_expired or approval_used, 422 approval_mismatch (a different request), 412 version_mismatch (the target changed after the approval was asked), 409 reach_changed (the change now reaches more than the person approved).

Formatuuid

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{
  "state": "string",
  "statusCode": 0,
  "error": "string",
  "url": "string",
  "durationMs": 0,
  "delivered": true,
  "results": [
    {
      "actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",
      "name": "string",
      "kind": "forward",
      "state": "string",
      "statusCode": 0,
      "error": "string",
      "delivered": true
    }
  ],
  "warnings": [
    {
      "actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",
      "name": "string",
      "kind": "forward",
      "target": "string",
      "state": "delivered",
      "lastDeliveredAt": "2019-08-24T14:15:22Z",
      "statusCode": 0,
      "responseCheck": "passed",
      "attempt": 0,
      "nextAttemptAt": "2019-08-24T14:15:22Z",
      "jobId": 0,
      "requestId": 0,
      "previousTarget": "string",
      "code": "already_delivered",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string",
  "actions": [
    {
      "actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",
      "name": "string",
      "kind": "forward",
      "target": "string",
      "state": "delivered",
      "lastDeliveredAt": "2019-08-24T14:15:22Z",
      "statusCode": 0,
      "responseCheck": "passed",
      "attempt": 0,
      "nextAttemptAt": "2019-08-24T14:15:22Z",
      "jobId": 0,
      "requestId": 0,
      "previousTarget": "string"
    }
  ],
  "toProceed": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "traceId": "string"
}

On this page