Skip to content

Cookbooks

Choose a cookbook for the task you want to complete. Each page contains copyable examples, the inputs they need, and the result to expect.

Cookbook What you can do
Preparing requests Generate test data, validate inputs, and sign requests with pre scripts
Processing responses Transform values, find records, save tokens, and compose post scripts
Testing APIs Check contracts, sensitive fields, timestamps, individual records, and datasets
Chaining requests Reuse tokens, compare endpoints, verify idempotency and caching, and clean up resources

Copy request examples into .yml files in an initialized collection. Replace api.example.com and its fields with your API, and configure any named environment values. Examples that belong in settings.yml or folder.yml identify the file explicitly. Review scripts before running them: they can read selected-environment secrets and send HTTP requests. Keep secrets out of logs.

Use saved request fields and variables for static values, captures for direct extraction, and assertions for simple response checks. Scripting explains authoring and lifecycle; the Script API documents methods and limits.

The request lifecycle is substitution → pre → HTTP → captures → post → assertions → tests. All three script phases use the same inherited order: collection → outermost folder → nearest folder → request. Each block has isolated JavaScript locals; successful RunScope writes are visible to later blocks. See inheritance and upgrade notes.

The TUI Results tab shows script status, errors, and redacted logs. Human CLI output reports status and log count; --json includes the redacted scripts result group. See Inspect script results for details. Manual timeline entries retain bounded, redacted script diagnostics and logs. Script source, capture results, and RunScope values stay excluded, while successful request snapshots reflect prepared mutations. Automation does not create history.