Replay with the CLI
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
stoobly-agent request replay <REQUEST-KEY>
$ stoobly-agent request replay --help
Usage: stoobly-agent request replay [OPTIONS] REQUEST_KEY
Replay a request
Options:
--format [body|json] Format replay response.
--host TEXT Rewrite request host.
--lifecycle-hooks-script-path TEXT
Path to lifecycle hooks script.
--log-level [debug|info|warning|error]
Log levels can be "debug", "info",
"warning", or "error"
--overwrite Replay request and overwrite existing
response.
--record Replay request and record.
--save Replay request and save to history.
--scenario-key TEXT Record to scenario.
--scheme [http|https] Rewrite request scheme.
-h, --help Show this message and exit.
To replay a request and NOT save it anywhere, run the command with no flags:
$ stoobly-agent request replay REQUEST_KEY
This can be useful for replaying the request before doing any mutating operations to confirm the API changes are expected.
The --record
flag will replay the original request, but create an entirely new request:
$ stoobly-agent request replay --record REQUEST_KEY
This can be useful if you want to save the request to Stoobly and inspect it as a separate request in the UI. Please be aware that this will not allow you to update the original request with the new one since it is considered a different request altogether.
The --save
flag will replay the request and save it to the Replay History for that request:
$ stoobly-agent request replay --save REQUEST_KEY
This links the rerecording with the original request but won't change the response yet. This enables you to manually overwrite and update the response later.
To update a request immediately, use the --overwrite
flag which will do the same as the --save
flag AND also set the request's response to that latest replayed instance:
$ stoobly-agent request replay --overwrite REQUEST_KEY
This command option is the most convenient one because it replays, rerecords, and overwrites the response all in one go.