A collection is the unit Postman organises work in: a folder tree of requests, each with its method, URL, headers, body and optional scripts, plus variables shared across them. Exported, it is a JSON file that another person, a CI job or Newman (Postman's command-line runner) can open and run.
Requests reference variables such as {{baseUrl}} and {{token}}, which come from an environment, so the same collection runs against local, staging and production. Test scripts attached to a request assert on its response and can set variables for the next one — capturing a token from a login, then using it in every later call.
That a collection is documentation. It records what someone once sent, not what the API accepts; a collection can be months out of date and still run green if nobody added the request that would fail. Generating it from the API's OpenAPI document keeps it honest.
Every docs page exports a Postman collection for that API, generated from the same definitions as its OpenAPI document. The workspace here works the same way: variables, captures and assertions per saved request.
All glossary terms · Testing techniques · All 39 mock REST APIs
Last updated