Export a folder as a curl script for runbooks and bug reports
Sometimes the best format for a request is the oldest one: a curl command. An on-call runbook, a bug report for another team, a support engineer on a locked-down server, a vendor who asks "can you send me the exact request?". Requestarium can export a whole folder as curl commands, one per request.
Export a folder
requestarium export "Orders API" --folder "Runbook" --format curl > runbook.shEach request in the folder becomes one curl command, with its method, URL, headers and body. In the app, Export as… on a folder offers the same format.
What a curl command can't hold, such as scripts and tests, is left out, with a warning: line on stderr for each.
Variables and secrets
Requests that use {{baseUrl}} and {{apiToken}} export with those placeholders. That's what you want in a file that will be pasted into a wiki or a ticket. Turn them into shell variables with one sed:
sed -E 's/\{\{([A-Za-z0-9_]+)\}\}/${\1}/g' runbook.sh > runbook.env.shThen the reader sets them and runs:
export baseUrl=https://api.example.com apiToken=…
sh runbook.env.shA literal token pasted into a request ends up in the export as is. Check the file before you share it, and move such values into secret variables in the collection.
A runbook folder
Make the folder worth exporting. For an on-call runbook:
Runbook/
Health check
Get order (by id)
Retry failed payment
Rebuild search index
Clear user sessionsEach request with a short doc line (shown in the app, and kept next to the export in your wiki): when to use it, what it changes, how to tell it worked.
The same folder runs from the CLI with tests and reports when you have Requestarium at hand:
requestarium run "Orders API/Runbook/Health check" --env Productionand is a plain script when you don't.
One request
For a single request, you don't need an export:
- In the app, the code snippet panel shows the request as curl, and in other languages (see generate code from a request).
- In a terminal:
requestarium snippet "Get order" --lang curl.
Other formats for other tools
--format http writes a .http file for VS Code REST Client and JetBrains HTTP Client, which keeps the requests editable in an IDE. --format postman, insomnia and bruno hand a folder to someone on another API client. See export to Postman, Insomnia or Bruno.