Skip to content

Export

Export a folder, or the whole workspace, to share it with people who use other tools.

  • Right-click a folder → Export as Postman collection… or Export as OpenAPI…
  • For the whole workspace, use the same commands from the command palette.
  • For HTML docs, see HTML docs.
  • Folders and requests, in sidebar order.
  • Bodies: raw, URL-encoded and GraphQL.
  • Auth: Bearer and Basic from the header, the # @auth kinds, and folder auth.
  • Descriptions, and $shared as collection variables.
  • # @assert checks become pm.test(…) lines. Scripts are included commented out, since the APIs differ.
  • WebSocket and gRPC requests aren’t part of Postman’s format, so they’re skipped with a note.

YAML when the file name ends in .yaml or .yml, JSON otherwise.

  • One operation per method and path, with top-level folders as tags.
  • Servers from the request URLs, with variables filled from the environment and folder variables. Secrets are left out.
  • Query, header and path parameters.
  • Request bodies with the example and an inferred schema.
  • Security schemes for the auth in use.
Terminal window
courier export --format postman -o api.postman_collection.json
courier export "02 Auth" --format openapi --env dev -o auth.openapi.yaml
courier export --format html -o docs.html

--env picks the environment whose public values fill {{variables}} in OpenAPI server URLs. Without -o, the export goes to standard output.