Use datasets in Postman

View as Markdown

Datasets are available on Postman Solo, Team, and Enterprise plans. For more information, see the pricing page.

After you create a dataset, you can use it across your API workflows in Postman. You can run data-driven collection tests, power dynamic mock server responses, validate API responses in scripts, and reference datasets, sources, and views by ID in your requests and Flows. Datasets enable you to reuse the same data across workflows and work with consistent, queryable data instead of duplicating or hardcoding values.

Datasets can be backed by local or cloud data files or live data sources such as databases. Views enable you to filter, transform, and subset that data for specific scenarios. This enables you to test against current data, target specific test cases, and control the data used by collection runs, scripts, and mock servers.

To connect to a database or file and query it interactively, without saving it as a dataset, use a data request.

Use datasets in collection runs

You can use datasets as iteration data when manually running a collection. Each row returned by the selected view becomes an iteration in the collection run, allowing the same requests to run with different inputs. Views enable you to control which data is used during a run, such as filtering a large dataset to a specific set of test scenarios.

To run a collection with a dataset, see Use a dataset with a collection run. That page covers selecting a dataset and view, controlling how many iterations run, and accessing iteration data in your requests and scripts.

You can also use datasets with monitors and performance tests.

Use datasets in mock servers

You can use a dataset to power dynamic mock responses instead of returning static data. To query a dataset in a mock with pm.datasets, see Query datasets in scripts. Learn more about mock servers.

Query datasets

To shape and retrieve the data in a dataset, query it with SQL views or from your scripts: