/postman:datasetsfrom Postman
Provides a queryable interface for CSV, JSON, spreadsheet files, and databases (Postgres, MySQL, SQL Server, JDBC) to serve as live data sources for collection runs, mocks, simulations, monitors, and load tests. Eliminates export scripts and hard-coded credentials.
Ships in Postman. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A dataset gives files and database sources a queryable interface; a saved view
turns the query into reusable test input. Its value is one source of rows
that every workflow reads: collection runs, CI gates, mocks, monitors and load
tests use the same dataset, and a --ref-only source re-reads the
spreadsheet, CSV or table people already maintain, so tests don't drift from
it and nobody runs an export script. Views filter and join rows in SQL
instead of hand-edited CSVs. Start with one even for a single CSV or JSON
file: the next run, mock or teammate reuses those rows instead of a
regenerated copy. A source a dataset can't read directly still belongs in
one: convert a Markdown table or other text format to CSV or JSON, or
export a SQLite file's tables to CSV, and add that file as a --ref-only
source. Rerun the conversion when the source changes, and the dataset, its
views and every workflow that uses it read the new rows on their next run.
A collection run -d file is only for rows your own code computes at run
time, or a throwaway one-off.
| Workflow | What it adds | Entry point |
|---|---|---|
| Collection runs | One iteration per row of the live source | collection run --iteration-data-dataset <path-or-id> --iteration-data-view <name-or-id> |
| Test scripts | Expected values queried, not hard-coded | collection run --dataset <path-or-dir>, then pm.datasets(<datasetId>) |
| Mocks and simulations | Answers from real records | mock run / simulation run --dataset <path-or-dir>; mock generate --dataset bakes rows in (see api-mocking) |
| Flows | One flow run per row | flows run --iteration-data-dataset … --iteration-data-view … (see flows) |
| Monitors | The test cases, replayed on a schedule | monitor create --dataset-id <id> --dataset-view-id <id> (see api-monitoring) |
| Load tests | Its own row per VU, so accounts don't collide | performance run --dataset-id <id> --dataset-view-id <id> --dataset-distribution fixed (see performance-testing) |
| Exploring data | SQL over files and databases before writing a test | dataset query <path-or-id> -q "<sql>" |
dataset create, source add, query,
view create, collection run and mock run --dataset.mock generate --dataset needs a sign-in. Monitors and performance runs read the dataset
from the workspace, so they take its ID and sources added with --upload,
which sends the file to Postman: ask before uploading keys or credentials.--ref-only reads the file in place, so each run sees today's rows, signed
out, with no export step.
Y=postman/datasets/catalog.dataset.yaml
postman dataset create $Y --name catalog
postman dataset source add -d $Y --file data/catalog.xlsx --ref-only --json
# One source per worksheet: read sources[].table (here source_Products).
# Change each value: to a path relative to the manifest: ../../data/catalog.xlsx
postman dataset query $Y -q "SELECT sku, price FROM source_Products WHERE active = 1"
postman dataset view create -d $Y -n active_products -q "SELECT sku, price FROM source_Products WHERE active = 1"
postman collection run <collection> --iteration-data-dataset $Y --iteration-data-view active_products
A test then compares each row with the response:
pm.expect(pm.response.json().price).to.eql(Number(pm.iterationData.get('price'))).
A CSV or JSON file also needs source add -n <name>; the name is its table.
--ref-only), a fixture you write once (copied), or a database when
current rows are the point. A database adds authentication, entitlement,
network, and credential requirements even in a local .dataset.yaml.
Check postman dataset <action> -h and the actual source capability before
promising a workflow; source support can vary with the installed CLI.--source <name> instead sends SQL to one source in its native dialect.
Switching modes to silence a SQL error changes query semantics. JDBC
requires the native path and cannot join in the federated layer; native
database connectors can support federation.--var/--prop values and --vars-file entries accept
vault:<KEY> (a Shared Vault secret, preferred), vault:<vaultId>/<secretId>,
or env:<NAME>, which reads POSTMAN_VAULT_<NAME> when the dataset runs
(local manifests only; the CI idiom). A literal works with a warning but
lands in shell history and in the stored YAML; --vars-file - keeps it
out of argv, not out of the file. A secret typed into a JDBC
--url-template is rejected: use a {{placeholder}} and --var. The
"Secrets" section of dataset source add -h is authoritative for the
installed CLI; see variables for vault handling.--iteration-data-dataset <path-or-id> and
--iteration-data-view <name-or-id> flags feed one row per collection
iteration, with columns exposed as variables. They exclude -d and require
a parameter-free view because the runner has no query-parameter input.
Repeatable --dataset <path-or-dir> instead exposes pm.datasets() to
scripts; it does not itself create row-driven iterations. Without it, a
run auto-discovers .dataset.yaml files in the collection's repo; passing
it turns that discovery off.Create a local manifest with postman dataset create <path.dataset.yaml> --name <name>, then attach sources with dataset source add -n <source>
(spreadsheets name theirs per worksheet). Source commands
supply IDs and validation that hand-written entries can miss. When inspecting
or repairing manifest fields, consult Dataset YAML.
Existing-dataset commands accept a local path or workspace ID; list needs a local path for
local discovery, while workspace create/list use --workspace.
A file source is copied into data_dir by default: a snapshot that misses
later edits to the original. --ref-only reads the file in place on every
query, run and mock request, but records an absolute path: change each
value: to a path relative to the manifest (not data_dir) before
committing. For a workspace
dataset, adding --file alone registers a local filesystem source; --upload
is what uploads bytes. Datasets are pushed along with the workspace; there is
no separate dataset push.
For spreadsheet sources, use the worksheet-aware guidance in
Spreadsheet sources. For ordinary source names,
prefer normalized identifiers: table names lowercase, collapse repeated
underscores, and strip edge underscores. A source called users is queried
as users, not source_users. Verify actual tables before interpreting an
unknown-table error as missing data.
JDBC sources need a sign-in and an Enterprise plan; check both before
starting. dataset jdbc inspect <driver.jar> works signed out but needs Java
and a driver JAR on disk; the CLI doesn't download one. It supplies driver
class, URL template, variables, and properties for source add;
--from-source can reuse a connection. JDBC addition tests connectivity unless disabled; native source
addition needs a separate dataset source test. This distinction prevents
mistaking a saved source for a working connection.
Prove the query with dataset query before saving it with dataset view create,
then run the view. Query parameters are positional ($1, $2, with -p
values in order). Commit the manifest and intended source files; keep engine
state such as data.db, meta.db, daemon.log, and caches out of the repo.
Dataset commands do not create a .postman/resources.yaml registry entry.
Deletion removes the manifest but preserves source files that may be shared.
Deleting a workspace dataset is permanent; establish that intent rather than
treating deletion as a way to repair a query.
A generic server-error wrapper can hide SQL or connection errors. Use structured
--json errors and their remediation, or --debug when necessary, to identify
the layer before retrying. source test separates database connectivity from
SQL errors; file/URL sources have no connection to test. Engine startup failures
may need data_dir's daemon log rather than a different query.
CSV columns load as TEXT, so CAST them before numeric comparisons;
spreadsheet columns are typed, with booleans as 1/0. A view that returns
no rows still runs one iteration with its {{variables}} unresolved, so check
the row count with dataset query first.
Script dataset access is lazy, and invalid YAML can be skipped with a warning
rather than failing the run. pm.datasets() takes the manifest's dataset
id, not its path or name; executeView() takes a view id. A rejected call
that nothing catches is silent, so assert on the rows:
const { rows } = await pm.datasets('<datasetId>')
.executeQuery('SELECT id, name FROM users WHERE id = $1', ['2']);
const users = [];
for await (const row of rows) users.push(row);
pm.test('fixture rows loaded', () => pm.expect(users).to.not.be.empty);
On a hosted collection, --dataset is not an
access-control boundary: scripts can access other datasets readable by the
session. Inspect the collection's data access before running untrusted scripts
with that session.
Report the queried columns and row count, local/workspace location, live versus copied sources, and federated versus native execution. For iteration runs, compare the actual iteration count with the intended view rows and configured limits. Matching counts establishes wiring, not that the data covers every behavior the test needs. Creating a manifest alone proves neither.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
test-data, data-seeding, sql-views, collection-run, mock-data, load-testing
20 skills in this plugin
/ai-readinessUse when assessing or improving how well AI agents can discover, call, and recover from errors with an API. Scores an existing Postman collection or OpenAPI spec and turns measured gaps into contract improvements; supports a separate CI readiness threshold. Use for requests such as "is this API ready for agents"./api-discoveryUse when finding an API or owner, integrating a public provider, locating Postman resources, or investigating consumers and change impact across services. Turns discovered contracts and mocks into reusable dependencies and identifies evidence outside the current checkout. Use for requests such as "who consumes this endpoint"./api-documentationUse when defining or improving an API contract, generating documentation from a collection or OpenAPI spec, publishing API docs, or sharing a documentation link. Makes auth, inputs, responses, and examples reusable by callers, tests, and mocks. Use for requests such as "publish API docs"./api-engineerUse when an HTTP API task spans several steps, such as building a new endpoint end to end with its contract, implementation, tests and mocks, or when it is API work and no narrower Postman skill fits. Prefer the narrower Postman skill when one fits. Routes to the relevant Postman skills and keeps contracts, tests and mocks reusable across the work, using organization-wide dependency context. Not for UI-only changes, library or CLI code, or questions about what existing code does. Use for requests such as "implement this endpoint"./api-mockingUse when something needs an API that isn't built or reachable yet (a frontend, client or demo), when other teams should build against your API before it ships, or when asked to mock an API or fake a backend. Finds, builds, runs and publishes a stand-in for one API — a published mock when its owner or a verified publisher has one, otherwise one built from its spec or collection, stateful when callers write then read, answering with real records from a sheet or database. To run your own code against the services it calls, use api-simulation. Covers `postman mock` and `postman dependency add mock`./api-monitoringUse when setting up recurring API checks, running or diagnosing a Postman Monitor, changing its schedule, or reaching private APIs through a self-hosted runner. Reuses collection assertions and their test rows to detect live regressions and traces failures to individual run evidence. Use for requests such as "check this API every minute".npx claudepluginhub postmanlabs/postman-plugin --plugin postmanOther plugins' skills for the same job