@postman/postman-plugin 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +2 -2
  2. package/hooks/session-start-context.md +1 -1
  3. package/mcp.pi.json +2 -2
  4. package/package.json +1 -1
  5. package/skills/api-discovery/SKILL.md +7 -2
  6. package/skills/api-documentation/SKILL.md +2 -3
  7. package/skills/api-engineer/SKILL.md +13 -15
  8. package/skills/api-mocking/SKILL.md +4 -2
  9. package/skills/api-monitoring/SKILL.md +35 -25
  10. package/skills/api-simulation/SKILL.md +3 -1
  11. package/skills/api-testing/SKILL.md +3 -3
  12. package/skills/application-testing/SKILL.md +2 -2
  13. package/skills/ci-integration/SKILL.md +7 -5
  14. package/skills/cli-install/SKILL.md +29 -0
  15. package/skills/collection-schema-v3/SKILL.md +21 -11
  16. package/skills/collection-schema-v3/reference/environment.md +2 -0
  17. package/skills/collection-schema-v3/reference/globals.md +40 -0
  18. package/skills/collection-schema-v3/reference/http.md +149 -11
  19. package/skills/collection-schema-v3/reference/other_protocols.md +232 -86
  20. package/skills/datasets/SKILL.md +6 -5
  21. package/skills/datasets/reference/schema.md +51 -0
  22. package/skills/flows/SKILL.md +0 -1
  23. package/skills/performance-testing/SKILL.md +14 -1
  24. package/skills/performance-testing/references/gatling-import/README.md +141 -0
  25. package/skills/performance-testing/references/gatling-import/feeders.md +31 -0
  26. package/skills/performance-testing/references/gatling-import/injection.md +88 -0
  27. package/skills/performance-testing/references/gatling-import/mapping.md +91 -0
  28. package/skills/performance-testing/references/gatling-import/unsupported.md +31 -0
  29. package/skills/postman-mcp-server/SKILL.md +1 -1
  30. package/skills/variables/SKILL.md +2 -2
  31. package/skills/webhook-testing/SKILL.md +1 -1
  32. package/skills/workspaces/SKILL.md +53 -0
  33. package/skills/bootstrap/SKILL.md +0 -140
  34. package/skills/bootstrap/reference/cli_installation.md +0 -59
package/README.md CHANGED
@@ -235,8 +235,8 @@ exercise failure paths.
235
235
  `postman init` is idempotent and safe to run in any project. Run it before API
236
236
  engineering work to create the relevant local directories and make Postman
237
237
  skills available to guide the task, even if the project is already initialized.
238
- See [bootstrap](https://github.com/postmanlabs/postman-plugin/blob/main/skills/bootstrap/SKILL.md#start-with-postman-init) for setup
239
- options and workspace binding.
238
+ See [workspaces](https://github.com/postmanlabs/postman-plugin/blob/main/skills/workspaces/SKILL.md) for init's
239
+ workspace options and binding.
240
240
 
241
241
  Work done in a Postman folder produces artifacts: collection runs, lint
242
242
  results, request history, mock deployments. When that folder is connected to a
@@ -3,7 +3,7 @@ You have the Postman plugin.
3
3
 
4
4
  Before responding to any non-trivial API engineering task — designing, implementing, mocking, testing, monitoring, documenting, or deploying an API or Postman Flow — load the `postman:api-engineer` skill and follow it. It is the default entry point and routes to the specific postman skills from there. Pure questions and trivial one-line edits don't need it.
5
5
 
6
- When the intent is already specific, you may enter directly into the relevant skill instead: `postman:bootstrap` (link this repo to a Postman workspace), `postman:api-mocking`, `postman:api-testing`, `postman:api-monitoring`, `postman:flows`, `postman:ci-integration`, `postman:api-discovery`, `postman:ai-readiness`, `postman:performance-testing`, `postman:api-documentation`, `postman:variables` (where a value or secret belongs and how to reference it).
6
+ When the intent is already specific, you may enter directly into the relevant skill instead: `postman:api-mocking`, `postman:api-testing`, `postman:api-monitoring`, `postman:flows`, `postman:ci-integration`, `postman:api-discovery`, `postman:ai-readiness`, `postman:performance-testing`, `postman:api-documentation`, `postman:variables` (where a value or secret belongs and how to reference it).
7
7
 
8
8
  If you were dispatched as a subagent to execute a specific task, ignore this block — `postman:api-engineer` governs the orchestrating session, and it already shaped your dispatch.
9
9
 
package/mcp.pi.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "description": "Postman workspaces, collections, specs, environments, mocks and monitors",
7
7
  "headers": {
8
8
  "X-Source": "postman-pi-plugin",
9
- "X-Plugin-Version": "0.5.1",
10
- "User-Agent": "postman-pi-plugin/0.5.1"
9
+ "X-Plugin-Version": "0.6.0",
10
+ "User-Agent": "postman-pi-plugin/0.6.0"
11
11
  }
12
12
  }
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/postman-plugin",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Postman's API engineering skills for coding agents: a Pi package, and an npx installer that sets up Claude Code, Codex, Cursor, Kimi Code, Factory Droid, OpenCode and Pi.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -10,6 +10,11 @@ must invent. Relationship context broadens investigation beyond the checkout:
10
10
  passing this service's own tests does not establish that its consumers can
11
11
  still use a changed interface.
12
12
 
13
+ Postman search, the Context Graph and dependency downloads work only for a
14
+ signed-in CLI. Check `postman status` before the first of them and sign in if
15
+ it reports signed out. If signing in isn't possible, don't run them; say which
16
+ sources were skipped.
17
+
13
18
  1. Choose the source by the question:
14
19
 
15
20
  | Need | Use |
@@ -47,8 +52,8 @@ still use a changed interface.
47
52
  not be present yet. The query uses the authenticated API key's team, not
48
53
  the repository's workspace binding; changing that binding cannot fix a
49
54
  query against the wrong organization's context.
50
- 5. Use **bootstrap**'s "Owning workspace versus dependency" distinction
51
- before importing. For a dependency, `postman dependency add
55
+ 5. Before importing, tell this repository's owning workspace from a
56
+ dependency. For a dependency, `postman dependency add
52
57
  <collection|environment|mock> <name-or-id>` declares and downloads the
53
58
  selected resource without rebinding the repository. Prefer the discovered
54
59
  ID; `--workspace <id>` disambiguates names. If the graph only identified a
@@ -14,8 +14,7 @@ with changes reviewable alongside code.
14
14
  interface for tooling; a Postman collection adds runnable requests,
15
15
  examples, and assertions. Maintain both when both uses matter, with an
16
16
  explicit direction of generation or synchronization so they do not become
17
- competing definitions. Local edits need **bootstrap** only when setup or
18
- bindings are unresolved.
17
+ competing definitions.
19
18
  2. When the spec is authoritative, reuse its operations with
20
19
  `postman spec generate collection <spec-path-or-id> -n "<collection-name>"`.
21
20
  Inspect the generated result before replacing an existing collection:
@@ -34,7 +33,7 @@ with changes reviewable alongside code.
34
33
  to keep credentials out of reusable requests and examples.
35
34
  5. Choose delivery by audience. Local artifacts support Git review;
36
35
  publishing to the bound workspace makes them available to teammates with
37
- access (see **bootstrap**). A workspace push does not itself publish a
36
+ access. A workspace push does not itself publish a
38
37
  public docs page or change permissions. For a public documentation link,
39
38
  use **postman-mcp-server**'s documentation workflow and the available
40
39
  publishing tool; establish the intended audience before public exposure.
@@ -16,10 +16,9 @@ guesswork each time work resumes.
16
16
  regression. Reuse the existing contract; update it where behavior changes.
17
17
  Flag design choices that make callers harder to implement or future changes
18
18
  harder to adopt, and explain the tradeoff. See **api-documentation**.
19
- 2. Choose the contract artifact for how it will be used: an OpenAPI spec describes
20
- the interface for tooling, while a Postman collection carries runnable requests,
21
- examples, and assertions. Reuse what exists; maintaining both is useful when
22
- both purposes matter. See **api-documentation**.
19
+ 2. A Postman collection records the contract in a form that runs. The CLI's
20
+ deterministic tools cheaply turn that one source into an OpenAPI spec, a
21
+ mock, an SDK, or a performance suite, so the contract is written once.
23
22
  3. Match verification to the behavior at risk. A saved collection can reuse auth,
24
23
  variables, payloads, and assertions without reconstructing requests; a one-off
25
24
  endpoint check can be smaller. Check the changed behavior and relevant existing
@@ -40,10 +39,8 @@ guesswork each time work resumes.
40
39
  your API, publish a mock of it in your service's own workspace, where their
41
40
  simulations look first; see **api-mocking**.
42
41
  6. Keep specs, collections, environments, and mocks in local files so changes can
43
- be diffed, reviewed, and reused in Git and CI. Use **bootstrap** when setup or
44
- workspace bindings are unresolved: reuse an existing local layout, pull the
45
- current service's existing workspace, or initialize a new project when neither
46
- exists.
42
+ be diffed, reviewed, and reused in Git and CI. `postman status` shows
43
+ what setup is in place, what is missing, and what closes each gap.
47
44
  7. `postman init` gives API engineering work a ready state. It scaffolds local structure: `postman/`
48
45
  directories for API artifacts. It installs skills in `postman/skills` folder with guidance on designing, implementing, and validating APIs.
49
46
  The command is idempotent and safe to rerun in an initialized project.
@@ -73,16 +70,17 @@ gap, such as an untested behavior or a consumer affected by an interface change.
73
70
  Decline unnecessary setup or scope and explain why it would not help the task.
74
71
 
75
72
  Important: If a CLI command says an operation isn't allowed because credits
76
- or usage are exhausted, or the current plan does not permit it, follow
77
- **bootstrap**'s "Subscription or usage limit" section instead of retrying or
78
- trying to find a workaround.
73
+ or usage are exhausted, or the current plan does not permit it, stop
74
+ retrying and tell the user that signing up or upgrading their plan is what
75
+ lifts it.
79
76
 
80
77
  ## Verification
81
78
 
82
79
  Report the changed contract or implementation, the checks actually run, and
83
80
  the guarantees their results support. Separate local, mocked, and live evidence;
84
- state any relevant consumer or upstream interaction still unverified.
81
+ state any relevant consumer or upstream interaction still unverified. Run
82
+ `postman status` last to confirm the setup the work relied on is still in place.
85
83
 
86
- If actual use exposes a CLI gap or misleading skill, see **bootstrap**'s
87
- "Reporting CLI and skill gaps" section so the defect can be addressed for future
88
- work.
84
+ If actual use exposes a CLI gap or misleading skill, report it through the
85
+ CLI's feedback channel after finishing the user's task, with a sanitized
86
+ reproduction and no secrets, user data, or proprietary content.
@@ -21,8 +21,10 @@ Several APIs at once, for a service, a frontend or a test suite? Use
21
21
 
22
22
  When the API belongs to another team, look for their published mock before
23
23
  writing one: theirs encodes their contract and their service's state; yours
24
- encodes a guess. It needs `postman login`; signed out, build one and say the
25
- owner search was skipped.
24
+ encodes a guess.
25
+
26
+ Every step below needs a signed-in CLI. Check `postman status` first; signed
27
+ out, skip to building one and say the owner search was skipped.
26
28
 
27
29
  1. Find the owner's workspace with `postman search workspaces "<service>" -o json`.
28
30
  Name the service plainly, as your code does, not by what it returns: a
@@ -19,43 +19,53 @@ exercise the guarantees users depend on.
19
19
  the linked workspace unless one is supplied. Inspect command-specific
20
20
  `-h` and available service options for supported schedules and limits.
21
21
  Creation starts an immediate run by default; `--no-run-now` avoids that
22
- when only scheduling was requested. A schedule expressed in the host's
23
- default timezone can fire at the wrong operational time.
22
+ when only scheduling was requested. Pass `--timezone` with the zone the
23
+ user means (for example `America/New_York`); without it the schedule uses
24
+ the zone of the machine running the CLI. Leave the month field as `*`; to
25
+ limit a schedule to certain months, write them as three-letter names such
26
+ as `jan`, not numbers.
24
27
  3. Choose a Postman region for a reachable public API. Use a self-hosted
25
28
  runner when the target is reachable only inside the user's network;
26
29
  running one adds infrastructure to maintain. `postman runner regions`
27
- provides valid hosted locations and `runner list` provides registered
28
- private runner IDs. `monitor create/update --runner` accepts either;
30
+ provides valid hosted locations and `runner list --json` the full IDs of
31
+ registered private runners. `monitor create/update --runner` accepts either;
29
32
  multiple locations help distinguish API failures from regional reachability.
30
- 4. Preserve monitor identity when updating schedule or run settings.
31
- `monitor update` cannot change its collection or environment and does not
32
- pause it; use `pause`/`resume` for that. A different collection/environment
33
- requires a replacement, so plan the handoff before deleting the old
34
- monitor and its continuity. Permanent deletion needs explicit intent.
33
+ 4. Update a monitor in place to keep its run history.
34
+ `monitor update` cannot change the collection, and cannot pause or resume
35
+ the monitor: use `monitor pause`/`monitor resume` for that. `update -e`
36
+ swaps the environment and `--clear-environment` removes it. A different
37
+ collection requires a replacement, so plan the handoff before deleting the
38
+ old monitor and its continuity. Permanent deletion needs explicit intent.
35
39
  5. Use `postman monitor run <id>` for an immediate verdict, such as after a
36
40
  deploy. `--async` returns a job handle when the caller need not wait.
37
- The CLI timeout caps waiting, not execution; after a timeout, inspect
38
- the submitted job instead of sending duplicate traffic or reporting failure.
39
- 6. Diagnose at the level of the evidence. `monitor jobs list <monitor-id>`
40
- finds jobs, `monitor jobs get <job-id>` shows terminal state and regional
41
- outcomes, and `monitor runs get <run-id>` shows assertions within an
42
- attempt. A failing region, a connection error, and a failed assertion
43
- imply different fixes. Preserve normal exit-code failures for CI gates.
41
+ The CLI timeout caps waiting, not execution: after a timeout, read the job
42
+ with `monitor jobs get <job-id>`; its state is the verdict.
43
+ 6. Answer each failure question at its level. `monitor jobs list
44
+ <monitor-id>` finds jobs, `monitor jobs get <job-id>` shows terminal state
45
+ and regional outcomes, and `monitor runs get <run-id>` shows assertions
46
+ within an attempt. A failing region, a connection error, and a failed
47
+ assertion imply different fixes. For a trend across runs, such as which
48
+ request got slow, use `monitor metrics <monitor-id>`. In a CI gate, run
49
+ `monitor run` without `-x`, so a failed run fails the build.
44
50
 
45
- For discovery, `monitor list` supports workspace and collection filters;
46
- use its returned cursor for pagination rather than offset. Its runner filter
51
+ For discovery, `monitor list` supports workspace and collection filters; to
52
+ page it, pass `--cursor` with the value from the previous page. Its runner filter
47
53
  is for a self-hosted ID and cannot be combined with other filters; a page-local
48
54
  name filter does not establish absence across all pages.
49
55
 
50
- For a private runner, use `runner start` with the registered ID and key and
51
- verify that it connects before assigning runs. Inspect its help for proxy,
52
- private CA, residency, and health-metric options only when the network requires
53
- them. Runner activity is reported by default; `--no-report-events` disables
54
- that reporting when the task requires it. Use **bootstrap** for unresolved
55
- authentication rather than placing runner keys in repository files.
56
+ For a private runner, use `runner start` with the ID and key from the runner
57
+ created in Postman, and verify it is reporting in before assigning runs: a
58
+ recent `Last ping` in `runner list` (`lastPingAt` under `--json`; `never`
59
+ means it has not connected). Inspect its help for proxy, private CA,
60
+ residency, and health-metric options only when the network requires them.
61
+ Runner activity is reported by default; `--no-report-events` disables that
62
+ reporting when the task requires it. Pass the runner key at runtime, from the
63
+ user or a secret store (for example `--key "$RUNNER_KEY"`), and keep it out of
64
+ files in the repository. If a `monitor` or `runner list` command fails on
65
+ authentication, sign in.
56
66
 
57
67
  ## Verification
58
68
 
59
69
  Report the actual monitor configuration or terminal job/run outcome, including
60
70
  where it executed and which checks failed. A created monitor, accepted job,
61
- or connected runner alone does not prove the API passed its health checks.
71
+ or a runner reporting in alone does not prove the API passed its health checks.
@@ -56,7 +56,9 @@ CLI answers `postman simulation -h` with its general help).
56
56
  shared code; ask about the repo by its `git remote` name, because a close
57
57
  name matches another repo.
58
58
  - **Each member needs a mock: see `api-mocking`,** which looks for the owning
59
- team's published mock before building one. For a question, one built from
59
+ team's published mock before building one. Finding and pulling an owner's
60
+ mock needs a signed-in CLI; check `postman status` first, and signed out,
61
+ build each mock and record that the owner search was skipped. For a question, one built from
60
62
  the contract will do; one that invents responses can send the caller down a
61
63
  path the real service never would. In a mock you build, answer `501` for calls this path
62
64
  doesn't make: a `404` reads to the caller like a real "not found".
@@ -45,9 +45,9 @@ guarantee; a successful HTTP exchange alone does not establish correctness.
45
45
  without validating it. Results are recorded in the connected workspace by
46
46
  default; `--report-events=false` keeps the run local when required.
47
47
 
48
- Use command-specific `-h` for supported options and **bootstrap** for unresolved
49
- CLI setup or authentication when using workspace resources. A bare URL or
50
- local collection does not require a workspace binding.
48
+ Use command-specific `-h` for supported options. Workspace resources need a
49
+ signed-in CLI; a bare URL or local collection does not require a workspace
50
+ binding.
51
51
 
52
52
  ## Verification
53
53
 
@@ -44,7 +44,7 @@ If this run does not need to publish results (local debugging, dry run), authent
44
44
 
45
45
  Publishing to Application Inventory requires a workspace binding. Check `.postman/resources.yaml` for a `workspace.id`. Reason about whether publishing is actually needed for this task before treating a missing workspace as a blocker:
46
46
 
47
- - If publishing is needed and the workspace is missing, load the `bootstrap` skill to set it up. In a non-interactive context this must be done locally first, then `.postman/resources.yaml` committed.
47
+ - If publishing is needed and the workspace is missing, load the `workspaces` skill to set it up. In a non-interactive context this must be done locally first, then `.postman/resources.yaml` committed.
48
48
  - If publishing is not needed, pass `--report-events false` and proceed.
49
49
 
50
50
  ### Capture plugin
@@ -106,7 +106,7 @@ A **target** is a named set of collections + optional environment. The `default`
106
106
  ```bash
107
107
  postman --version
108
108
  ```
109
- This skill targets the latest CLI release. If the version is outdated, load the `bootstrap` skill for installation and update steps, then re-run. The `--help` output for each command shows the flags actually available in the installed version.
109
+ This skill targets the latest CLI release. If the version is outdated, update the CLI, then re-run. The `--help` output for each command shows the flags actually available in the installed version.
110
110
 
111
111
  Read the CLI error output first — it names the specific failure and what to fix.
112
112
 
@@ -38,10 +38,12 @@ the author's own passing tests do not establish cross-service compatibility.
38
38
  not make the command read-only.
39
39
  4. Authenticate only jobs that need workspace resources. Use the CI secret
40
40
  store to supply `POSTMAN_API_KEY`, then
41
- `postman login --with-api-key "$POSTMAN_API_KEY"`. A local-only gate need
42
- not log in. Command-specific API-key flags are not a general replacement
43
- for login across lint and push operations. Use **bootstrap** for unresolved
44
- bindings, and **variables** for request credentials.
41
+ `postman login --with-api-key "$POSTMAN_API_KEY"`. A local-only gate can
42
+ run without it, but its run results are then lost: they stay in that job's
43
+ log instead of reaching the workspace, where teammates and later agent
44
+ sessions read them as evidence. Command-specific API-key flags are not a general replacement
45
+ for login across lint and push operations. Use **workspaces** for
46
+ unresolved bindings, and **variables** for request credentials.
45
47
  5. Publish only the reviewed branch after its merge checks pass.
46
48
  `postman workspace push -y` changes shared context; a PR-triggered push
47
49
  would publish an unmerged contract. The normal prepare phase assigns IDs
@@ -51,7 +53,7 @@ the author's own passing tests do not establish cross-service compatibility.
51
53
  6. Use the default create/update strategy unless exact mirroring is the
52
54
  explicit requirement. `--push-strategy force-sync` can delete workspace
53
55
  entities absent from the checkout, including resources managed elsewhere.
54
- Follow **bootstrap**'s diff and consent boundary for that branch.
56
+ Preview that push's diff and get its deletions approved before enabling it.
55
57
 
56
58
  ## Verification
57
59
 
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: cli-install
3
+ description: Use when the Postman CLI is missing or can't be installed, or when `postman` is "command not found". Installs the CLI globally so `postman` is on `PATH`, with a fallback to the hosted MCP server when installing is blocked. Use for requests such as "install the Postman CLI".
4
+ ---
5
+
6
+ # Install the Postman CLI
7
+
8
+ Install it globally so `postman` is on `PATH`. If installing is blocked, use
9
+ **postman-mcp-server** for hosted operations.
10
+
11
+ ```bash
12
+ # npm, any platform with Node
13
+ npm install -g postman-cli
14
+
15
+ # macOS, Linux, and WSL
16
+ curl -o- "https://dl-cli.pstmn.io/install/unix.sh" | sh
17
+ ```
18
+
19
+ ```powershell
20
+ # Windows
21
+ powershell.exe -NoProfile -InputFormat None -ExecutionPolicy AllSigned -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://dl-cli.pstmn.io/install/win64.ps1'))"
22
+ ```
23
+
24
+ ## Verification
25
+
26
+ Report the installed version and the route it came from, and confirm `postman`
27
+ on `PATH` resolves to that copy.
28
+
29
+ Source: https://learning.postman.com/docs/postman-cli/postman-cli-installation/
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: collection-schema-v3
3
- description: Use when writing or debugging local Postman v3 collection and environment YAML, including collection lint failures. Preserves the per-entity files, inherited context, and schema shapes that make API changes reusable and reviewable in Git. Use for requests such as "fix this request YAML".
3
+ description: Use when writing or debugging local Postman v3 collection, environment or globals files, including collection lint failures. Preserves the per-entity files, inherited context, and schema shapes that make API changes reusable and reviewable in Git. Use for requests such as "fix this request YAML".
4
4
  ---
5
5
 
6
6
  # Collection Schema (v3, Git-Native)
@@ -19,12 +19,14 @@ checks, without regenerating a single large collection export.
19
19
  Collection/folder definitions supply shared context; copying every inherited
20
20
  field into each request creates competing values and noisy future edits.
21
21
  See **variables** when deciding the scope of a value or secret reference.
22
- 3. Use [HTTP field shapes and examples](reference/http.md) when authoring
23
- request, example, or definition files. For other protocols, read
24
- [their schemas](reference/other_protocols.md); HTTP's URL/body/script shape
25
- cannot be assumed for gRPC, WebSocket, MCP, or LLM requests.
26
- [Environment files](reference/environment.md) have their own schema and
27
- do not use the collection entity's `$kind` discriminator.
22
+ 3. Consult the reference section for the entity being changed:
23
+ [HTTP requests, examples, and definitions](reference/http.md),
24
+ [environment files](reference/environment.md), or
25
+ [other protocols](reference/other_protocols.md).
26
+ Protocols have different URL, body, script, and settings shapes; an HTTP
27
+ field is not necessarily valid on another request kind.
28
+ For globals files, use the [globals reference](reference/globals.md).
29
+ Dataset YAML belongs to **datasets**; mocks belong to **api-mocking**.
28
30
  4. Preserve types at the YAML boundary. Quote `{{variables}}` and strings that
29
31
  resemble booleans or numbers; JSON bodies are string content, best expressed
30
32
  with block scalars. A syntactically valid YAML object can still be the wrong
@@ -43,7 +45,15 @@ checks, without regenerating a single large collection export.
43
45
  ## Verification
44
46
 
45
47
  Run `postman collection lint <collection-path>` for collection changes and
46
- `postman environment lint <path>` for environment changes. Then inspect the
47
- diff for unintended scope changes; when execution is appropriate, run the
48
- changed request through its collection to check inherited context. Report
49
- structural validation separately from behavior verified against a target.
48
+ `postman environment lint <path>` for environment changes. Review warnings as
49
+ well as errors: an ignored field can change behavior even when parsing succeeds.
50
+ Use `postman workspace lint` when checking relationships across entities or
51
+ workspace manifest mappings.
52
+
53
+ Inspect the diff for unintended scope changes. When execution is appropriate,
54
+ run the changed request through its collection to check inherited context.
55
+ For script changes, check that the changed script executed and produced its
56
+ intended effect; compare assertion counts with the assertions expected for that
57
+ run. A setup script may intentionally have none, and unrelated passing assertions
58
+ do not prove the changed script worked. Report structural validation separately
59
+ from behavior verified against a target.
@@ -36,6 +36,8 @@ An environment is one YAML file named `<name>.environment.yaml` under
36
36
  - `enabled` — boolean. The CLI writes `true` for a newly set variable.
37
37
  - `type` — optional string. Use `default` for ordinary values and `secret`
38
38
  for sensitive values.
39
+ - `secret` — optional boolean; `secret: true` alongside `type: default` is
40
+ also a recognised way to mark a secret.
39
41
  - `description` — optional string.
40
42
 
41
43
  Do not add collection-only fields such as `$kind`, `scripts`, `auth`, or
@@ -0,0 +1,40 @@
1
+ # Globals
2
+
3
+ A globals file is named `<name>.globals.yaml` under `postman/globals/`.
4
+ It has no `$kind` discriminator.
5
+
6
+ ## Fields
7
+
8
+ - `name` — required string, conventionally `Globals`.
9
+ - `values` — required array; `values: []` represents no globals.
10
+ - Each value has:
11
+ - `key` — required variable name.
12
+ - `value` — required string. Quote numeric- or boolean-looking strings
13
+ and `{{variables}}` so YAML preserves their type.
14
+ - `enabled` — boolean.
15
+ - `type` — optional string: `default` or `secret`.
16
+ - `secret` — optional boolean; `secret: true` alongside `type: default`
17
+ also marks a secret.
18
+ - `description` — optional string.
19
+
20
+ ## Example
21
+
22
+ ```yaml
23
+ name: Globals
24
+ values:
25
+ - key: base_url
26
+ value: 'https://api.example.com'
27
+ enabled: true
28
+ type: default
29
+ - key: api_token
30
+ value: ''
31
+ enabled: false
32
+ type: secret
33
+ ```
34
+
35
+ Marking a value as secret does not make a literal credential safe to commit.
36
+ Keep reusable examples free of credentials; see **variables** for secret sources.
37
+
38
+ Validate with `postman globals lint <file>`. This checks structure, not whether
39
+ requests resolve the intended values; check scope and overrides when diagnosing
40
+ unexpected runtime values.
@@ -13,7 +13,7 @@ Optional metadata for a collection or folder:
13
13
  - `description` — optional.
14
14
  - `variables` — array of `{key, value, description?, disabled?}`. `value`
15
15
  must be a string; `disabled` a boolean.
16
- - `auth` — a single auth object `{type, credentials: [{key, value}, ...]}`,
16
+ - `auth` — a single auth object `{type, credentials: [{key, value}, ...]}`
17
17
  or an array for multiAuth: `[{id, name, type, credentials, rules?}, ...]`.
18
18
  - `scripts` — array of `{type, code, language: "text/javascript"}`. `type`
19
19
  is one of `http:beforeRequest`, `http:afterResponse`,
@@ -47,17 +47,59 @@ Optional metadata for a collection or folder:
47
47
  - `examples` — optional, a relative path to the examples directory, e.g.
48
48
  `./.resources/<request-name>.resources/examples/`.
49
49
 
50
+ When editing query parameters, update both places they are recorded: the
51
+ query string in `url` and the entries in `queryParams`. Their names and values
52
+ must match; lint reports a mismatch as `FMT209`. For example, `q=shoes&page=2`
53
+ is represented as:
54
+
55
+ ```yaml
56
+ url: '{{base_url}}/search?q=shoes&page=2'
57
+ queryParams:
58
+ - key: q
59
+ value: shoes
60
+ - key: page
61
+ value: '2'
62
+ ```
63
+
50
64
  ## HTTP example (`*.example.yaml`)
51
65
 
52
- - `$kind: "http-example"` — required.
53
- - `name` — optional.
54
- - `request: {url, method}`.
55
- - `response: {statusCode, statusText, headers: [{key, value}], body: {type, content}}`.
56
- - `order` — optional.
66
+ `http-example` requires `$kind` and `response`, and `response` requires `body`:
67
+
68
+ ```yaml
69
+ $kind: http-example
70
+ name: 200 OK
71
+ request:
72
+ method: POST
73
+ url: https://api.example.com/orders
74
+ headers:
75
+ - key: Content-Type
76
+ value: application/json
77
+ body:
78
+ type: json
79
+ content: '{"sku":"A1"}'
80
+ response:
81
+ statusCode: 200
82
+ statusText: OK
83
+ headers:
84
+ - key: Content-Type
85
+ value: application/json
86
+ body:
87
+ type: json
88
+ content: '{"id":"o_1"}'
89
+ order: 1000
90
+ ```
91
+
92
+ For a saved `204 No Content` example, the YAML schema still requires a
93
+ `response.body` object. Represent the absence of response content with
94
+ `body: {type: text, content: ''}`. This describes the saved example file;
95
+ it does not add content to the HTTP response.
57
96
 
58
- Saved examples are what `collection ai-readiness` checks for — a request
59
- with no examples scores worse for agent consumption even if perfectly
60
- valid structurally.
97
+ Response `body.type` accepts only `text`, `json`, `xml`, `html`, `javascript`
98
+ and `yaml`. For a form-encoded response, use `type: text` with a
99
+ matching `Content-Type` header. Request bodies do have `urlencoded`.
100
+
101
+ Saved examples feed **ai-readiness**, documentation, and mocks; a structurally
102
+ valid example still needs to agree with the contract.
61
103
 
62
104
  ## Environments (`postman/environments/*.environment.yaml`)
63
105
 
@@ -66,10 +108,106 @@ Environment files are v3 YAML but are not collection entities: they do not use
66
108
  [reference/environment.md](environment.md) for the schema, secret
67
109
  handling, CLI-first edit commands, and a linted example.
68
110
 
111
+ ## Auth
112
+
113
+ `auth` is available on a collection, a folder, a request and an example. It has two
114
+ shapes. No auth:
115
+
116
+ ```yaml
117
+ auth:
118
+ type: noauth
119
+ ```
120
+
121
+ Anything else takes `type` plus `credentials`:
122
+
123
+ ```yaml
124
+ auth:
125
+ type: bearer
126
+ credentials:
127
+ - key: token
128
+ value: '{{TOKEN}}'
129
+ ```
130
+
131
+ `type` is one of `basic`, `bearer`, `apikey`, `digest`, `oauth1`, `oauth2`, `jwt`,
132
+ `awsv4`, `hawk`, `ntlm`, `asap`, `edgegrid`, `azure`, `sasl`, `inherit`. Use `inherit`
133
+ to take the parent folder's or collection's auth explicitly; omitting `auth` entirely
134
+ does the same thing.
135
+
136
+ `credentials` keys are the same names the Postman app shows for that auth type —
137
+ `username`/`password` for `basic`, `token` for `bearer`, `key`/`value`/`in` for
138
+ `apikey`, `accessKey`/`secretKey`/`region`/`service` for `awsv4`. A structurally
139
+ valid credential entry does not establish that the server will authenticate it.
140
+ `credentials` is an array of `{key, value}` entries.
141
+
142
+ ## Request body
143
+
144
+ `body` is one shape chosen by `type` — write that branch's keys and nothing else.
145
+
146
+ ```yaml
147
+ body: {type: none}
148
+ ```
149
+ ```yaml
150
+ body:
151
+ type: json # or text, xml, html, javascript
152
+ content: |-
153
+ {"id": 1}
154
+ ```
155
+ ```yaml
156
+ body:
157
+ type: urlencoded
158
+ content:
159
+ - key: grant_type
160
+ value: client_credentials
161
+ ```
162
+ ```yaml
163
+ body:
164
+ type: formdata
165
+ content:
166
+ - key: file
167
+ type: file
168
+ src: ./payload.bin
169
+ - key: note
170
+ type: text
171
+ value: hello
172
+ contentType: text/plain
173
+ ```
174
+ ```yaml
175
+ body:
176
+ type: file
177
+ content:
178
+ src: ./upload.bin # an object with src, not a bare path
179
+ ```
180
+
181
+ Choose `body.type` to match the payload and contract. JSON `content` is a string;
182
+ a block scalar keeps it readable without turning it into a YAML object.
183
+ A *response* body inside an example has a narrower type list:
184
+ see [HTTP examples](#http-example-exampleyaml).
185
+
186
+ ## Scripts
187
+
188
+ ```yaml
189
+ scripts:
190
+ - type: afterResponse
191
+ code: |-
192
+ pm.test('ok', () => pm.response.to.have.status(200));
193
+ ```
194
+
195
+ `type` is `beforeRequest` or `afterResponse` on a request, and protocol-prefixed on a
196
+ collection or folder (`http:beforeRequest`, `http:afterResponse`,
197
+ `graphql:beforeQuery`, `grpc:beforeInvoke`, …). A script entry may also carry
198
+ `language`, `packages`, and `requests`. `language` takes exactly one value,
199
+ **`text/javascript`** — `language: javascript` is a hard error,
200
+ `Invalid input: expected "text/javascript"`. Omitting it is fine.
201
+
202
+ The v2.1 `event:` field is not the v3 `scripts:` field. A script's `type` also
203
+ depends on its scope; moving it between a request and a definition requires checking
204
+ the type as well as the code. See the main skill's verification guidance for
205
+ checking that the intended script behavior survives the edit.
206
+
69
207
  ## YAML rules
70
208
 
71
- Invalid YAML breaks parsing silently in confusing ways — when in doubt,
72
- single-quote it:
209
+ YAML parsing and scalar coercion can change a field's meaning before schema
210
+ validation. Preserve the type the field expects:
73
211
 
74
212
  1. Single-quote any value containing `{{variables}}`:
75
213
  `url: '{{base_url}}/users'` — never leave it unquoted.