@postman/postman-plugin 0.1.0 → 0.1.2-rc.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.
- package/README.md +13 -1
- package/dist/hosts/index.js +2 -1
- package/dist/hosts/pi.js +84 -0
- package/dist/pi-extension.js +27 -0
- package/dist/source.js +3 -1
- package/hooks/session-start-context.md +11 -0
- package/mcp.pi.json +14 -0
- package/package.json +21 -6
- package/skills/ai-readiness/SKILL.md +50 -0
- package/skills/api-discovery/SKILL.md +135 -0
- package/skills/api-discovery/reference/orbit.md +101 -0
- package/skills/api-documentation/SKILL.md +34 -0
- package/skills/api-documentation/reference/rest-api-best-practices.md +47 -0
- package/skills/api-engineer/SKILL.md +29 -0
- package/skills/api-mocking/SKILL.md +141 -0
- package/skills/api-monitoring/SKILL.md +137 -0
- package/skills/api-testing/SKILL.md +103 -0
- package/skills/bootstrap/SKILL.md +216 -0
- package/skills/bootstrap/reference/cli_installation.md +58 -0
- package/skills/ci-integration/SKILL.md +121 -0
- package/skills/collection-schema-v3/SKILL.md +210 -0
- package/skills/collection-schema-v3/reference/environment.md +63 -0
- package/skills/collection-schema-v3/reference/other_protocols.md +86 -0
- package/skills/datasets/SKILL.md +323 -0
- package/skills/flows/SKILL.md +212 -0
- package/skills/flows/reference/flow_cli_flags.md +111 -0
- package/skills/performance-testing/SKILL.md +71 -0
- package/skills/postman-mcp-server/SKILL.md +71 -0
- package/skills/postman-mcp-server/references/docs.md +88 -0
- package/skills/postman-mcp-server/references/learn.md +73 -0
- package/skills/postman-mcp-server/references/mcp-limitations.md +38 -0
- package/skills/postman-mcp-server/references/mock.md +101 -0
- package/skills/postman-mcp-server/references/search.md +83 -0
- package/skills/postman-mcp-server/references/security.md +129 -0
- package/skills/postman-mcp-server/references/setup.md +141 -0
- package/skills/postman-mcp-server/references/sync.md +85 -0
- package/skills/postman-mcp-server/references/test.md +84 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-integration
|
|
3
|
+
description: Common CI integrations that can added as independent pass/fail gates. Use when the user asks to "add Postman to CI," "run this collection on every PR," "fail the build on a governance violation," or "push to the postman cloud workspace after merge to main", "add some api related operation in my Github actions".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CI Integration
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
These are some common workflows that one can add in their CI pipeline leveraging postman cli.
|
|
10
|
+
|
|
11
|
+
## Run a collection — a gated pipeline step
|
|
12
|
+
|
|
13
|
+
`postman collection run <path/id>` exits nonzero on a failed `pm.test`
|
|
14
|
+
assertion, which is what makes it a usable gate — see `api-testing` for how
|
|
15
|
+
that exit code actually gets set. What's CI-specific: `-r junit,html` (or
|
|
16
|
+
`--reporter-*-export`) writes a report your CI provider can surface as
|
|
17
|
+
build artifacts or test annotations, instead of leaving the result buried in
|
|
18
|
+
a log. `--bail` stops the run early on the first failure when a fast signal
|
|
19
|
+
matters more than a full report.
|
|
20
|
+
|
|
21
|
+
## Lint — pick the target that matches the gate you want
|
|
22
|
+
|
|
23
|
+
Three verbs look interchangeable and aren't — only two of them apply your
|
|
24
|
+
organization's governance rules, and the CLI's own `-h` output is where that
|
|
25
|
+
becomes visible (no assumption below goes further than what it printed):
|
|
26
|
+
|
|
27
|
+
| Want to check | Command | Applies org governance? |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| One spec against your rules | `spec lint <spec> --workspace-id <id> -f error` | Yes, via `--workspace-id` |
|
|
30
|
+
| One collection's structure/style | `collection lint <path> -f error` | **No** — this verb takes no `--workspace-id` at all |
|
|
31
|
+
| The whole workspace: every entity plus `.postman/resources.yaml` | `workspace lint --workspace-id <id> -f error` | Yes |
|
|
32
|
+
|
|
33
|
+
`collection lint` is a schema/style check only — running it and reporting
|
|
34
|
+
"governance passed" overstates what it did. If the ask is "does this
|
|
35
|
+
collection violate our rules," `workspace lint` is the one that actually
|
|
36
|
+
answers it (and covers every collection in the repo in one pass); reach for
|
|
37
|
+
bare `collection lint` only when there's no workspace to fetch rules from
|
|
38
|
+
yet.
|
|
39
|
+
|
|
40
|
+
## Push to workspace — only after merge
|
|
41
|
+
|
|
42
|
+
`postman workspace push -y` is the one command in this skill that changes
|
|
43
|
+
shared cloud state, so it belongs behind a merge-to-main trigger, not a PR
|
|
44
|
+
trigger. `-y` skips confirmation prompts a non-interactive job can't answer.
|
|
45
|
+
Leave `--no-prepare` off — the default prepare step is what assigns real IDs
|
|
46
|
+
to entities that are new since the last push; skipping it because a run
|
|
47
|
+
felt slow trades a few seconds for a push that silently fails to create
|
|
48
|
+
anything new.
|
|
49
|
+
|
|
50
|
+
`--push-strategy force-sync` mirrors the whole workspace, deleting any cloud
|
|
51
|
+
entity with no local counterpart — genuinely destructive, and not the
|
|
52
|
+
default for a reason. See Critical Rules before adding it to a merge job.
|
|
53
|
+
|
|
54
|
+
## AI readiness threshold
|
|
55
|
+
|
|
56
|
+
`collection ai-readiness <path> --min-score <n>` and its spec-side
|
|
57
|
+
counterpart `spec ai-readiness <path> --min-score <n>` (see `ai-readiness`
|
|
58
|
+
skill) are a fourth, separate gate — they score AI-agent consumability, not
|
|
59
|
+
test results or governance/structural style. Keep either in its own step:
|
|
60
|
+
folding it into the same step as `run` or one of the `lint` verbs above
|
|
61
|
+
hides which kind of check actually failed when the job goes red. Pick the
|
|
62
|
+
verb that matches what's checked into the repo — `collection ai-readiness`
|
|
63
|
+
for a git-synced collection, `spec ai-readiness` for an OpenAPI spec with no
|
|
64
|
+
collection generated from it yet.
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
- run: postman collection ai-readiness ./postman/collections/My\ API --min-score 70
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Critical Rules
|
|
71
|
+
|
|
72
|
+
1. **Never collapse `run`, `lint`, and `ai-readiness` into one step, and
|
|
73
|
+
never pass `-x`/`--suppress-exit-code` to a CI run.** One combined exit
|
|
74
|
+
code hides which check broke; a suppressed one hides that anything broke
|
|
75
|
+
at all.
|
|
76
|
+
2. **Gate `workspace push` to the merge event, never a PR event.** Everything
|
|
77
|
+
else in this skill is read-only against the cloud; this is the one
|
|
78
|
+
command that writes to it, so a PR-triggered push ships an unmerged
|
|
79
|
+
branch's entities to the shared workspace.
|
|
80
|
+
3. **`--push-strategy force-sync` deletes cloud entities absent locally.**
|
|
81
|
+
Only add it to a job whose explicit job is mirroring the workspace exactly,
|
|
82
|
+
with that intent confirmed — never as the default merge step, where the
|
|
83
|
+
default (create/update-only) strategy is the safe choice.
|
|
84
|
+
4. **Authenticate once, non-interactively:**
|
|
85
|
+
`postman login --with-api-key "$POSTMAN_API_KEY"`, reading the key from
|
|
86
|
+
the CI provider's secret store. Don't reach for `collection run`'s
|
|
87
|
+
`--postman-api-key` as the general answer — it's US-region only — and
|
|
88
|
+
`spec lint`/`workspace push` don't take it at all.
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
# WRONG — key committed in plain text, and scoped to one command anyway
|
|
92
|
+
- run: postman collection run api.json --postman-api-key PMAK-abc123...
|
|
93
|
+
|
|
94
|
+
# CORRECT — one non-interactive login, key from the provider's secret store
|
|
95
|
+
- run: postman login --with-api-key "$POSTMAN_API_KEY"
|
|
96
|
+
- run: postman collection run api.json
|
|
97
|
+
- run: postman spec lint spec.yaml --workspace-id $WS -f error
|
|
98
|
+
```
|
|
99
|
+
5. **Never `newman run` in place of `postman collection run`.** The CLI is
|
|
100
|
+
the supported runner every other skill here assumes; Newman forks the
|
|
101
|
+
toolchain and skips whatever reporting/governance depends on the CLI
|
|
102
|
+
specifically.
|
|
103
|
+
|
|
104
|
+
## Verification
|
|
105
|
+
|
|
106
|
+
State each gate that ran and its individual result — not "CI passed," but
|
|
107
|
+
which check ran, what it checked (governance vs. structure per the Lint
|
|
108
|
+
table above, or AI-agent consumability for `ai-readiness`), and its exit
|
|
109
|
+
code. If `workspace push` ran, confirm it was triggered by the merge event
|
|
110
|
+
and not a PR event, state which push strategy was used, and report
|
|
111
|
+
`Created`/`Updated` per entity rather than just "push succeeded." Confirm
|
|
112
|
+
no secret value appears literally in the committed workflow file.
|
|
113
|
+
|
|
114
|
+
## Reference
|
|
115
|
+
|
|
116
|
+
- `api-testing` skill — `collection run`'s exit-code semantics and reporter
|
|
117
|
+
flags in full.
|
|
118
|
+
- `collection-schema-v3` skill — what `workspace push` is actually pushing.
|
|
119
|
+
- `bootstrap` skill — CLI resolution, workspace linking, `.postman/resources.yaml`.
|
|
120
|
+
- `ai-readiness` skill — `collection ai-readiness`, `spec ai-readiness`, and
|
|
121
|
+
their `--min-score` gate.
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: collection-schema-v3
|
|
3
|
+
description: The reference for the git-native v3 collection file format — one YAML file per request/folder/example under postman/collections/, plus postman/environments/. Read before writing, editing, or generating any file in either directory by hand, or before debugging a `collection lint` failure. Covers the HTTP request/example/definition schema, environment schema, and the YAML/naming rules that make files parse — GraphQL, gRPC, WebSocket, Socket.IO, MQTT, MCP, and LLM request schemas are non-HTTP protocols and live in reference/other_protocols.md, read only when a collection actually uses one.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Collection Schema (v3, Git-Native)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A v3 collection is a directory tree under `postman/collections/`, one file
|
|
11
|
+
per entity — every request, every folder's metadata, every saved example is
|
|
12
|
+
its own file. There is no single collection.json to open and edit; the
|
|
13
|
+
directory structure itself *is* the collection.
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
postman/collections/
|
|
17
|
+
bookstore api/
|
|
18
|
+
.resources/
|
|
19
|
+
definition.yaml (optional)
|
|
20
|
+
get all books.resources/
|
|
21
|
+
examples/
|
|
22
|
+
200 OK.example.yaml
|
|
23
|
+
400 Bad Request.example.yaml
|
|
24
|
+
500 Internal Server Error.example.yaml
|
|
25
|
+
get all books.request.yaml
|
|
26
|
+
get-book-by-id.request.yaml
|
|
27
|
+
add new book.request.yaml
|
|
28
|
+
authentication/
|
|
29
|
+
.resources/
|
|
30
|
+
definition.yaml (optional)
|
|
31
|
+
signup.request.yaml
|
|
32
|
+
login.request.yaml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Every folder under `postman/collections/` is a collection; it can contain
|
|
36
|
+
subfolders and requests.
|
|
37
|
+
- A folder or collection can have a `.resources/` directory — an optional
|
|
38
|
+
metadata directory for that scope. `.resources/definition.yaml` holds the
|
|
39
|
+
collection/folder's own metadata; request examples live under
|
|
40
|
+
`.resources/<request-name>.resources/examples/`.
|
|
41
|
+
- Never place a request file inside a `.resources/` directory — those are
|
|
42
|
+
metadata-only.
|
|
43
|
+
|
|
44
|
+
## Definition file (`.resources/definition.yaml`)
|
|
45
|
+
|
|
46
|
+
Optional metadata for a collection or folder:
|
|
47
|
+
|
|
48
|
+
- `$kind: "collection"` — required, even for a folder's definition.
|
|
49
|
+
- `name` — optional, defaults to the filesystem folder name.
|
|
50
|
+
- `description` — optional.
|
|
51
|
+
- `variables` — array of `{key, value, description?, disabled?}`. `value`
|
|
52
|
+
must be a string; `disabled` a boolean.
|
|
53
|
+
- `auth` — a single auth object `{type, credentials: [{key, value}, ...]}`,
|
|
54
|
+
or an array for multiAuth: `[{id, name, type, credentials, rules?}, ...]`.
|
|
55
|
+
- `scripts` — array of `{type, code, language: "text/javascript"}`. `type`
|
|
56
|
+
is one of `http:beforeRequest`, `http:afterResponse`,
|
|
57
|
+
`graphql:beforeQuery`, `graphql:afterResponse`, `grpc:beforeInvoke`,
|
|
58
|
+
`grpc:onIncomingMessage`, `grpc:afterResponse`.
|
|
59
|
+
- `order` — number, used for folder ordering.
|
|
60
|
+
|
|
61
|
+
## HTTP request (`*.request.yaml`)
|
|
62
|
+
|
|
63
|
+
- `$kind: "http-request"` — required.
|
|
64
|
+
- `name` — optional (see naming rules below for when to include it).
|
|
65
|
+
- `order` — number; only used for relative comparison, so space values out
|
|
66
|
+
(e.g. multiples of 1000) rather than packing them tight — a later
|
|
67
|
+
insertion between two requests shouldn't force renumbering every sibling.
|
|
68
|
+
- `url` — string, with `{{varName}}` variable syntax.
|
|
69
|
+
- `method` — `GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS`.
|
|
70
|
+
- `headers` — array of `{key, value, description?, disabled?}`.
|
|
71
|
+
- `queryParams` — array of `{key, value, description?, disabled?}`.
|
|
72
|
+
- `pathVariables` — array of `{key, value, description?}`.
|
|
73
|
+
- `body` — `{type, content}`; `type` required whenever `body` is present.
|
|
74
|
+
- Types: `json`, `formdata`, `urlencoded`, `text`, `xml`, `html`,
|
|
75
|
+
`javascript`, `file`, `none`.
|
|
76
|
+
- `json`/`text`/`xml`/`html`/`javascript`: `content` is a string.
|
|
77
|
+
- `formdata`: `content` is an array of
|
|
78
|
+
`{key, type: "text"|"file", value or src, contentType?, description?}`.
|
|
79
|
+
- `urlencoded`: `content` is an array of `{key, value, description?}`.
|
|
80
|
+
- `auth` — `{type, credentials}`.
|
|
81
|
+
- `settings` —
|
|
82
|
+
`{protocolVersion?, strictSSL?, followRedirects?, maxRedirects?, disabledSystemHeaders?}`.
|
|
83
|
+
- `scripts` — array of `{type: "beforeRequest"|"afterResponse", code, language: "text/javascript"}`.
|
|
84
|
+
- `examples` — optional, a relative path to the examples directory, e.g.
|
|
85
|
+
`./.resources/<request-name>.resources/examples/`.
|
|
86
|
+
|
|
87
|
+
## HTTP example (`*.example.yaml`)
|
|
88
|
+
|
|
89
|
+
- `$kind: "http-example"` — required.
|
|
90
|
+
- `name` — optional.
|
|
91
|
+
- `request: {url, method}`.
|
|
92
|
+
- `response: {statusCode, statusText, headers: [{key, value}], body: {type, content}}`.
|
|
93
|
+
- `order` — optional.
|
|
94
|
+
|
|
95
|
+
Saved examples are what `collection ai-readiness` checks for — a request
|
|
96
|
+
with no examples scores worse for agent consumption even if perfectly
|
|
97
|
+
valid structurally.
|
|
98
|
+
|
|
99
|
+
## Environments (`postman/environments/*.environment.yaml`)
|
|
100
|
+
|
|
101
|
+
Environment files are v3 YAML but are not collection entities: they do not use
|
|
102
|
+
`$kind`. Before creating or editing one by hand, read
|
|
103
|
+
[reference/environment.md](reference/environment.md) for the schema, secret
|
|
104
|
+
handling, CLI-first edit commands, and a linted example.
|
|
105
|
+
|
|
106
|
+
## YAML rules
|
|
107
|
+
|
|
108
|
+
Invalid YAML breaks parsing silently in confusing ways — when in doubt,
|
|
109
|
+
single-quote it:
|
|
110
|
+
|
|
111
|
+
1. Single-quote any value containing `{{variables}}`:
|
|
112
|
+
`url: '{{base_url}}/users'` — never leave it unquoted.
|
|
113
|
+
2. Single-quote values containing `: # & * ! [ ] { } > |`, e.g.
|
|
114
|
+
`name: 'Health check: v2'`.
|
|
115
|
+
3. Multi-line content (JSON bodies, scripts, queries) uses a `|-` block
|
|
116
|
+
scalar:
|
|
117
|
+
```yaml
|
|
118
|
+
body:
|
|
119
|
+
type: json
|
|
120
|
+
content: |-
|
|
121
|
+
{
|
|
122
|
+
"name": "example"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
4. Quote strings that resemble booleans/numbers when a string is intended:
|
|
126
|
+
`value: "true"`, `value: "123"`.
|
|
127
|
+
5. `order` must be a bare number, never quoted: `order: 1000`.
|
|
128
|
+
6. Single-quote file paths and use forward slashes only:
|
|
129
|
+
`examples: './.resources/name.resources/examples'`.
|
|
130
|
+
|
|
131
|
+
## Naming rules
|
|
132
|
+
|
|
133
|
+
- `<request-name>` (the filename stem before `.request.yaml`) must not
|
|
134
|
+
contain `/ \ : * ? " < > |` — sanitize to `-`.
|
|
135
|
+
- Include `name` in the file only when it differs from `<request-name>`
|
|
136
|
+
(e.g. `name: 'Health/check'` inside `Health-check.request.yaml`, since the
|
|
137
|
+
filename itself can't hold the `/`).
|
|
138
|
+
- Filenames must be unique, case-insensitively, per directory.
|
|
139
|
+
|
|
140
|
+
## Worked example: "bookstore api"
|
|
141
|
+
|
|
142
|
+
`postman/collections/bookstore api/get all books.request.yaml`
|
|
143
|
+
```yaml
|
|
144
|
+
$kind: http-request
|
|
145
|
+
method: GET
|
|
146
|
+
url: '{{base_url}}/books'
|
|
147
|
+
order: 1000
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`postman/collections/bookstore api/get-book-by-id.request.yaml`
|
|
151
|
+
```yaml
|
|
152
|
+
$kind: http-request
|
|
153
|
+
name: 'get book by :id'
|
|
154
|
+
method: GET
|
|
155
|
+
url: '{{base_url}}/books/:id'
|
|
156
|
+
order: 2000
|
|
157
|
+
pathVariables:
|
|
158
|
+
- key: id
|
|
159
|
+
value: '1'
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
`postman/collections/bookstore api/add new book.request.yaml`
|
|
163
|
+
```yaml
|
|
164
|
+
$kind: http-request
|
|
165
|
+
method: POST
|
|
166
|
+
url: '{{base_url}}/books'
|
|
167
|
+
order: 3000
|
|
168
|
+
headers:
|
|
169
|
+
- key: Content-Type
|
|
170
|
+
value: application/json
|
|
171
|
+
body:
|
|
172
|
+
type: json
|
|
173
|
+
content: |-
|
|
174
|
+
{
|
|
175
|
+
"title": "Example Book",
|
|
176
|
+
"author": "Jane Doe"
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`postman/collections/bookstore api/.resources/definition.yaml`
|
|
181
|
+
```yaml
|
|
182
|
+
$kind: collection
|
|
183
|
+
name: Bookstore API
|
|
184
|
+
variables:
|
|
185
|
+
- key: base_url
|
|
186
|
+
value: 'https://api.bookstore.com/v1'
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Critical Rules
|
|
190
|
+
|
|
191
|
+
1. **Every entity is its own file — there's no single collection.json to
|
|
192
|
+
open.** A request, its parent folder's metadata, and its saved examples
|
|
193
|
+
are three separate files, not sections of one document.
|
|
194
|
+
2. **Unquoted `{{variables}}` or special characters are the most common way
|
|
195
|
+
a hand-written file fails to parse.** Single-quote per the YAML rules
|
|
196
|
+
above rather than debugging a cryptic lint error after the fact.
|
|
197
|
+
3. **`order` is relative, not an index.** Don't renumber every sibling file
|
|
198
|
+
to insert one request — leave headroom (spacing of 1000) from the start.
|
|
199
|
+
4. **This file covers HTTP only.** A collection using GraphQL, gRPC,
|
|
200
|
+
WebSocket, Socket.IO, MQTT, MCP, or LLM requests needs
|
|
201
|
+
[reference/other_protocols.md](reference/other_protocols.md) — don't
|
|
202
|
+
guess those schemas from the HTTP shape above, they diverge in real ways
|
|
203
|
+
(e.g. gRPC's `methodDescriptor`, LLM's `userPrompts`/`systemPrompts`).
|
|
204
|
+
|
|
205
|
+
## Reference
|
|
206
|
+
|
|
207
|
+
- [Other request protocols](reference/other_protocols.md) — GraphQL, gRPC,
|
|
208
|
+
WebSocket, Socket.IO, MQTT, MCP, and LLM request schemas.
|
|
209
|
+
- [Environment schema](reference/environment.md) — v3 environment filenames,
|
|
210
|
+
fields, variable types, safe editing commands, and validation.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Environment Schema (v3)
|
|
2
|
+
|
|
3
|
+
Read this reference before creating, editing, or debugging files under
|
|
4
|
+
`postman/environments/`.
|
|
5
|
+
|
|
6
|
+
## Prefer the CLI for ordinary edits
|
|
7
|
+
|
|
8
|
+
The CLI preserves the schema and avoids leaking secret values into command
|
|
9
|
+
output:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
postman environment new "Staging EU"
|
|
13
|
+
postman environment var set baseUrl https://staging.example.com \
|
|
14
|
+
--environment "postman/environments/Staging EU.environment.yaml"
|
|
15
|
+
postman environment var unset oldToken \
|
|
16
|
+
--environment "postman/environments/Staging EU.environment.yaml"
|
|
17
|
+
postman environment lint postman/environments --fail-severity warning
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use `environment get --show-secrets` only when the user explicitly needs the
|
|
21
|
+
secret value revealed. Do not print, summarize, or commit credentials returned
|
|
22
|
+
by it.
|
|
23
|
+
|
|
24
|
+
## File and fields
|
|
25
|
+
|
|
26
|
+
An environment is one YAML file named `<name>.environment.yaml` under
|
|
27
|
+
`postman/environments/`. It has no `$kind` field.
|
|
28
|
+
|
|
29
|
+
- `name` — required string.
|
|
30
|
+
- `values` — required array; an empty environment uses `values: []`.
|
|
31
|
+
- Each value has:
|
|
32
|
+
- `key` — required variable name.
|
|
33
|
+
- `value` — required string. Quote booleans, numbers, empty values, and
|
|
34
|
+
values containing YAML punctuation or `{{variables}}` so YAML does not
|
|
35
|
+
coerce them.
|
|
36
|
+
- `enabled` — boolean. The CLI writes `true` for a newly set variable.
|
|
37
|
+
- `type` — optional string. Use `default` for ordinary values and `secret`
|
|
38
|
+
for sensitive values.
|
|
39
|
+
- `description` — optional string.
|
|
40
|
+
|
|
41
|
+
Do not add collection-only fields such as `$kind`, `scripts`, `auth`, or
|
|
42
|
+
`variables`. Do not put secrets into an example merely to make it executable;
|
|
43
|
+
leave the value empty or use the team's supported secret source.
|
|
44
|
+
|
|
45
|
+
## Linted example
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
name: Staging EU
|
|
49
|
+
values:
|
|
50
|
+
- key: baseUrl
|
|
51
|
+
value: 'https://staging.example.com'
|
|
52
|
+
enabled: true
|
|
53
|
+
type: default
|
|
54
|
+
description: API base URL
|
|
55
|
+
- key: apiToken
|
|
56
|
+
value: ''
|
|
57
|
+
enabled: false
|
|
58
|
+
type: secret
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
After any hand edit, run `postman environment lint <file-or-directory>`. Use
|
|
62
|
+
`postman workspace lint` when the task is to validate the entire local
|
|
63
|
+
workspace, not just its environments.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Non-HTTP request schemas (v3)
|
|
2
|
+
|
|
3
|
+
Read this only when a collection actually contains one of these request
|
|
4
|
+
types — for the common case, the HTTP schema in the parent
|
|
5
|
+
[SKILL.md](../SKILL.md) is the one that applies.
|
|
6
|
+
|
|
7
|
+
## GraphQL request
|
|
8
|
+
|
|
9
|
+
- `$kind: "graphql-request"` — required.
|
|
10
|
+
- `url` — string.
|
|
11
|
+
- `order` — optional.
|
|
12
|
+
- `query` — string (the GraphQL query).
|
|
13
|
+
- `variables` — string (a YAML string containing a JSON object).
|
|
14
|
+
- `headers` — array of `{key, value, description?, disabled?}`.
|
|
15
|
+
- `auth` — `{type, credentials}`.
|
|
16
|
+
- `settings` — `{disabledSystemHeaders?}`.
|
|
17
|
+
- `scripts` — array of `{type: "beforeQuery"|"afterResponse", code, language}`.
|
|
18
|
+
|
|
19
|
+
## gRPC request
|
|
20
|
+
|
|
21
|
+
- `$kind: "grpc-request"` — required.
|
|
22
|
+
- `url` — string.
|
|
23
|
+
- `order` — optional.
|
|
24
|
+
- `methodPath` — string.
|
|
25
|
+
- `methodDescriptor` — string.
|
|
26
|
+
- `message` — `{content: string (JSON)}`.
|
|
27
|
+
- `metadata` — array of `{key, value, description?}`.
|
|
28
|
+
- `auth` — `{type, credentials}`.
|
|
29
|
+
- `settings` —
|
|
30
|
+
`{secureConnection?, strictSSL?, maxResponseMessageSize?, includeDefaultFields?, connectionTimeout?}`.
|
|
31
|
+
- `scripts` — array of `{type: "beforeInvoke"|"afterResponse", code, language}`.
|
|
32
|
+
|
|
33
|
+
## WebSocket request
|
|
34
|
+
|
|
35
|
+
- `$kind: "websocket-request"` — required.
|
|
36
|
+
- `url` — string.
|
|
37
|
+
- `order` — optional.
|
|
38
|
+
- `headers` — array of `{key, value, description?, disabled?}`.
|
|
39
|
+
- `queryParams` — array of `{key, value, description?, disabled?}`.
|
|
40
|
+
- `settings` — `{handshakeTimeout?, retryCount?, retryDelay?, maxPayload?, strictSSL?}`.
|
|
41
|
+
|
|
42
|
+
## Socket.IO request
|
|
43
|
+
|
|
44
|
+
- `$kind: "socket.io-request"` — required.
|
|
45
|
+
- `url` — string.
|
|
46
|
+
- `order` — optional.
|
|
47
|
+
- `headers` — array of `{key, value}`.
|
|
48
|
+
- `queryParams` — array of `{key, value}`.
|
|
49
|
+
- `events` — array of `{name, description?, subscribeOnConnect: boolean}`.
|
|
50
|
+
- `settings` — `{version?, path?, handshakeTimeout?, retryCount?, retryDelay?, strictSSL?}`.
|
|
51
|
+
|
|
52
|
+
## MQTT request
|
|
53
|
+
|
|
54
|
+
- `$kind: "mqtt-request"` — required.
|
|
55
|
+
- `url` — string.
|
|
56
|
+
- `order` — optional.
|
|
57
|
+
- `clientId` — string.
|
|
58
|
+
- `version` — `4 | 5`.
|
|
59
|
+
- `topics` — array of
|
|
60
|
+
`{name, qos: 0|1|2, subscribe: boolean, description?, settings: {noLocal?, retainAsPublished?, retainHandling?, subscriptionIdentifier?}}`.
|
|
61
|
+
- `lastWill` — `{topic, payload, qos, retain, type: "text"|"json", properties: {messageExpiryInterval?, contentType?}}`.
|
|
62
|
+
- `properties` —
|
|
63
|
+
`{sessionExpiryInterval?, receiveMaximum?, maximumPacketSize?, requestResponseInformation?, userProperties: [{key, value}]}`.
|
|
64
|
+
- `settings` — `{cleanSession?, keepAlive?, autoReconnect?, connectionTimeout?, strictSSL?}`.
|
|
65
|
+
|
|
66
|
+
## MCP request
|
|
67
|
+
|
|
68
|
+
- `$kind: "mcp-request"` — required.
|
|
69
|
+
- `transport` — `"sse" | "stdio"`.
|
|
70
|
+
- `order` — optional.
|
|
71
|
+
- SSE shape: `{url, headers?, message, auth?, settings: {strictSSL?, requestTimeout?, sessionTimeout?}}`.
|
|
72
|
+
- STDIO shape: `{command, env: [{key, value}], message, auth?, settings: {requestTimeout?}}`.
|
|
73
|
+
|
|
74
|
+
## LLM request
|
|
75
|
+
|
|
76
|
+
- `$kind: "llm-request"` — required.
|
|
77
|
+
- `url` — string.
|
|
78
|
+
- `order` — optional.
|
|
79
|
+
- `config` — `{model, provider}`.
|
|
80
|
+
- `userPrompts` — array of `{id, value, timestamp, active, type: "text"}`.
|
|
81
|
+
- `systemPrompts` — array of `{id, value, timestamp, active, type: "text"}`.
|
|
82
|
+
- `mcpConfig` — optional string (JSON config).
|
|
83
|
+
- `enabledTools` — optional array of strings.
|
|
84
|
+
- `auth` — `{type, credentials}`.
|
|
85
|
+
- `settings` —
|
|
86
|
+
`{temperature?, maxToken?, streamResponse?, responseFormatJSON?, topP?, presencePenalty?, frequencyPenalty?, maxSteps?, streamTools?}`.
|