Skip to content

Cheat sheet

Everything on this page is verified against the parser. If a key isn’t here, it probably isn’t real — see what doesn’t exist.

GoalDo this
Reference an ID from an earlier response{{<resource>.<extracted_name>}}
Reference a specific one of many{{<resource>[1].<name>}} — 1-indexed
Reference an actor’s token{{<actor>.<var>}}, usually in inject.headers
Set the API hostbaseUrl in the environment — camelCase, it’s magic
Generate a unique value per request{{$.uuid}}
Generate a timestamp{{$.now}}, or {{$.now + 24h}}
Keep a password out of the repopassword: !secret MY_PASSWORD
Read a CI environment variable{{$.env.CI_TOKEN}}
Make an operation public (no auth)Omit actor:
Declare a prerequisite that returns no valuedepends_on: [other.op]
Send a form bodybody_form: instead of body:
Upload a filebody_form: { field: "@./path.png" }
Accept more than one statusexpect_status: [200, 204]
Check the response bodyassert: — must be a sequence
Poll an async endpointpoll_until: + expect_status: [202, 200]
Run once per item in a listextract with $.data[*].id, then for_each: { over: <res> }
Force a step to re-runforce: true
Validate without sending requestsreqloom lint
Run against stagingreqloom run <op> --env staging
Override one variable for one runreqloom run <op> --var key=value
Get machine-readable results--format json or --format junit
Write results to a file--output results.xml
resources:
order: # resource id — or `name:` in its own file
operations:
create: # → operation id `order.create`
method: POST # default GET
path: /api/v1/orders # appended to baseUrl
actor: customer # who runs it
headers: { X-Foo: bar }
query_params: { limit: "20" } # NOT `query:` or `params:`
body: # map/list → JSON; scalar → verbatim
total: 100
body_form: { a: "1" } # form-encoded or multipart
expect_status: 201 # or [201, 200]
depends_on: [cart.add_item] # must be a sequence
extract:
order_id: $.data.id
assert:
- "$.data.total > 0"
timeout: 30000 # milliseconds, bare integer
retry: { max: 3, backoff: 500 } # backoff in ms
force: false
pre_request: ./hooks/sign.js
post_response: ./hooks/log.js
Path shapeReads
$.data.idJSON body (default)
$.headers.LocationA response header
$.cookies.sessionA cookie
$.status_codeThe status code
$.data[*].idA list → one resource instance per match

XPath and regex need the explicit form:

extract:
title:
path: "//book/title"
source: xpath
order_ref:
path: "ref-([0-9]+)"
source: regex

simple chain basic api_key oauth2_client_credentials oauth2_password oauth1 aws_sigv4 bearer jwt mtls

actors/vendor.yaml
name: vendor
auth:
strategy: simple
method: POST
path: /api/v1/auth/login
body:
email: "{{env.vendor_email}}"
password: "{{env.vendor_password}}"
expect_status: 200
extract:
token: $.data.accessToken
session:
ttl: 15m
inject:
headers:
Authorization: "Bearer {{vendor.token}}"

See auth strategies for the keys each one takes.

Terminal window
reqloom run <resource.operation> [--project P] [--env E] [--var K=V]
[--format text|json|junit] [--output F] [--quiet]
reqloom lint [--project P]
reqloom import <spec> [--out D] [--project-root D] [--force]

Exit codes: 0 pass · 1 failure · 2 bad arguments · 3 crash.

The positional argument comes first — reqloom run order.create --env staging, never reqloom run --env staging order.create.

These produce no error. They are the most common reason a schema “doesn’t work” while linting clean:

MistakeWhat happens
Missing imports: in a multi-file projectEvery file ignored; 0 resources, exit 0
File outside actors/ resources/ environments/Loaded, then discarded
Misspelled key (expect_stats:)Ignored entirely
Unknown method:Becomes GET
Unknown auth.strategyBecomes simple
assert: written as a mapIgnored — assertions never run
depends_on: written as a scalarIgnored — no dependency
for_each: without over:Whole block dropped
Malformed session.ttlBecomes 15m
Malformed connect_timeoutBecomes 5s
--env naming a missing environmentRuns with zero variables
Typo in an extracted namePasses lint, fails at run with E_VAR_UNRESOLVED

Full detail in common pitfalls.

Frequently assumed, never implemented:

Not realUse instead
--dry-run on runreqloom lint — it dry-runs every operation
--versionNot implemented; check the release you downloaded
url: on an operationbaseUrl + path:
query: / params:query_params:
environments: (plural) root keyenvironment: plus imports: of environments/*.yaml
secrets: blockThe !secret tag on an environment variable
$.random, $.timestamp, $.date{{$.uuid}}, {{$.now}}
{{$var}}{{$.var}} — the dot is required
Resource-level base_path / headers / actorRepeat per operation
for_each alias or limitOnly over and continue_on_error
retry.max_backoffFixed at 30s
Duration strings for timeout / retry.backoffBare milliseconds
lint --format / lint --helpText output only; reqloom --help