Collection exports and API description
Every catalogue example (see Route catalogue) is available as
a ready-made collection for the usual API clients, grouped by category. WebSocket
endpoints and examples that never end (live feeds) are left out, because plain
HTTP clients cannot run them. Some examples contain placeholders such as
<access_token> or <from-step-1> where a value from an earlier response belongs.
| Route | Format | Base URL setting |
|---|---|---|
/export/postman.json | Postman collection v2.1 (download) | collection variable base_url |
/export/insomnia.json | Insomnia export v4 (download) | environment variable base_url |
/export/bruno.json | Bruno collection (download) | base_url |
/export/curl.sh | Bash script of curl commands | BASE_URL=... bash rustybin-curl.sh |
/export/requests.http | VS Code REST Client / JetBrains HTTP Client | @base_url at the top |
/export/requests.hurl | Hurl file (asserts only HTTP *) | hurl --variable base_url=... |
/export/k6.js | k6 script (one iteration, checks that each request got a response) | BASE_URL=... k6 run rustybin-k6.js |
/export/har.json | HAR 1.2 archive | absolute URLs on the base URL |
The base URL written into every format is the origin the export was downloaded
from: the scheme of the listener (https on the HTTPS port), the Host header,
and, with RUSTYBIN_TRUST_FORWARD=true, the Forwarded / X-Forwarded-Proto /
X-Forwarded-Host / X-Forwarded-Port headers of your proxy. Download an export
through your gateway and it already points at the gateway.
GET {{base_url}}/export/postman.json
HTTP 200
[Asserts]
jsonpath "$.info.schema" contains "v2.1.0"
jsonpath "$.variable[0].key" == "base_url"
jsonpath "$.variable[0].value" == "{{base_url}}"
To target another URL, pass ?base_url= (an absolute http or https URL, with an
optional path prefix such as https://gateway.example.com/rustybin; no credentials,
query or fragment). Anything else is a 400 with a JSON error. You can still change
the variable after importing.
GET {{base_url}}/export/postman.json?base_url=https://gateway.example.com/rustybin
HTTP 200
[Asserts]
jsonpath "$.variable[0].value" == "https://gateway.example.com/rustybin"
GET {{base_url}}/export/curl.sh?base_url=not-a-url
HTTP 400
[Asserts]
jsonpath "$.error" == "invalid base_url"
GET {{base_url}}/export/insomnia.json
HTTP 200
[Asserts]
jsonpath "$.__export_format" == 4
GET {{base_url}}/export/bruno.json
HTTP 200
GET {{base_url}}/export/curl.sh
HTTP 200
[Asserts]
body startsWith "#!"
GET {{base_url}}/export/requests.http
HTTP 200
GET {{base_url}}/export/requests.hurl
HTTP 200
[Asserts]
body contains "HTTP"
GET {{base_url}}/export/k6.js
HTTP 200
[Asserts]
body contains "k6/http"
GET {{base_url}}/export/har.json
HTTP 200
[Asserts]
jsonpath "$.log.version" == "1.2"
OpenAPI
/openapi.json and /openapi.yaml describe the HTTP API (OpenAPI 3.0.3), and
/docs renders it as an interactive reference (the Scalar viewer, loaded from a CDN, so
/docs needs internet access unlike the web console). Import the spec into a gateway to
generate routes, or into a client generator. The landing page / lists every
endpoint with a runnable example.
GET {{base_url}}/openapi.json
HTTP 200
[Asserts]
jsonpath "$.openapi" == "3.0.3"
jsonpath "$.paths['/echo']" exists
jsonpath "$.paths['/mcp']" exists
GET {{base_url}}/openapi.yaml
HTTP 200
[Asserts]
body startsWith "openapi: 3.0.3"
GET {{base_url}}/docs
HTTP 200
[Asserts]
header "Content-Type" contains "text/html"
GET {{base_url}}/
HTTP 200
[Asserts]
header "Content-Type" contains "text/html"
body contains "/openapi.json"
The examples in this documentation (docs/examples/) are a more thorough,
assertion-checked alternative to the generated Hurl export.