Postman quickstart
A Postman collection contains ready-to-use HTTP requests with example payloads and responses that developers can immediately test and explore in Postman. Each API definition generates one complete collection with all endpoints organized into folders.
Generate a Postman collection by following the instructions on this page.
This page assumes that you have an initialized fern
folder on your local
machine. See Set up the fern
folder.
Pass fern check
Run fern check
to ensure that your API definition is valid. If there are any errors,
fix them before proceeding.
If you’re using an OpenAPI Specification, check out all of our supported extensions.
Add the Postman generator
Run the following command to add the Postman generator to generators.yml
:
postman
is the name of the generators.yml
group that configures your Postman collection’s output location and other metadata. You can customize this group name to differentiate between multiple collections if you have multiple APIs in your organization.
This command adds the following group
to generators.yml
:
Generate the collection
Run the following command:
If you have multiple APIs, use the --api
flag to specify the API you want to generate:
This creates a Postman collection on Fern’s cloud. Once complete, you’ll see a collection.json
: