Request

Stoobly Request CLI - Questions & Answers

The request CLI enables you to manage recorded HTTP requests, replay them, test responses, and work with request/response data. These commands help you work with individual requests outside of scenarios.


Listing Requests

Q: How do I view all recorded requests?

A: Use request list to display all recorded requests with pagination.

Example:

stoobly-agent request list

Q: How do I paginate through requests?

A: Use the --page and --size options to control pagination.

Example:

# Show first 10 requests (default)
stoobly-agent request list --page 0 --size 10

# Show next 20 requests
stoobly-agent request list --page 1 --size 20

# Show 50 requests per page
stoobly-agent request list --page 0 --size 50

Q: How do I filter requests by scenario?

A: Use the --scenario-key option to show only requests from a specific scenario.

Example:

Q: How do I search for specific requests?

A: Use the --search option to filter requests by URL path or other criteria.

Example:

Q: How do I sort requests?

A: Use --sort-by and --sort-order options to control sorting.

Example:

Q: How do I format the request list output?

A: Use the --format option to change output format (table, json, csv).

Example:

Q: How do I select specific columns to display?

A: Use the --select option to choose which columns to show.

Example:

Q: How do I hide column headers?

A: Use the --without-headers flag to disable column headers.

Example:

Q: How do I export requests to a file?

A: Use format options and shell redirection to export requests.

Example:


Replaying Requests

Q: How do I replay a recorded request?

A: Use request replay with the request key to re-execute a recorded request.

Example:

Q: How do I replay a request to a different host?

A: Use the --host option to override the request host.

Example:

Q: How do I replay a request with a different scheme (HTTP/HTTPS)?

A: Use the --scheme option to change the protocol.

Example:

Q: How do I replay a request and record the new response?

A: Use the --record flag to capture the replayed response.

Example:

Q: How do I replay a request and overwrite the existing response?

A: Use the --overwrite flag to replace the stored response (local mode only).

Example:

Q: How do I replay a request to a specific scenario?

A: Use the --scenario-key option to record the replay into a scenario.

Example:

Q: How do I format the replay response output?

A: Use the --format option to control response display.

Example:

Q: How do I replay a request with custom lifecycle hooks?

A: Use the --lifecycle-hooks-path option to apply custom processing.

Example:

Q: How do I increase logging verbosity when replaying?

A: Use the --log-level option to see more details.

Example:


Working with Aliases (Remote Features)

Q: How do I replay a request with assigned alias values?

A: Use the --assign option to set alias values before replay.

Example:

Q: How do I validate alias values during replay?

A: Use the --validate option to specify validation rules for aliases.

Example:

Q: How do I control alias resolution strategy?

A: Use the --alias-resolve-strategy option to specify how aliases are resolved.

Example:

Q: How do I repeat a request replay for each alias value?

A: Use the --group-by option to iterate over alias values.

Example:

Q: How do I use an existing trace for replay?

A: Use the --trace-id option to leverage a previous trace.

Example:


Snapshots and Version Control

Q: How do I create a snapshot of a request?

A: Use request snapshot to create a committable file for the request (local mode only).

Example:

Q: How do I delete a request snapshot?

A: Use the --action delete option with snapshot command.

Example:

Q: How do I snapshot a request with decoded response body?

A: Use the --decode flag to decode the response body in the snapshot.

Example:

Q: How do I reset a request to its snapshot state?

A: Use request reset to restore a request from its snapshot.

Example:

Q: How do I force delete when resetting a request?

A: Use the --force flag to hard delete the request data.

Example:

Q: How do I share requests with my team via git?

A: Create snapshots and commit them to version control.

Example:


Managing Request Responses

Q: How do I view the response for a recorded request?

A: Use request response get to retrieve the stored response.

Example:

Q: How do I query specific properties in a response?

A: Use request response query with a query expression.

Example:

Q: How do I extract data from a response for scripting?

A: Combine response query with shell processing.

Example:


Deleting Requests

Q: How do I delete a recorded request?

A: Use request delete with the request key.

Example:

Q: How do I delete multiple requests?

A: Use a loop or script to delete requests in bulk.

Example:


Managing Intercepted Request Logs

Q: How do I view the intercepted requests log?

A: Use request log list to display all logged intercepted requests.

Example:

Q: How do I clear the intercepted requests log?

A: Use request log delete to truncate the log file.

Example:

Q: How do I enable request logging?

A: Use the --request-log-enable flag when starting the agent.

Example:

Q: How do I set the log level for intercepted requests?

A: Use the --request-log-level option when starting the agent.

Example:

Q: How do I prevent log truncation on startup?

A: Set --request-log-truncate to false when starting the agent.

Example:


Advanced Request Operations

Q: How do I replay multiple requests in sequence?

A: Use a loop or script to replay requests sequentially.

Example:

Q: How do I compare requests before and after changes?

A: Replay and record, then use snapshots to track changes.

Example:

Q: How do I chain requests with dependencies?

A: Use aliases and assign values from one request to another.

Example:

Q: How do I replay a request with custom headers?

A: Use lifecycle hooks to modify request headers before replay.

Example:


Filtering and Formatting

Q: How do I create a custom report of requests?

A: Use format options and select specific fields for custom reporting.

Example:

Q: How do I find requests by method?

A: Use the search option or filter the output.

Example:


Working with Remote Projects

Q: How do I list requests from a remote project?

A: Use the --project-key option to specify the remote project (remote features).

Example:

Q: How do I test against a remote project's endpoint definitions?

A: Use the --remote-project-key option when testing.

Example:


Troubleshooting

Q: How do I debug a failing request replay?

A: Increase log level and use verbose output.

Example:

Q: How do I see the full request and response details?

A: Use JSON format and query specific fields.

Example:

Q: What do I do if a request key is not found?

A: List all requests to find the correct key.

Example:


Quick Reference

Q: What are the most common request commands?

A: Here's a quick reference of frequently used commands:

Example:


Last updated

Was this helpful?