Skip to content

How to replay a captured API

After scout discovers a reusable seam, worker replays it directly over HTTP.

Terminal window
curl -X POST $UNSURF_URL/tools/worker \
-H "Content-Type: application/json" \
-d '{
"pathId": "your-path-id",
"data": { "query": "jane" }
}'

Choose worker when:

  • you already know the seam
  • the browser does not add value for this repeat operation
  • you want millisecond-scale direct calls instead of a fresh UI walk

Choose the browser runtime when:

  • the user session itself matters
  • the action is visual or interaction-heavy
  • you want a reviewable recorded proof

Worker can receive explicit request headers:

{
"pathId": "path_abc",
"headers": {
"Authorization": "Bearer ...",
"Cookie": "session=..."
}
}

That is useful for programmatic integrations. It is not a replacement for the local “browser is the auth” path when you are acting inside the user’s existing live session.

If the API moved or response shape changed, call heal.