postman-cli-completion 1.67.0 → 1.73.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/completions/bash/postman.bash +1356 -873
- package/completions/fish/postman.fish +1245 -949
- package/completions/zsh/_postman +1939 -1413
- package/package.json +1 -1
package/completions/zsh/_postman
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#compdef postman
|
|
2
2
|
compdef _postman postman
|
|
3
|
-
# Zsh completion for Postman CLI (postman v1.
|
|
3
|
+
# Zsh completion for Postman CLI (postman v1.73.0)
|
|
4
4
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
5
5
|
# Source: spec/commands.json
|
|
6
6
|
# https://github.com/yokawasa/postman-cli-completion
|
|
@@ -10,46 +10,47 @@ _postman() {
|
|
|
10
10
|
typeset -A opt_args
|
|
11
11
|
|
|
12
12
|
_arguments -C \
|
|
13
|
-
'
|
|
13
|
+
'--color[Enable/Disable colored output (auto|on|off)]:value:(auto on off)' \
|
|
14
|
+
'(-h --help)'{-h,--help}'[Show help for command]' \
|
|
14
15
|
'--silent[Silences all terminal output]' \
|
|
15
|
-
'--
|
|
16
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
16
|
+
'(-v --version)'{-v,--version}'[Show postman version]' \
|
|
17
17
|
'1: :_postman_commands' \
|
|
18
18
|
'*::arg:->args'
|
|
19
19
|
|
|
20
20
|
case $state in
|
|
21
21
|
args)
|
|
22
22
|
case $words[1] in
|
|
23
|
-
|
|
24
|
-
signup) _postman_signup ;;
|
|
25
|
-
logout) _postman_logout ;;
|
|
26
|
-
init) _postman_init ;;
|
|
27
|
-
whoami) _postman_whoami ;;
|
|
28
|
-
feedback) _postman_feedback ;;
|
|
29
|
-
update) _postman_update ;;
|
|
30
|
-
skills) _postman_skills ;;
|
|
23
|
+
api) _postman_api ;;
|
|
31
24
|
collection) _postman_collection ;;
|
|
25
|
+
dataset) _postman_dataset ;;
|
|
32
26
|
environment) _postman_environment ;;
|
|
27
|
+
flows|fl) _postman_flows ;;
|
|
33
28
|
globals) _postman_globals ;;
|
|
34
|
-
|
|
35
|
-
runner) _postman_runner ;;
|
|
36
|
-
spec) _postman_spec ;;
|
|
29
|
+
mock) _postman_mock ;;
|
|
37
30
|
monitor) _postman_monitor ;;
|
|
38
|
-
workspace|ws) _postman_workspace ;;
|
|
39
|
-
team) _postman_team ;;
|
|
40
|
-
performance) _postman_performance ;;
|
|
41
|
-
flows|fl) _postman_flows ;;
|
|
42
31
|
request) _postman_request ;;
|
|
32
|
+
runner) _postman_runner ;;
|
|
43
33
|
sdk) _postman_sdk ;;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
simulate) _postman_simulate ;;
|
|
47
|
-
describe) _postman_describe ;;
|
|
34
|
+
spec) _postman_spec ;;
|
|
35
|
+
workspace|ws) _postman_workspace ;;
|
|
48
36
|
context-graph) _postman_context_graph ;;
|
|
37
|
+
describe) _postman_describe ;;
|
|
38
|
+
init) _postman_init ;;
|
|
49
39
|
search) _postman_search ;;
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
skills) _postman_skills ;;
|
|
41
|
+
login) _postman_login ;;
|
|
42
|
+
logout) _postman_logout ;;
|
|
43
|
+
signup) _postman_signup ;;
|
|
44
|
+
whoami) _postman_whoami ;;
|
|
45
|
+
application|app) _postman_application ;;
|
|
52
46
|
dependency) _postman_dependency ;;
|
|
47
|
+
feedback) _postman_feedback ;;
|
|
48
|
+
performance) _postman_performance ;;
|
|
49
|
+
secret) _postman_secret ;;
|
|
50
|
+
simulation) _postman_simulation ;;
|
|
51
|
+
team) _postman_team ;;
|
|
52
|
+
update) _postman_update ;;
|
|
53
|
+
webhook) _postman_webhook ;;
|
|
53
54
|
esac
|
|
54
55
|
;;
|
|
55
56
|
esac
|
|
@@ -58,140 +59,89 @@ _postman() {
|
|
|
58
59
|
_postman_commands() {
|
|
59
60
|
local -a commands
|
|
60
61
|
commands=(
|
|
61
|
-
'login:Authenticate with Postman to access your resources.'
|
|
62
|
-
'signup:Sign up to keep the work you created as a guest (claims your guest workspace). Waits and signs this CLI in once the sign-up is completed in a browser — opening that browser here on a terminal, or printing the URL to hand over when output is piped.'
|
|
63
|
-
'logout:Delete the stored Postman API key.'
|
|
64
|
-
'init:Set up Postman artifacts and agent instructions in a repository.'
|
|
65
|
-
'whoami:Show the Postman account or guest session this CLI session is using.'
|
|
66
|
-
'feedback:Submit feedback about CLI usability, gaps, and improvement suggestions.'
|
|
67
|
-
'update:Update Postman CLI using the original installation method.'
|
|
68
|
-
'skills:Check and update the agent skills in this repository.'
|
|
69
|
-
'collection:Run and test your Postman collections directly from the command line.'
|
|
70
|
-
'environment:Work with local Postman environments from the command line. Also read cloud environments by ID.'
|
|
71
|
-
'globals:Work with local Postman globals from the command line.'
|
|
72
62
|
'api:Publish and test your APIs directly from the command line'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
77
|
-
'ws:Alias for workspace'
|
|
78
|
-
'team:Work with the teams inside your organisation.'
|
|
79
|
-
'performance:Manage performance tests on your collections.'
|
|
80
|
-
'flows:Manage and interact with flows.'
|
|
63
|
+
'collection:Run and test your Postman collections directly from the command line'
|
|
64
|
+
'dataset:Work with Postman datasets in local YAML files or the cloud'
|
|
65
|
+
'environment:Work with local and cloud Postman environments'
|
|
66
|
+
'flows:Manage and interact with flows'
|
|
81
67
|
'fl:Alias for flows'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
'
|
|
68
|
+
'globals:Work with local and cloud Postman globals'
|
|
69
|
+
'mock:Create, run, and manage Postman mocks'
|
|
70
|
+
'monitor:Run and manage Postman monitors'
|
|
71
|
+
'request:Send HTTP requests with full Postman capabilities'
|
|
72
|
+
'runner:Start and inspect self-hosted runners, and list Postman-operated regions'
|
|
73
|
+
'sdk:Generate and manage your SDKs directly from the command line'
|
|
74
|
+
'spec:Lint and validate specifications from the command line'
|
|
75
|
+
'workspace:Manage workspace resources'
|
|
76
|
+
'ws:Alias for workspace'
|
|
77
|
+
'context-graph:Ask natural-language questions about your team'\''s Context Graph'
|
|
78
|
+
'describe:Get API context for AI coding agents directly from the command line'
|
|
79
|
+
'init:Set up Postman artifacts and agent instructions in a repository'
|
|
80
|
+
'search:Search for Postman element types'
|
|
81
|
+
'skills:Check and update the agent skills in this repository'
|
|
82
|
+
'login:Authenticate with Postman to access your resources'
|
|
83
|
+
'logout:Delete the stored Postman API key'
|
|
84
|
+
'signup:Sign up to keep the work you created as a guest'
|
|
85
|
+
'whoami:Show the Postman account or guest session this CLI session is using'
|
|
86
|
+
'application:Application-level commands\: initialise config and run tests'
|
|
86
87
|
'app:Alias for application'
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
88
|
+
'dependency:Manage workspace dependencies reused from other workspaces'
|
|
89
|
+
'feedback:Submit feedback about CLI usability, gaps, and improvements'
|
|
90
|
+
'performance:Manage performance tests on your collections'
|
|
91
|
+
'secret:Create and manage Postman secrets in a team'\''s shared vault'
|
|
92
|
+
'simulation:Create, run and manage simulations'
|
|
93
|
+
'team:Work with the teams inside your organisation'
|
|
94
|
+
'update:Update Postman CLI using the original installation method'
|
|
95
|
+
'webhook:Create and manage Postman webhooks'
|
|
94
96
|
)
|
|
95
97
|
_describe -t commands 'postman command' commands
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
_arguments \
|
|
100
|
-
'--alias[Specify the alias of the API key to fetch your resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
|
|
101
|
-
'--with-api-key[Specify the API key directly.]:apikey' \
|
|
102
|
-
'--region[Specify the region for authentication. Use "eu" for EU region.]:region:(us eu)' \
|
|
103
|
-
'--verbose[Show detailed error information]' \
|
|
104
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
_postman_signup() {
|
|
108
|
-
_arguments \
|
|
109
|
-
'--guest[Start working as an anonymous guest instead of signing up — no account or browser needed, so it works anywhere. Your work is saved to a temporary workspace you can keep later by running `postman signup`.]' \
|
|
110
|
-
'--json[Print the sign-up details as machine-readable JSON.]' \
|
|
111
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
_postman_logout() {
|
|
115
|
-
_arguments \
|
|
116
|
-
'--alias[Specify the alias of the API key to fetch your resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
|
|
117
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
_postman_init() {
|
|
121
|
-
_arguments \
|
|
122
|
-
'--json[Emit machine-readable output for agents]' \
|
|
123
|
-
'--dry-run[Report what would happen without writing anything]' \
|
|
124
|
-
'--no-fetch[Use the skills bundled with this CLI instead of fetching the latest]' \
|
|
125
|
-
'--spec[Which spec is authoritative, when more than one could be]:path:_files -g "*.(yaml|yml|json)"' \
|
|
126
|
-
'--visibility[Create and bind a workspace non-interactively (personal, team)]:status' \
|
|
127
|
-
'--no-cloud[Skip the workspace step entirely]' \
|
|
128
|
-
'--report-events[Send init analytics to Postman (requires login)]' \
|
|
129
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
130
|
-
'*:path:_files -g "*.json"'
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
_postman_whoami() {
|
|
134
|
-
_arguments \
|
|
135
|
-
'--json[Print current identity as machine-readable JSON.]' \
|
|
136
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
_postman_feedback() {
|
|
140
|
-
_arguments \
|
|
141
|
-
'--type[Feedback type\: cli_gap, improvement_suggestion, bug_report, feature_request, general (default\: general)]:type' \
|
|
142
|
-
'--context[Command or feature context this feedback is about]:context' \
|
|
143
|
-
'--json[Print result as machine-readable JSON]' \
|
|
144
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
145
|
-
'*:text:'
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
_postman_update() {
|
|
149
|
-
_arguments \
|
|
150
|
-
'--check[Check whether a Postman CLI update is available.]' \
|
|
151
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
_postman_skills() {
|
|
100
|
+
_postman_api() {
|
|
155
101
|
local context state state_descr line
|
|
156
102
|
typeset -A opt_args
|
|
157
103
|
_arguments -C \
|
|
158
104
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
159
|
-
'1: :
|
|
105
|
+
'1: :_postman_api_commands' \
|
|
160
106
|
'*::arg:->args'
|
|
161
107
|
case $state in
|
|
162
108
|
args)
|
|
163
109
|
case $words[1] in
|
|
164
|
-
|
|
165
|
-
|
|
110
|
+
lint) _postman_api_lint ;;
|
|
111
|
+
publish) _postman_api_publish ;;
|
|
166
112
|
esac
|
|
167
113
|
;;
|
|
168
114
|
esac
|
|
169
115
|
}
|
|
170
116
|
|
|
171
|
-
|
|
117
|
+
_postman_api_commands() {
|
|
172
118
|
local -a sub
|
|
173
119
|
sub=(
|
|
174
|
-
'
|
|
175
|
-
'
|
|
120
|
+
'lint:Run linting on the schema of the given API ID or local file in the given path. If \[api\] is not provided we will run the linting on the schema present in the .postman config file'
|
|
121
|
+
'publish:Publish a version of an API for the given apiId. All entities added to the API will be published by default. User can choose which entities to publish by using additional options.'
|
|
176
122
|
)
|
|
177
|
-
_describe -t commands '
|
|
123
|
+
_describe -t commands 'api command' sub
|
|
178
124
|
}
|
|
179
125
|
|
|
180
|
-
|
|
126
|
+
_postman_api_lint() {
|
|
181
127
|
_arguments \
|
|
182
|
-
'--
|
|
183
|
-
'--
|
|
128
|
+
'--integration-id[Specify the integration ID for the report.]:integration-id' \
|
|
129
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Results of this level or above will trigger a failure exit code. \[choices\: "error", "warn", "info", "hint"\] (default\: "ERROR")]:value' \
|
|
130
|
+
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
|
|
184
131
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
185
|
-
'*:
|
|
132
|
+
'*:api:'
|
|
186
133
|
}
|
|
187
134
|
|
|
188
|
-
|
|
135
|
+
_postman_api_publish() {
|
|
189
136
|
_arguments \
|
|
190
|
-
'--
|
|
191
|
-
'--
|
|
192
|
-
'--
|
|
137
|
+
'--name[Specify the name of the version to publish.]:name' \
|
|
138
|
+
'--release-notes[Specify release notes for the version to publish.]:releaseNotes' \
|
|
139
|
+
'--collections[Specify the collections to publish. If API is connected to a repository, provide file path instead of IDs.]:collectionIds/paths...:_files -g "*.json"' \
|
|
140
|
+
'--api-definition[Specify the API Definition to publish. If API is connected to a repository, provide schema root file path. Note that some repository connections utilize a schema directory path; for such APIs, provide schema directory path instead of file path.]:apiDefinitionId/directory/file' \
|
|
141
|
+
'--do-not-poll[Specify whether or not to poll for completion status of the publish action.]' \
|
|
142
|
+
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run.]' \
|
|
193
143
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
194
|
-
'*:
|
|
144
|
+
'*:apiId:'
|
|
195
145
|
}
|
|
196
146
|
|
|
197
147
|
_postman_collection() {
|
|
@@ -207,12 +157,16 @@ _postman_collection() {
|
|
|
207
157
|
new) _postman_collection_new ;;
|
|
208
158
|
migrate) _postman_collection_migrate ;;
|
|
209
159
|
lint) _postman_collection_lint ;;
|
|
160
|
+
ai-readiness) _postman_collection_ai_readiness ;;
|
|
210
161
|
get) _postman_collection_get ;;
|
|
162
|
+
delete) _postman_collection_delete ;;
|
|
211
163
|
publish) _postman_collection_publish ;;
|
|
212
164
|
generate) _postman_collection_generate ;;
|
|
213
165
|
sync) _postman_collection_sync ;;
|
|
214
166
|
request) _postman_collection_request ;;
|
|
215
167
|
folder) _postman_collection_folder ;;
|
|
168
|
+
example) _postman_collection_example ;;
|
|
169
|
+
import) _postman_collection_import ;;
|
|
216
170
|
list) _postman_collection_list ;;
|
|
217
171
|
run) _postman_collection_run ;;
|
|
218
172
|
esac
|
|
@@ -226,12 +180,16 @@ _postman_collection_commands() {
|
|
|
226
180
|
'new:Scaffold a v3 collection on disk, or create one in a cloud Postman workspace with --workspace.'
|
|
227
181
|
'migrate:Migrate a v2.1 collection to the v3 format'
|
|
228
182
|
'lint:Run linting on a local v3 collection at the given file or directory path.'
|
|
183
|
+
'ai-readiness:Score a Postman collection for AI readiness by ID, local file path, or local-mode directory.'
|
|
229
184
|
'get:Fetch a Postman collection in the V3 format and print it.'
|
|
185
|
+
'delete:Delete a cloud collection by id or a local collection directory by path. Prompts unless --yes is passed.'
|
|
230
186
|
'publish:Publish a cloud collection'\''s documentation (or request Community Manager approval).'
|
|
231
187
|
'generate:Generate artifacts from a collection.'
|
|
232
188
|
'sync:Sync artifacts generated from a collection.'
|
|
233
|
-
'request:Add, update, or remove requests in a local v3 collection.'
|
|
234
|
-
'folder:Add, update, or remove folders in a local v3 collection.'
|
|
189
|
+
'request:Add, get, update, or remove requests in a local v3 collection.'
|
|
190
|
+
'folder:Add, get, update, or remove folders in a local v3 collection.'
|
|
191
|
+
'example:Add, update, remove, get, or list examples (saved responses) under a request.'
|
|
192
|
+
'import:Import a cURL or HAR source into a v3 collection (local, or cloud with --workspace).'
|
|
235
193
|
'list:List collections\: your local project'\''s collections by default, or a Postman cloud workspace'\''s collections with --workspace.'
|
|
236
194
|
'run:Initiate a Postman collection run from a given ID or path.'
|
|
237
195
|
)
|
|
@@ -263,6 +221,15 @@ _postman_collection_lint() {
|
|
|
263
221
|
'*:path:_files -g "*.json"'
|
|
264
222
|
}
|
|
265
223
|
|
|
224
|
+
_postman_collection_ai_readiness() {
|
|
225
|
+
_arguments \
|
|
226
|
+
'(-o --output)'{-o,--output}'[Output format for the results. \[choices\: "cli", "json", "html"\]]:value' \
|
|
227
|
+
'--export[Write the report to this file instead of stdout. A directory receives the report under a name derived from the collection. Requires --output html.]:path:_files -g "*.json"' \
|
|
228
|
+
'--min-score[Exit with a non-zero code if the overall score is below this threshold (0-100).]:n' \
|
|
229
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
230
|
+
'*:collectionId/Path:_files -g "*.json"'
|
|
231
|
+
}
|
|
232
|
+
|
|
266
233
|
_postman_collection_get() {
|
|
267
234
|
_arguments \
|
|
268
235
|
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
@@ -271,6 +238,16 @@ _postman_collection_get() {
|
|
|
271
238
|
'*:id:'
|
|
272
239
|
}
|
|
273
240
|
|
|
241
|
+
_postman_collection_delete() {
|
|
242
|
+
_arguments \
|
|
243
|
+
'(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
|
|
244
|
+
'--api-key[Postman API key, used when deleting a cloud collection]:key:_files -g "*.(pem|crt|key)"' \
|
|
245
|
+
'--verbose[Verbose output]' \
|
|
246
|
+
'--json[Output the result as JSON]' \
|
|
247
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
248
|
+
'*:idOrPath:'
|
|
249
|
+
}
|
|
250
|
+
|
|
274
251
|
_postman_collection_publish() {
|
|
275
252
|
_arguments \
|
|
276
253
|
'--target[Where to publish (default\: documentation) (default\: "documentation")]:name' \
|
|
@@ -361,6 +338,7 @@ _postman_collection_request() {
|
|
|
361
338
|
args)
|
|
362
339
|
case $words[1] in
|
|
363
340
|
add) _postman_collection_request_add ;;
|
|
341
|
+
get) _postman_collection_request_get ;;
|
|
364
342
|
update) _postman_collection_request_update ;;
|
|
365
343
|
rm|remove) _postman_collection_request_rm ;;
|
|
366
344
|
esac
|
|
@@ -372,6 +350,7 @@ _postman_collection_request_commands() {
|
|
|
372
350
|
local -a sub
|
|
373
351
|
sub=(
|
|
374
352
|
'add:Add an empty request to a local v3 collection (set its details later with `update`).'
|
|
353
|
+
'get:Show a request (any type) in a v3 collection\: its own fields, with examples and messages as references.'
|
|
375
354
|
'update:Update a request in a v3 collection (only the fields you pass).'
|
|
376
355
|
'rm:Remove a request (any type) from a v3 collection.'
|
|
377
356
|
'remove:Alias for rm'
|
|
@@ -390,6 +369,16 @@ _postman_collection_request_add() {
|
|
|
390
369
|
'*:request-name:'
|
|
391
370
|
}
|
|
392
371
|
|
|
372
|
+
_postman_collection_request_get() {
|
|
373
|
+
_arguments \
|
|
374
|
+
'--collection[Target collection\: name, directory, id, cloud id, or path. Required locally; optional in cloud mode (id only).]:id|name' \
|
|
375
|
+
'--folder[Folder to scope a bare-name request selector, e.g. "Users/Admin" (local mode only).]:id|name|path' \
|
|
376
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
377
|
+
'--json[JSON output.]' \
|
|
378
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
379
|
+
'*:request:'
|
|
380
|
+
}
|
|
381
|
+
|
|
393
382
|
_postman_collection_request_update() {
|
|
394
383
|
_arguments \
|
|
395
384
|
'--collection[Target collection\: name, directory, id, cloud id, or path (cloud\: id only). Required.]:id|name' \
|
|
@@ -434,6 +423,7 @@ _postman_collection_folder() {
|
|
|
434
423
|
args)
|
|
435
424
|
case $words[1] in
|
|
436
425
|
add) _postman_collection_folder_add ;;
|
|
426
|
+
get) _postman_collection_folder_get ;;
|
|
437
427
|
update) _postman_collection_folder_update ;;
|
|
438
428
|
rm|remove) _postman_collection_folder_rm ;;
|
|
439
429
|
esac
|
|
@@ -445,6 +435,7 @@ _postman_collection_folder_commands() {
|
|
|
445
435
|
local -a sub
|
|
446
436
|
sub=(
|
|
447
437
|
'add:Add an empty folder to a local v3 collection (set its details later with `update`).'
|
|
438
|
+
'get:Show a folder in a v3 collection\: its own fields and its direct children as references.'
|
|
448
439
|
'update:Update a folder in a v3 collection (only the fields you pass).'
|
|
449
440
|
'rm:Remove a folder from a v3 collection (recursive\: removes everything inside it).'
|
|
450
441
|
'remove:Alias for rm'
|
|
@@ -462,6 +453,16 @@ _postman_collection_folder_add() {
|
|
|
462
453
|
'*:folder-name:'
|
|
463
454
|
}
|
|
464
455
|
|
|
456
|
+
_postman_collection_folder_get() {
|
|
457
|
+
_arguments \
|
|
458
|
+
'--collection[Target collection\: name, directory, id, cloud id, or path. Required locally; optional in cloud mode (id only).]:id|name' \
|
|
459
|
+
'--folder[Parent folder to scope a bare-name selector, e.g. "Users" (local mode only).]:id|name|path' \
|
|
460
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
461
|
+
'--json[JSON output.]' \
|
|
462
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
463
|
+
'*:folder:'
|
|
464
|
+
}
|
|
465
|
+
|
|
465
466
|
_postman_collection_folder_update() {
|
|
466
467
|
_arguments \
|
|
467
468
|
'--collection[Target collection\: name, directory, id, cloud id, or path (cloud\: id only). Required.]:id|name' \
|
|
@@ -487,6 +488,125 @@ _postman_collection_folder_rm() {
|
|
|
487
488
|
'*:folder:'
|
|
488
489
|
}
|
|
489
490
|
|
|
491
|
+
_postman_collection_example() {
|
|
492
|
+
local context state state_descr line
|
|
493
|
+
typeset -A opt_args
|
|
494
|
+
_arguments -C \
|
|
495
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
496
|
+
'1: :_postman_collection_example_commands' \
|
|
497
|
+
'*::arg:->args'
|
|
498
|
+
case $state in
|
|
499
|
+
args)
|
|
500
|
+
case $words[1] in
|
|
501
|
+
add) _postman_collection_example_add ;;
|
|
502
|
+
update) _postman_collection_example_update ;;
|
|
503
|
+
rm|remove) _postman_collection_example_rm ;;
|
|
504
|
+
get) _postman_collection_example_get ;;
|
|
505
|
+
list) _postman_collection_example_list ;;
|
|
506
|
+
esac
|
|
507
|
+
;;
|
|
508
|
+
esac
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
_postman_collection_example_commands() {
|
|
512
|
+
local -a sub
|
|
513
|
+
sub=(
|
|
514
|
+
'add:Add an empty example under a request (defaults to 200 OK; set details later with `update`).'
|
|
515
|
+
'update:Update an example (only the fields you pass).'
|
|
516
|
+
'rm:Remove an example from a request.'
|
|
517
|
+
'remove:Alias for rm'
|
|
518
|
+
'get:Get a single example.'
|
|
519
|
+
'list:List examples under a request.'
|
|
520
|
+
)
|
|
521
|
+
_describe -t commands 'example command' sub
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
_postman_collection_example_add() {
|
|
525
|
+
_arguments \
|
|
526
|
+
'--collection[Target collection\: name, directory, id, cloud id, or path. Required.]:id|name' \
|
|
527
|
+
'--request[Parent request (required). Local\: name/path/id; cloud\: id.]:id|name|path' \
|
|
528
|
+
'--folder[Folder to scope the request selector, e.g. "Users/Admin".]:id|name|path' \
|
|
529
|
+
'--type[Example type\: http (default). (default\: "http")]:type' \
|
|
530
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
531
|
+
'--json[JSON output.]' \
|
|
532
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
533
|
+
'*:example-name:'
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
_postman_collection_example_update() {
|
|
537
|
+
_arguments \
|
|
538
|
+
'--collection[Target collection. Required.]:id|name' \
|
|
539
|
+
'--request[Parent request (optional; disambiguates local names / --copy-request).]:id|name|path' \
|
|
540
|
+
'--folder[Folder to scope the request selector.]:id|name|path' \
|
|
541
|
+
'--status-code[HTTP status code.]:code' \
|
|
542
|
+
'--status-text[HTTP status text.]:text' \
|
|
543
|
+
'(-d --body)'{-d,--body}'[Response body as contentType\:content.]:body' \
|
|
544
|
+
'--headers[Replace response headers. Repeatable. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
|
|
545
|
+
'--description[Example description.]:text' \
|
|
546
|
+
'--rename[Rename the example.]:name' \
|
|
547
|
+
'--url[Example request snapshot URL.]:url' \
|
|
548
|
+
'--method[Example request snapshot method.]:method' \
|
|
549
|
+
'--request-headers[Replace request-snapshot headers. Repeatable. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
|
|
550
|
+
'--request-param[Replace request-snapshot query params. Repeatable. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
|
|
551
|
+
'--request-body[Example request snapshot body.]:body' \
|
|
552
|
+
'--copy-request[Refresh example.request from the parent request.]' \
|
|
553
|
+
'--clear-request[Remove the example.request snapshot.]' \
|
|
554
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
555
|
+
'--type[Example type for cloud mode\: http. (default\: "http")]:type' \
|
|
556
|
+
'--json[JSON output.]' \
|
|
557
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
558
|
+
'*:example:'
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
_postman_collection_example_rm() {
|
|
562
|
+
_arguments \
|
|
563
|
+
'--collection[Target collection. Required.]:id|name' \
|
|
564
|
+
'--request[Parent request (optional; disambiguates local names).]:id|name|path' \
|
|
565
|
+
'--folder[Folder to scope the request selector.]:id|name|path' \
|
|
566
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
567
|
+
'--type[Example type for cloud mode\: http. (default\: "http")]:type' \
|
|
568
|
+
'--json[JSON output.]' \
|
|
569
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
570
|
+
'*:example:'
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
_postman_collection_example_get() {
|
|
574
|
+
_arguments \
|
|
575
|
+
'--collection[Target collection. Required.]:id|name' \
|
|
576
|
+
'--request[Parent request (optional; disambiguates local names).]:id|name|path' \
|
|
577
|
+
'--folder[Folder to scope the request selector.]:id|name|path' \
|
|
578
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
579
|
+
'--type[Example type for cloud mode\: http. (default\: "http")]:type' \
|
|
580
|
+
'--json[JSON output.]' \
|
|
581
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
582
|
+
'*:example:'
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
_postman_collection_example_list() {
|
|
586
|
+
_arguments \
|
|
587
|
+
'--collection[Target collection. Required.]:id|name' \
|
|
588
|
+
'--request[Parent request (required).]:id|name|path' \
|
|
589
|
+
'--folder[Folder to scope the request selector.]:id|name|path' \
|
|
590
|
+
'(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
|
|
591
|
+
'--type[Example type for cloud mode\: http. (default\: "http")]:type' \
|
|
592
|
+
'--json[JSON output.]' \
|
|
593
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
_postman_collection_import() {
|
|
597
|
+
_arguments \
|
|
598
|
+
'--type[Source format\: curl or har. Auto-detected from the extension/content when omitted.]:format' \
|
|
599
|
+
'--name[Collection display name. Defaults to a per-format fallback.]:name' \
|
|
600
|
+
'(-o --output)'{-o,--output}'[Output directory for the local collection (default\: postman/collections/<name>).]:dir:_files -g "*.json"' \
|
|
601
|
+
'(-w --workspace)'{-w,--workspace}'[Create the collection in a Postman cloud workspace by id (cloud mode).]:id' \
|
|
602
|
+
'--force[Overwrite an existing local target directory.]' \
|
|
603
|
+
'--timeout[Max time for a cloud import, in milliseconds (default 120000).]:ms' \
|
|
604
|
+
'--verbose[Verbose output (cloud import diagnostics).]' \
|
|
605
|
+
'--json[JSON output.]' \
|
|
606
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
607
|
+
'*:src:'
|
|
608
|
+
}
|
|
609
|
+
|
|
490
610
|
_postman_collection_list() {
|
|
491
611
|
_arguments \
|
|
492
612
|
'(-w --workspace)'{-w,--workspace}'[List a Postman cloud workspace'\''s collections by id. Omit to list the local project'\''s collections.]:workspaceId' \
|
|
@@ -501,9 +621,7 @@ _postman_collection_run() {
|
|
|
501
621
|
_arguments \
|
|
502
622
|
'(-e --environment)'{-e,--environment}'[Specify an Id or path to a Postman Environment]:path:_files -g "*.json"' \
|
|
503
623
|
'(-g --globals)'{-g,--globals}'[Specify an Id or path to a file containing Postman Globals]:path:_files -g "*.json"' \
|
|
504
|
-
'
|
|
505
|
-
'--output[Write a YAML-based run report to the given folder. Creates a paired `<prefix>.collection-run-summary.yaml` (refreshed during the run) and streaming `<prefix>.collection-run-executions.yaml`, where prefix defaults to `<collection-slug>-<timestamp>`. Gotcha\: --output streams run data to file and cannot be combined with the built-in reporters (-r/--reporter-*); doing so exits with an error. This keeps large runs from buffering an entire report in memory.]:folder' \
|
|
506
|
-
'--reporter-json-structure[\[Optional\] Generate JSON report using the Newman schema. By default, JSON reports use the native structure of Postman CLI.]' \
|
|
624
|
+
'--output[Write a YAML-based run report to the given folder. Creates a paired `<prefix>.collection-run-summary.yaml` (refreshed during the run) and streaming `<prefix>.collection-run-executions.yaml`, where prefix defaults to `<collection-slug>-<timestamp>`. Gotcha\: --output streams run data to file, which keeps large runs from buffering an entire report in memory.]:folder' \
|
|
507
625
|
'(-n --iteration-count)'{-n,--iteration-count}'[Define the number of iterations to run]:n' \
|
|
508
626
|
'(-d --iteration-data)'{-d,--iteration-data}'[Specify a data file to use for iterations (either JSON or CSV)]:path:_files -g "*.(json|csv)"' \
|
|
509
627
|
'--iteration-data-dataset[Path to a .dataset.yaml (local collection) or a cloud dataset id (cloud collection) whose view drives the iteration data. Mutually exclusive with --iteration-data. Requires --iteration-data-view.]:pathOrId:_files -g "*.(json|csv)"' \
|
|
@@ -514,7 +632,7 @@ _postman_collection_run() {
|
|
|
514
632
|
'--env-var[Allows the specification of environment variables via the command line, in a key=value format (default\: \[\])]:value' \
|
|
515
633
|
'--integration-id[Specify the integration id for the report. (Only supported in the US region)]:integration-id' \
|
|
516
634
|
'--postman-api-key[API Key used to load the resources from the Postman API (Only supported in the US region, use '\''postman login --region'\'' to authenticate instead)]:apiKey' \
|
|
517
|
-
'--alias[Specify the alias of the API key to fetch remote resources using it.]:alias' \
|
|
635
|
+
'--alias[Specify the alias of the API key to fetch remote resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
|
|
518
636
|
'--bail[Specify whether or not to gracefully stop a collection run on encountering an error and whether to end the run with an error based on the optional modifier]:modifiers:(folder failure)' \
|
|
519
637
|
'--ignore-redirects[Prevents Postman CLI from automatically following 3XX redirect responses]' \
|
|
520
638
|
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
|
|
@@ -536,1136 +654,1135 @@ _postman_collection_run() {
|
|
|
536
654
|
'--export-cookie-jar[Exports the cookie jar to a file after completing the run]:path:_files -g "*.json"' \
|
|
537
655
|
'--verbose[Show detailed information of collection run and each request sent]' \
|
|
538
656
|
'--mock[Start a mock server for the run, its path if it lives in your repository (relative or absolute, e.g. ./postman/mocks/orders) or its id if it lives in Postman cloud (fetched then run locally). An id needs `postman login` (or --postman-api-key).]:pathOrId:_files -g "*.json"' \
|
|
539
|
-
'--port[Port for the --mock server (e.g. 4010), or "auto" for a free one. Defaults to the
|
|
657
|
+
'--port[Port for the --mock server or --simulation (e.g. 4010), or "auto" for a free one. Defaults to the configured port. Only valid with --mock or --simulation.]:port' \
|
|
540
658
|
'--use-mock[Redirect requests for a URL or {{variable}} to a mock during the run. Format\: "<url> mock|mock-server\:<path|id> \[scenario\]". Repeat the flag to redirect several URLs (one --use-mock each). Use "mock\:<path>" for a mock in your repository (path relative or absolute, e.g. ./postman/mocks/orders), "mock\:<id>" for a mock in Postman cloud (fetched then run locally), or "mock-server\:<id>" to send requests to a deployed mock server. An id needs `postman login` (or --postman-api-key). The optional third field picks a scenario (defaults to "default"). (default\: \[\])]:mapping' \
|
|
541
|
-
'--
|
|
542
|
-
'--
|
|
543
|
-
'--
|
|
544
|
-
'--no-
|
|
545
|
-
'--
|
|
546
|
-
'--no-report-events[Do not send analytics to Postman]' \
|
|
547
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
548
|
-
'--reporter-json-export[Path to save the report for the given reporter.]:value:_files -g "*.(json|xml|html)"' \
|
|
549
|
-
'--reporter-junit-export[Path to save the report for the given reporter.]:value:_files -g "*.(json|xml|html)"' \
|
|
550
|
-
'--reporter-html-export[Path to save the report for the given reporter.]:value:_files -g "*.(json|xml|html)"' \
|
|
551
|
-
'--reporter-json-omitRequestBodies[Remove all request bodies from the report.]' \
|
|
552
|
-
'--reporter-html-omitRequestBodies[Remove all request bodies from the report.]' \
|
|
553
|
-
'--reporter-json-omitResponseBodies[Remove all response bodies from the report.]' \
|
|
554
|
-
'--reporter-html-omitResponseBodies[Remove all response bodies from the report.]' \
|
|
555
|
-
'--reporter-json-omitHeaders[Remove all request and response headers from the report.]' \
|
|
556
|
-
'--reporter-html-omitHeaders[Remove all request and response headers from the report.]' \
|
|
557
|
-
'--reporter-json-omitAllHeadersAndBody[Remove all request/response headers and bodies from the report.]' \
|
|
558
|
-
'--reporter-html-omitAllHeadersAndBody[Remove all request/response headers and bodies from the report.]' \
|
|
659
|
+
'--simulation[Run the mocks in a simulation for the run, its .sim.yaml path if it lives in your repository (relative or absolute, e.g. ./postman/simulations/checkout.sim.yaml) or its id if it lives in Postman cloud (fetched then run locally). Members share one port and are addressed by routeKey (e.g. http\://localhost\:3000/<routeKey>/path). An id needs `postman login` (or --postman-api-key).]:pathOrId:_files -g "*.json"' \
|
|
660
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace to record the --simulation run'\''s start history against. Defaults to the simulation'\''s own workspace (when run by id) or the linked project'\''s workspace.]:workspaceId' \
|
|
661
|
+
'--report-events[Dispatch run events, including git-native v3 collection run results and any --simulation start history, to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
|
|
662
|
+
'--no-report-events[Do not dispatch run events (results, --simulation start history, and analytics) to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
663
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
559
664
|
'*:collectionId/Path:_files -g "*.json"'
|
|
560
665
|
}
|
|
561
666
|
|
|
562
|
-
|
|
667
|
+
_postman_dataset() {
|
|
563
668
|
local context state state_descr line
|
|
564
669
|
typeset -A opt_args
|
|
565
670
|
_arguments -C \
|
|
566
671
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
567
|
-
'1: :
|
|
672
|
+
'1: :_postman_dataset_commands' \
|
|
568
673
|
'*::arg:->args'
|
|
569
674
|
case $state in
|
|
570
675
|
args)
|
|
571
676
|
case $words[1] in
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
677
|
+
list) _postman_dataset_list ;;
|
|
678
|
+
get) _postman_dataset_get ;;
|
|
679
|
+
query) _postman_dataset_query ;;
|
|
680
|
+
create) _postman_dataset_create ;;
|
|
681
|
+
delete) _postman_dataset_delete ;;
|
|
682
|
+
source) _postman_dataset_source ;;
|
|
683
|
+
view) _postman_dataset_view ;;
|
|
684
|
+
jdbc) _postman_dataset_jdbc ;;
|
|
577
685
|
esac
|
|
578
686
|
;;
|
|
579
687
|
esac
|
|
580
688
|
}
|
|
581
689
|
|
|
582
|
-
|
|
690
|
+
_postman_dataset_commands() {
|
|
583
691
|
local -a sub
|
|
584
692
|
sub=(
|
|
585
|
-
'
|
|
586
|
-
'
|
|
587
|
-
'
|
|
588
|
-
'
|
|
589
|
-
'
|
|
693
|
+
'list:List local dataset YAMLs under a path, or (no path) a workspace'\''s cloud datasets.'
|
|
694
|
+
'get:Print a dataset'\''s metadata and structure summary (local YAML path or cloud id).'
|
|
695
|
+
'query:Run an ad-hoc SQL query against a dataset (local YAML path or cloud id).'
|
|
696
|
+
'create:Scaffold a new .dataset.yaml at <path>, or (no path, with -w) create a cloud dataset.'
|
|
697
|
+
'delete:Permanently remove a dataset\: a local .dataset.yaml or a cloud dataset id.'
|
|
698
|
+
'source:Inspect and manage a dataset'\''s datasources.'
|
|
699
|
+
'view:Inspect and manage saved views on a dataset.'
|
|
700
|
+
'jdbc:Inspect JDBC drivers before attaching one to a dataset.'
|
|
590
701
|
)
|
|
591
|
-
_describe -t commands '
|
|
702
|
+
_describe -t commands 'dataset command' sub
|
|
592
703
|
}
|
|
593
704
|
|
|
594
|
-
|
|
705
|
+
_postman_dataset_list() {
|
|
595
706
|
_arguments \
|
|
596
|
-
'(-w --workspace)'{-w,--workspace}'[
|
|
597
|
-
'--
|
|
598
|
-
'--
|
|
599
|
-
'--
|
|
600
|
-
'
|
|
601
|
-
'*:name:'
|
|
707
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (cloud list)]:id' \
|
|
708
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
709
|
+
'--json[Output as JSON instead of a table]' \
|
|
710
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
711
|
+
'*:pathOrDir:_files -g "*.json"'
|
|
602
712
|
}
|
|
603
713
|
|
|
604
|
-
|
|
714
|
+
_postman_dataset_get() {
|
|
605
715
|
_arguments \
|
|
606
|
-
'
|
|
607
|
-
'
|
|
608
|
-
'--
|
|
609
|
-
'--json[JSON output]' \
|
|
716
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
717
|
+
'--no-populate[Skip fetching datasources/views for a cloud dataset]' \
|
|
718
|
+
'--json[Output the full dataset as JSON]' \
|
|
610
719
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
611
|
-
'*:
|
|
720
|
+
'*:datasetPathOrId:'
|
|
612
721
|
}
|
|
613
722
|
|
|
614
|
-
|
|
723
|
+
_postman_dataset_query() {
|
|
615
724
|
_arguments \
|
|
616
|
-
'--
|
|
617
|
-
'--
|
|
618
|
-
'--
|
|
725
|
+
'(-q --query)'{-q,--query}'[SQL query to execute (e.g. "SELECT * FROM users LIMIT 10")]:sql' \
|
|
726
|
+
'(-s --source)'{-s,--source}'[Execute directly against a database datasource; without --source, use federated SQLite]:nameOrIdOrSlug' \
|
|
727
|
+
'(-p --param)'{-p,--param}'[Bind values to $1, $2, ... in order; pass multiple values after -p or repeat -p]:value...' \
|
|
728
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
729
|
+
'--json[Output rows as JSON instead of a table]' \
|
|
730
|
+
'--debug[Include safe classified dataset diagnostics]' \
|
|
619
731
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
620
|
-
'*:
|
|
732
|
+
'*:datasetPathOrId:'
|
|
621
733
|
}
|
|
622
734
|
|
|
623
|
-
|
|
735
|
+
_postman_dataset_create() {
|
|
736
|
+
_arguments \
|
|
737
|
+
'(-n --name)'{-n,--name}'[Human-readable name for the dataset]:name' \
|
|
738
|
+
'(-d --description)'{-d,--description}'[Optional description]:desc' \
|
|
739
|
+
'--dataset-id[Override the generated dataset id (local only; defaults to a random v4 UUID)]:uuid' \
|
|
740
|
+
'--force[Overwrite an existing file at <path>]' \
|
|
741
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (create a cloud dataset)]:id' \
|
|
742
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
743
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
744
|
+
'*:path:_files -g "*.json"'
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
_postman_dataset_delete() {
|
|
748
|
+
_arguments \
|
|
749
|
+
'(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
|
|
750
|
+
'--keep-resources[Preserve the local resource directory even when it is empty (local only)]' \
|
|
751
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
752
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
753
|
+
'*:datasetPathOrId:'
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
_postman_dataset_source() {
|
|
624
757
|
local context state state_descr line
|
|
625
758
|
typeset -A opt_args
|
|
626
759
|
_arguments -C \
|
|
627
760
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
628
|
-
'1: :
|
|
761
|
+
'1: :_postman_dataset_source_commands' \
|
|
629
762
|
'*::arg:->args'
|
|
630
763
|
case $state in
|
|
631
764
|
args)
|
|
632
765
|
case $words[1] in
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
766
|
+
list) _postman_dataset_source_list ;;
|
|
767
|
+
add) _postman_dataset_source_add ;;
|
|
768
|
+
remove) _postman_dataset_source_remove ;;
|
|
769
|
+
update) _postman_dataset_source_update ;;
|
|
770
|
+
test) _postman_dataset_source_test ;;
|
|
636
771
|
esac
|
|
637
772
|
;;
|
|
638
773
|
esac
|
|
639
774
|
}
|
|
640
775
|
|
|
641
|
-
|
|
776
|
+
_postman_dataset_source_commands() {
|
|
642
777
|
local -a sub
|
|
643
778
|
sub=(
|
|
644
|
-
'
|
|
645
|
-
'
|
|
646
|
-
'
|
|
779
|
+
'list:List the datasources defined on a dataset (local YAML path or cloud id).'
|
|
780
|
+
'add:Add a datasource to a dataset.'
|
|
781
|
+
'remove:Remove a datasource from a dataset (local YAML path or cloud id).'
|
|
782
|
+
'update:Update fields on an existing datasource. Only the flags you provide are changed.'
|
|
783
|
+
'test:Open and close a real connection using a source'\''s stored configuration.'
|
|
647
784
|
)
|
|
648
|
-
_describe -t commands '
|
|
785
|
+
_describe -t commands 'source command' sub
|
|
649
786
|
}
|
|
650
787
|
|
|
651
|
-
|
|
788
|
+
_postman_dataset_source_list() {
|
|
652
789
|
_arguments \
|
|
653
|
-
'(-
|
|
654
|
-
'--
|
|
655
|
-
'--json[JSON
|
|
656
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
657
|
-
'*:value:'
|
|
790
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset whose sources to list — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
791
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
792
|
+
'--json[Output sources as JSON instead of a table]' \
|
|
793
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
658
794
|
}
|
|
659
795
|
|
|
660
|
-
|
|
796
|
+
_postman_dataset_source_add() {
|
|
661
797
|
_arguments \
|
|
662
|
-
'(-
|
|
663
|
-
'--
|
|
664
|
-
'--
|
|
665
|
-
'--
|
|
798
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset to add the source to; positional target is also accepted for v1.45 compatibility]:datasetPathOrId' \
|
|
799
|
+
'(-n --name)'{-n,--name}'[Logical name for the source (becomes the SQL table name when it loads a file or a database --table). Required for every source except a spreadsheet, whose worksheets are each named source_<worksheet>]:name' \
|
|
800
|
+
'--source-id[Override the generated source id (local dataset only)]:uuid' \
|
|
801
|
+
'--format[Use this format instead of extension/type inference; file contents are not sniffed. A spreadsheet (xlsx/xls/ods) is added as one source per worksheet, each named source_<worksheet>]:csv|json|xlsx|xls|ods|jdbc|mysql|postgres|sqlserver' \
|
|
802
|
+
'--type[Source kind; local is inferred from --file, jdbc from --driver-jar]:local|mysql|postgresql|sqlserver|jdbc' \
|
|
803
|
+
'--file[Path to a local CSV/JSON/spreadsheet file (absolute or cwd-relative)]:path:_files -g "*.json"' \
|
|
804
|
+
'--ref-only[Reference the file in place; do NOT copy into data_dir (local dataset)]' \
|
|
805
|
+
'--force[When copying, overwrite an existing file at the destination (local dataset)]' \
|
|
806
|
+
'--upload[Cloud dataset only\: upload --file as a postmancloudfile source (runs via /exec). Without --upload, --file is registered as a local_filesystem source read by the local engine. Either way a cloud dataset takes csv/json only — add a spreadsheet to a local .dataset.yaml, where each worksheet becomes its own source.]' \
|
|
807
|
+
'--driver-jar[JDBC driver JAR(s). Repeatable, or pass several after one flag]:path...:_files -g "*.json"' \
|
|
808
|
+
'--driver-class[Driver class. Auto-resolved when the JAR contains exactly one]:fqcn' \
|
|
809
|
+
'--driver-name[Label for this driver type (defaults to the JAR filename)]:label' \
|
|
810
|
+
'--url-template[JDBC URL with {{placeholders}}, e.g. jdbc\:postgresql\://{{host}}\:{{port}}/{{database}}]:template' \
|
|
811
|
+
'--var[Value for a {{placeholder}}. Repeatable. Use vault\:<vaultId>/<secretId> for a secret. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:name=value...' \
|
|
812
|
+
'--prop[Driver connection property. Repeatable. Same vault\: syntax as --var]:name=value...' \
|
|
813
|
+
'--vars-file[JSON object of --var values; "-" reads stdin. Supports {"$vaultId"\:..,"$secretId"\:..} objects, and keeps secrets out of argv entirely]:path:_files -g "*.json"' \
|
|
814
|
+
'--from-source[Reuse another source'\''s driver JAR, class and URL template]:name' \
|
|
815
|
+
'--java-path[Java runtime to use. Machine-local only - never written to the dataset. Also read from POSTMAN_JDBC_JAVA_PATH]:path:_files -g "*.json"' \
|
|
816
|
+
'--no-test[Skip the pre-write connection test. Note that resolving the driver class still starts a JVM — on a machine with no Java, pass --driver-class (or --from-source) too]' \
|
|
817
|
+
'--ssh-target-host-variable[Template variable holding the tunnelled host (inferred when omitted)]:name' \
|
|
818
|
+
'--ssh-target-port-variable[Template variable holding the tunnelled port (inferred when omitted)]:name' \
|
|
819
|
+
'--json[Emit the result as JSON instead of prose]' \
|
|
820
|
+
'--host[DB host (mysql/postgresql/sqlserver)]:host' \
|
|
821
|
+
'--port[DB port (defaults to 1433 for sqlserver)]:port' \
|
|
822
|
+
'--user[DB user. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:user' \
|
|
823
|
+
'--password[DB password. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:password' \
|
|
824
|
+
'--database[DB database name]:db' \
|
|
825
|
+
'--table[DB table to load (required for sqlserver). Leave it out to connect to the whole database; query it with `dataset query -s <source>` or `dataset view create -s <source>`]:table' \
|
|
826
|
+
'--ssh-host[SSH bastion host]:host' \
|
|
827
|
+
'--ssh-port[SSH bastion port]:port' \
|
|
828
|
+
'--ssh-user[SSH bastion user]:user' \
|
|
829
|
+
'--ssh-private-key[Path to the SSH private key. WARNING\: the path is visible in `ps` output and shell history; key contents are read locally at execution time and are not stored in the dataset config.]:filepath:_files -g "*.(pem|crt|key)"' \
|
|
830
|
+
'--ssh-host-key[SSH bastion public host key]:publicKey' \
|
|
831
|
+
'--ssh-host-key-vault-id[Shared Vault ID containing the SSH public host key]:id' \
|
|
832
|
+
'--ssh-host-key-secret-id[Shared Vault secret ID containing the SSH public host key]:id' \
|
|
833
|
+
'--ssh-insecure-skip-host-key-verification[WARNING\: disable SSH host-key verification; use only for trusted local testing]' \
|
|
834
|
+
'--schema[DB schema (postgresql/sqlserver; defaults to dbo for sqlserver)]:schema' \
|
|
835
|
+
'--encrypt[SQL Server TLS encryption (default\: true)]:true|false' \
|
|
836
|
+
'--trust-server-certificate[SQL Server\: skip certificate verification (default\: false; insecure)]:true|false' \
|
|
837
|
+
'--tls-certificate[SQL Server CA/server certificate file path]:path:_files -g "*.(pem|crt|key)"' \
|
|
838
|
+
'--host-name-in-certificate[SQL Server certificate hostname override]:hostname' \
|
|
839
|
+
'--tls-min-version[SQL Server minimum TLS version (default\: 1.2)]:1.2|1.3' \
|
|
840
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
666
841
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
667
|
-
'*:
|
|
842
|
+
'*:datasetPathOrId:'
|
|
668
843
|
}
|
|
669
844
|
|
|
670
|
-
|
|
845
|
+
_postman_dataset_source_remove() {
|
|
671
846
|
_arguments \
|
|
672
|
-
'(-
|
|
673
|
-
'--
|
|
674
|
-
'--json[JSON output]' \
|
|
847
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset the source belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
848
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
675
849
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
676
|
-
'*:
|
|
850
|
+
'*:sourceNameOrId:'
|
|
677
851
|
}
|
|
678
852
|
|
|
679
|
-
|
|
853
|
+
_postman_dataset_source_update() {
|
|
680
854
|
_arguments \
|
|
681
|
-
'(-
|
|
682
|
-
'(-
|
|
683
|
-
'(
|
|
684
|
-
'
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
855
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset the source belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
856
|
+
'(-n --name)'{-n,--name}'[Rename the source]:name' \
|
|
857
|
+
'--format[Change the format (local dataset only; cloud source formats are immutable). A spreadsheet format is not offered here\: this command changes the format field alone and cannot pin a worksheet, so the source would not compile. Add the workbook with `dataset source add` instead, which makes one worksheet-pinned source per sheet]:csv|json|jdbc|mysql|postgres|sqlserver' \
|
|
858
|
+
'--file[Replace the source file (local dataset only; cloud file replacement is unsupported)]:path:_files -g "*.json"' \
|
|
859
|
+
'--ref-only[With --file, reference in place instead of copying (local dataset only)]' \
|
|
860
|
+
'--force[With --file, overwrite the copied destination (local dataset only)]' \
|
|
861
|
+
'--driver-jar[Replace the JDBC driver JAR(s)]:path...:_files -g "*.json"' \
|
|
862
|
+
'--driver-class[Replace the JDBC driver class]:fqcn' \
|
|
863
|
+
'--driver-name[Rename the JDBC driver type label]:label' \
|
|
864
|
+
'--url-template[Replace the JDBC URL template]:template' \
|
|
865
|
+
'--var[Set a JDBC template variable. Merges onto the existing values. Use vault\:<vaultId>/<secretId> for a secret. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:name=value...' \
|
|
866
|
+
'--prop[Set a JDBC connection property. Merges, same vault\: syntax]:name=value...' \
|
|
867
|
+
'--unset-var[Remove a JDBC template variable. Merging alone can never remove a key]:name...' \
|
|
868
|
+
'--unset-prop[Remove a JDBC connection property]:name...' \
|
|
869
|
+
'--vars-file[JSON object of --var values; "-" reads stdin]:path:_files -g "*.json"' \
|
|
870
|
+
'--ssh-target-host-variable[Template variable holding the tunnelled host (JDBC)]:name' \
|
|
871
|
+
'--ssh-target-port-variable[Template variable holding the tunnelled port (JDBC)]:name' \
|
|
872
|
+
'--java-path[Java runtime for JDBC operations. Machine-local only]:path:_files -g "*.json"' \
|
|
873
|
+
'--host[Update DB host (mysql/postgresql/sqlserver)]:host' \
|
|
874
|
+
'--port[Update DB port]:port' \
|
|
875
|
+
'--user[Update DB user. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:user' \
|
|
876
|
+
'--password[Update DB password. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:password' \
|
|
877
|
+
'--database[Update DB database name]:db' \
|
|
878
|
+
'--table[Update the DB table to load. A source without a table connects to the whole database; query it with `dataset query -s <source>` or `dataset view create -s <source>`]:table' \
|
|
879
|
+
'--ssh-host[Update SSH bastion host]:host' \
|
|
880
|
+
'--ssh-port[Update SSH bastion port]:port' \
|
|
881
|
+
'--ssh-user[Update SSH bastion user]:user' \
|
|
882
|
+
'--ssh-private-key[Update the SSH private-key file path. WARNING\: the path is visible in `ps` output and shell history; key contents are read locally and are not stored in the dataset config.]:filepath:_files -g "*.(pem|crt|key)"' \
|
|
883
|
+
'--ssh-host-key[Update the SSH bastion public host key]:publicKey' \
|
|
884
|
+
'--ssh-host-key-vault-id[Update the Shared Vault ID containing the SSH public host key]:id' \
|
|
885
|
+
'--ssh-host-key-secret-id[Update the Shared Vault secret ID containing the SSH public host key]:id' \
|
|
886
|
+
'--ssh-insecure-skip-host-key-verification[WARNING\: disable SSH host-key verification; use only for trusted local testing]' \
|
|
887
|
+
'--schema[Update DB schema (postgresql/sqlserver)]:schema' \
|
|
888
|
+
'--encrypt[Update SQL Server TLS encryption]:true|false' \
|
|
889
|
+
'--trust-server-certificate[Update SQL Server certificate verification (true is insecure)]:true|false' \
|
|
890
|
+
'--tls-certificate[Update SQL Server CA/server certificate file path]:path:_files -g "*.(pem|crt|key)"' \
|
|
891
|
+
'--host-name-in-certificate[Update SQL Server certificate hostname override]:hostname' \
|
|
892
|
+
'--tls-min-version[Update SQL Server minimum TLS version]:1.2|1.3' \
|
|
893
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
894
|
+
'--json[Emit the result as JSON instead of prose]' \
|
|
691
895
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
692
|
-
'
|
|
693
|
-
'*::arg:->args'
|
|
694
|
-
case $state in
|
|
695
|
-
args)
|
|
696
|
-
case $words[1] in
|
|
697
|
-
lint) _postman_globals_lint ;;
|
|
698
|
-
esac
|
|
699
|
-
;;
|
|
700
|
-
esac
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
_postman_globals_commands() {
|
|
704
|
-
local -a sub
|
|
705
|
-
sub=(
|
|
706
|
-
'lint:Run linting on a local Postman globals file at the given file or directory path.'
|
|
707
|
-
)
|
|
708
|
-
_describe -t commands 'globals command' sub
|
|
896
|
+
'*:sourceNameOrId:'
|
|
709
897
|
}
|
|
710
898
|
|
|
711
|
-
|
|
899
|
+
_postman_dataset_source_test() {
|
|
712
900
|
_arguments \
|
|
713
|
-
'(-
|
|
714
|
-
'(-
|
|
715
|
-
'
|
|
716
|
-
'
|
|
901
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset the source belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
902
|
+
'(-n --name)'{-n,--name}'[Source to test]:name' \
|
|
903
|
+
'--java-path[Java runtime to use for a JDBC source. Machine-local only; also read from POSTMAN_JDBC_JAVA_PATH]:path:_files -g "*.json"' \
|
|
904
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
905
|
+
'--json[Emit the result as JSON instead of prose]' \
|
|
906
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
717
907
|
}
|
|
718
908
|
|
|
719
|
-
|
|
909
|
+
_postman_dataset_view() {
|
|
720
910
|
local context state state_descr line
|
|
721
911
|
typeset -A opt_args
|
|
722
912
|
_arguments -C \
|
|
723
913
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
724
|
-
'1: :
|
|
914
|
+
'1: :_postman_dataset_view_commands' \
|
|
725
915
|
'*::arg:->args'
|
|
726
916
|
case $state in
|
|
727
917
|
args)
|
|
728
918
|
case $words[1] in
|
|
729
|
-
|
|
730
|
-
|
|
919
|
+
list) _postman_dataset_view_list ;;
|
|
920
|
+
run) _postman_dataset_view_run ;;
|
|
921
|
+
create) _postman_dataset_view_create ;;
|
|
922
|
+
delete) _postman_dataset_view_delete ;;
|
|
923
|
+
update) _postman_dataset_view_update ;;
|
|
731
924
|
esac
|
|
732
925
|
;;
|
|
733
926
|
esac
|
|
734
927
|
}
|
|
735
928
|
|
|
736
|
-
|
|
929
|
+
_postman_dataset_view_commands() {
|
|
737
930
|
local -a sub
|
|
738
931
|
sub=(
|
|
739
|
-
'
|
|
740
|
-
'
|
|
932
|
+
'list:List the saved views defined on a dataset (local YAML path or cloud id).'
|
|
933
|
+
'run:Execute a saved view against a dataset and print the rows.'
|
|
934
|
+
'create:Add a saved view to a dataset (local YAML path or cloud id).'
|
|
935
|
+
'delete:Remove a saved view from a dataset (local YAML path or cloud id).'
|
|
936
|
+
'update:Update name and/or query on an existing view (local YAML path or cloud id).'
|
|
741
937
|
)
|
|
742
|
-
_describe -t commands '
|
|
938
|
+
_describe -t commands 'view command' sub
|
|
743
939
|
}
|
|
744
940
|
|
|
745
|
-
|
|
941
|
+
_postman_dataset_view_list() {
|
|
746
942
|
_arguments \
|
|
747
|
-
'--
|
|
748
|
-
'
|
|
749
|
-
'
|
|
750
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
751
|
-
'*:api:'
|
|
943
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset whose views to list — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
944
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
945
|
+
'--json[Output views as JSON instead of a table]' \
|
|
946
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
752
947
|
}
|
|
753
948
|
|
|
754
|
-
|
|
949
|
+
_postman_dataset_view_run() {
|
|
755
950
|
_arguments \
|
|
756
|
-
'--
|
|
757
|
-
'--
|
|
758
|
-
'--
|
|
759
|
-
'--
|
|
760
|
-
'--
|
|
761
|
-
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run.]' \
|
|
951
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset the view belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
952
|
+
'(-p --param)'{-p,--param}'[Bind values to $1, $2, ... in order; pass multiple values after -p or repeat -p]:value...' \
|
|
953
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
954
|
+
'--json[Output rows as JSON instead of a table]' \
|
|
955
|
+
'--debug[Include safe classified dataset diagnostics]' \
|
|
762
956
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
763
|
-
'*:
|
|
957
|
+
'*:viewNameOrId:'
|
|
764
958
|
}
|
|
765
959
|
|
|
766
|
-
|
|
960
|
+
_postman_dataset_view_create() {
|
|
961
|
+
_arguments \
|
|
962
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset to add the view to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
963
|
+
'(-n --name)'{-n,--name}'[View name]:name' \
|
|
964
|
+
'(-q --query)'{-q,--query}'[SQL query the view executes]:sql' \
|
|
965
|
+
'(-s --source)'{-s,--source}'[Bind the view to one datasource and run the query natively against it, instead of through the federated SQLite layer. Same reference `dataset query -s` takes]:nameOrIdOrSlug' \
|
|
966
|
+
'--view-id[Override the generated view id (local only; cloud assigns its own)]:uuid' \
|
|
967
|
+
'--json[Emit the result as JSON instead of prose]' \
|
|
968
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
969
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
_postman_dataset_view_delete() {
|
|
973
|
+
_arguments \
|
|
974
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset the view belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
975
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
976
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
977
|
+
'*:viewNameOrId:'
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
_postman_dataset_view_update() {
|
|
981
|
+
_arguments \
|
|
982
|
+
'(-d --dataset)'{-d,--dataset}'[Dataset the view belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
983
|
+
'(-n --name)'{-n,--name}'[New view name]:name' \
|
|
984
|
+
'(-q --query)'{-q,--query}'[New SQL query]:sql' \
|
|
985
|
+
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
986
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
987
|
+
'*:viewNameOrId:'
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
_postman_dataset_jdbc() {
|
|
767
991
|
local context state state_descr line
|
|
768
992
|
typeset -A opt_args
|
|
769
993
|
_arguments -C \
|
|
770
994
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
771
|
-
'1: :
|
|
995
|
+
'1: :_postman_dataset_jdbc_commands' \
|
|
772
996
|
'*::arg:->args'
|
|
773
997
|
case $state in
|
|
774
998
|
args)
|
|
775
999
|
case $words[1] in
|
|
776
|
-
|
|
777
|
-
list) _postman_runner_list ;;
|
|
778
|
-
regions) _postman_runner_regions ;;
|
|
1000
|
+
inspect) _postman_dataset_jdbc_inspect ;;
|
|
779
1001
|
esac
|
|
780
1002
|
;;
|
|
781
1003
|
esac
|
|
782
1004
|
}
|
|
783
1005
|
|
|
784
|
-
|
|
1006
|
+
_postman_dataset_jdbc_commands() {
|
|
785
1007
|
local -a sub
|
|
786
1008
|
sub=(
|
|
787
|
-
'
|
|
788
|
-
'list:List the team'\''s registered self-hosted runners.'
|
|
789
|
-
'regions:List the region and private-runner values valid for monitor create/update --runner, with the static IP Postman runs each one from, where your team has access to it.'
|
|
1009
|
+
'inspect:Detect Java, list driver classes, suggest a URL template and read driver properties.'
|
|
790
1010
|
)
|
|
791
|
-
_describe -t commands '
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
_postman_runner_start() {
|
|
795
|
-
_arguments \
|
|
796
|
-
'--id[The ID of the runner to execute]:id' \
|
|
797
|
-
'--key[The secret key for the runner]:key:_files -g "*.(pem|crt|key)"' \
|
|
798
|
-
'--region[Region this runner reports to -- use "eu" for the EU region]:region' \
|
|
799
|
-
'--proxy[External proxy URL, for example http\://proxy.com or http\://proxy.com\:8080]:url' \
|
|
800
|
-
'--egress-proxy[Enable built-in egress proxy]' \
|
|
801
|
-
'--egress-proxy-authz-url[Custom egress proxy authorization service base URL]:url' \
|
|
802
|
-
'--ssl-extra-ca-certs[Additional trusted CA certificates (PEM file, can contain multiple certs)]:path:_files -g "*.(pem|crt|key)"' \
|
|
803
|
-
'--dataset-jdbc-driver-dir[Folder on this machine holding the JDBC driver .jar files you put there. Required to run a dataset that uses a JDBC source. Drivers are loaded only from this folder and matched by file name; driver paths saved in the dataset are ignored]:path:_files -/' \
|
|
804
|
-
'--metrics[Enable the metrics server for health checks]' \
|
|
805
|
-
'--metrics-port[Port for the metrics server (default\: "9090")]:port' \
|
|
806
|
-
'--report-events[Accepted for compatibility; run events are reported by default]' \
|
|
807
|
-
'--no-report-events[Do not report run events to Postman]' \
|
|
808
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
_postman_runner_list() {
|
|
812
|
-
_arguments \
|
|
813
|
-
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
814
|
-
'(-w --workspace)'{-w,--workspace}'[Filter to runners in this workspace]:id' \
|
|
815
|
-
'--json[Output the runner list as JSON instead of a table]' \
|
|
816
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1011
|
+
_describe -t commands 'jdbc command' sub
|
|
817
1012
|
}
|
|
818
1013
|
|
|
819
|
-
|
|
1014
|
+
_postman_dataset_jdbc_inspect() {
|
|
820
1015
|
_arguments \
|
|
821
|
-
'--
|
|
822
|
-
'--
|
|
823
|
-
'
|
|
1016
|
+
'--driver-class[Introspect this class instead of auto-selecting]:fqcn' \
|
|
1017
|
+
'--url-template[Use this URL template instead of the one inferred from the JAR filename]:template' \
|
|
1018
|
+
'--java-path[Java runtime to use. Machine-local only — never written to a dataset. Also read from POSTMAN_JDBC_JAVA_PATH.]:path:_files -g "*.json"' \
|
|
1019
|
+
'--json[Emit the discovery result as JSON]' \
|
|
1020
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1021
|
+
'*:jar...:'
|
|
824
1022
|
}
|
|
825
1023
|
|
|
826
|
-
|
|
1024
|
+
_postman_environment() {
|
|
827
1025
|
local context state state_descr line
|
|
828
1026
|
typeset -A opt_args
|
|
829
1027
|
_arguments -C \
|
|
830
1028
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
831
|
-
'1: :
|
|
1029
|
+
'1: :_postman_environment_commands' \
|
|
832
1030
|
'*::arg:->args'
|
|
833
1031
|
case $state in
|
|
834
1032
|
args)
|
|
835
1033
|
case $words[1] in
|
|
836
|
-
|
|
837
|
-
list)
|
|
838
|
-
get)
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
sync) _postman_spec_sync ;;
|
|
843
|
-
delete) _postman_spec_delete ;;
|
|
1034
|
+
new) _postman_environment_new ;;
|
|
1035
|
+
list) _postman_environment_list ;;
|
|
1036
|
+
get) _postman_environment_get ;;
|
|
1037
|
+
delete) _postman_environment_delete ;;
|
|
1038
|
+
var) _postman_environment_var ;;
|
|
1039
|
+
lint) _postman_environment_lint ;;
|
|
844
1040
|
esac
|
|
845
1041
|
;;
|
|
846
1042
|
esac
|
|
847
1043
|
}
|
|
848
1044
|
|
|
849
|
-
|
|
1045
|
+
_postman_environment_commands() {
|
|
850
1046
|
local -a sub
|
|
851
1047
|
sub=(
|
|
852
|
-
'
|
|
853
|
-
'list:List
|
|
854
|
-
'get:Read
|
|
855
|
-
'
|
|
856
|
-
'
|
|
857
|
-
'
|
|
858
|
-
'sync:Sync a generated collection with its source specification.'
|
|
859
|
-
'delete:Delete a spec by its cloud ID or local file path. Cannot be undone.'
|
|
1048
|
+
'new:Scaffold a local environment file, or create one in a Postman workspace with --workspace.'
|
|
1049
|
+
'list:List environments in a Postman workspace.'
|
|
1050
|
+
'get:Read an environment by ID or local environment file path.'
|
|
1051
|
+
'delete:Delete an environment by ID or local environment file path. Prompts unless --yes is passed.'
|
|
1052
|
+
'var:Read and update environment variables.'
|
|
1053
|
+
'lint:Run linting on a local Postman environment at the given file or directory path.'
|
|
860
1054
|
)
|
|
861
|
-
_describe -t commands '
|
|
1055
|
+
_describe -t commands 'environment command' sub
|
|
862
1056
|
}
|
|
863
1057
|
|
|
864
|
-
|
|
1058
|
+
_postman_environment_new() {
|
|
865
1059
|
_arguments \
|
|
866
|
-
'(-
|
|
867
|
-
'
|
|
868
|
-
'--
|
|
869
|
-
'--
|
|
870
|
-
'--no-report-events[Do not send analytics to Postman]' \
|
|
1060
|
+
'(-w --workspace)'{-w,--workspace}'[Create the environment in a cloud Postman workspace instead of scaffolding it locally. Required when the current directory is not a local Postman workspace.]:workspaceId' \
|
|
1061
|
+
'--force[Overwrite an existing local environment file.]' \
|
|
1062
|
+
'--verbose[Verbose output]' \
|
|
1063
|
+
'--json[JSON output]' \
|
|
871
1064
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
872
|
-
'*:
|
|
1065
|
+
'*:name:'
|
|
873
1066
|
}
|
|
874
1067
|
|
|
875
|
-
|
|
1068
|
+
_postman_environment_list() {
|
|
876
1069
|
_arguments \
|
|
877
|
-
'(-w --workspace)'{-w,--workspace}'[Workspace ID
|
|
878
|
-
'--
|
|
879
|
-
'--
|
|
1070
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID to list environments from.]:workspaceId' \
|
|
1071
|
+
'(-f --filter)'{-f,--filter}'[Filter environments by name.]:name' \
|
|
1072
|
+
'--verbose[Verbose output]' \
|
|
1073
|
+
'--json[JSON output]' \
|
|
880
1074
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
881
|
-
'*:
|
|
1075
|
+
'*:workspacePath:'
|
|
882
1076
|
}
|
|
883
1077
|
|
|
884
|
-
|
|
1078
|
+
_postman_environment_get() {
|
|
885
1079
|
_arguments \
|
|
886
|
-
'--
|
|
887
|
-
'--json[
|
|
1080
|
+
'--verbose[Verbose output]' \
|
|
1081
|
+
'--json[JSON output]' \
|
|
888
1082
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
889
|
-
'*:
|
|
1083
|
+
'*:environment:_files -g "*.json"'
|
|
890
1084
|
}
|
|
891
1085
|
|
|
892
|
-
|
|
1086
|
+
_postman_environment_delete() {
|
|
1087
|
+
_arguments \
|
|
1088
|
+
'(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
|
|
1089
|
+
'--verbose[Verbose output]' \
|
|
1090
|
+
'--json[JSON output]' \
|
|
1091
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1092
|
+
'*:environment:_files -g "*.json"'
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
_postman_environment_var() {
|
|
893
1096
|
local context state state_descr line
|
|
894
1097
|
typeset -A opt_args
|
|
895
1098
|
_arguments -C \
|
|
896
1099
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
897
|
-
'1: :
|
|
1100
|
+
'1: :_postman_environment_var_commands' \
|
|
898
1101
|
'*::arg:->args'
|
|
899
1102
|
case $state in
|
|
900
1103
|
args)
|
|
901
1104
|
case $words[1] in
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
1105
|
+
set) _postman_environment_var_set ;;
|
|
1106
|
+
get) _postman_environment_var_get ;;
|
|
1107
|
+
unset) _postman_environment_var_unset ;;
|
|
905
1108
|
esac
|
|
906
1109
|
;;
|
|
907
1110
|
esac
|
|
908
1111
|
}
|
|
909
1112
|
|
|
910
|
-
|
|
1113
|
+
_postman_environment_var_commands() {
|
|
911
1114
|
local -a sub
|
|
912
1115
|
sub=(
|
|
913
|
-
'
|
|
914
|
-
'
|
|
915
|
-
'
|
|
1116
|
+
'set:Set one variable in an environment, or link it to a shared-vault secret.'
|
|
1117
|
+
'get:Read one variable value from an environment.'
|
|
1118
|
+
'unset:Remove one variable from an environment.'
|
|
916
1119
|
)
|
|
917
|
-
_describe -t commands '
|
|
1120
|
+
_describe -t commands 'var command' sub
|
|
918
1121
|
}
|
|
919
1122
|
|
|
920
|
-
|
|
1123
|
+
_postman_environment_var_set() {
|
|
921
1124
|
_arguments \
|
|
922
|
-
'(-
|
|
923
|
-
'--
|
|
1125
|
+
'(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
|
|
1126
|
+
'--secret-id[Link this variable to a shared-vault secret instead of an inline value (from `secret create`'\''s output).]:id' \
|
|
1127
|
+
'--vault-id[Vault id for --secret-id (auto-resolved from --workspace when omitted).]:id' \
|
|
1128
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace to resolve --vault-id from when --secret-id is given without --vault-id (falls back to .postman/resources.yaml).]:workspaceId' \
|
|
1129
|
+
'--verbose[Verbose output]' \
|
|
1130
|
+
'--json[JSON output]' \
|
|
924
1131
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
925
|
-
'*:
|
|
1132
|
+
'*:value:'
|
|
926
1133
|
}
|
|
927
1134
|
|
|
928
|
-
|
|
1135
|
+
_postman_environment_var_get() {
|
|
929
1136
|
_arguments \
|
|
930
|
-
'(-
|
|
931
|
-
'--
|
|
1137
|
+
'(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
|
|
1138
|
+
'--verbose[Verbose output]' \
|
|
1139
|
+
'--json[JSON output]' \
|
|
932
1140
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
933
|
-
'*:
|
|
1141
|
+
'*:key:_files -g "*.json"'
|
|
934
1142
|
}
|
|
935
1143
|
|
|
936
|
-
|
|
1144
|
+
_postman_environment_var_unset() {
|
|
937
1145
|
_arguments \
|
|
938
|
-
'(-
|
|
939
|
-
'--
|
|
1146
|
+
'(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
|
|
1147
|
+
'--verbose[Verbose output]' \
|
|
1148
|
+
'--json[JSON output]' \
|
|
940
1149
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
941
|
-
'*:
|
|
1150
|
+
'*:key:_files -g "*.json"'
|
|
942
1151
|
}
|
|
943
1152
|
|
|
944
|
-
|
|
1153
|
+
_postman_environment_lint() {
|
|
945
1154
|
_arguments \
|
|
946
|
-
'(-
|
|
947
|
-
'(-
|
|
948
|
-
'--spec-version[Spec version (e.g. 3.1 for openapi, 3 for protobuf)]:ver' \
|
|
949
|
-
'(-f --format)'{-f,--format}'[File format\: yaml or json (openapi/asyncapi only, default\: yaml) (default\: "yaml")]:fmt' \
|
|
950
|
-
'(-w --workspace)'{-w,--workspace}'[Workspace ID (cloud create, defaults to .postman/resources.yaml)]:id' \
|
|
951
|
-
'--force[Overwrite an existing local file]' \
|
|
952
|
-
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
1155
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning"\] (default\: "error")]:value' \
|
|
1156
|
+
'(-o --output)'{-o,--output}'[Output format\: cli (human-readable), table, json, or csv. (default\: "cli")]:value' \
|
|
953
1157
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
954
1158
|
'*:path:_files -g "*.json"'
|
|
955
1159
|
}
|
|
956
1160
|
|
|
957
|
-
|
|
1161
|
+
_postman_flows() {
|
|
958
1162
|
local context state state_descr line
|
|
959
1163
|
typeset -A opt_args
|
|
960
1164
|
_arguments -C \
|
|
961
1165
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
962
|
-
'1: :
|
|
1166
|
+
'1: :_postman_flows_commands' \
|
|
963
1167
|
'*::arg:->args'
|
|
964
1168
|
case $state in
|
|
965
1169
|
args)
|
|
966
1170
|
case $words[1] in
|
|
967
|
-
|
|
1171
|
+
list) _postman_flows_list ;;
|
|
1172
|
+
trigger) _postman_flows_trigger ;;
|
|
1173
|
+
deploy) _postman_flows_deploy ;;
|
|
1174
|
+
run) _postman_flows_run ;;
|
|
1175
|
+
update) _postman_flows_update ;;
|
|
1176
|
+
list-runs) _postman_flows_list_runs ;;
|
|
1177
|
+
get-run) _postman_flows_get_run ;;
|
|
968
1178
|
esac
|
|
969
1179
|
;;
|
|
970
1180
|
esac
|
|
971
1181
|
}
|
|
972
1182
|
|
|
973
|
-
|
|
1183
|
+
_postman_flows_commands() {
|
|
974
1184
|
local -a sub
|
|
975
1185
|
sub=(
|
|
976
|
-
'
|
|
1186
|
+
'list:List all flows'
|
|
1187
|
+
'trigger:Trigger a deployed flow'
|
|
1188
|
+
'deploy:Deploy a flow (required to trigger it)'
|
|
1189
|
+
'run:Run a single flow from a file (e.g. ./path/to/flow.json)'
|
|
1190
|
+
'update:Update settings for a deployed flow'
|
|
1191
|
+
'list-runs:List run history for a deployed flow'
|
|
1192
|
+
'get-run:Analyze a specific flow run'
|
|
977
1193
|
)
|
|
978
|
-
_describe -t commands '
|
|
1194
|
+
_describe -t commands 'flows command' sub
|
|
979
1195
|
}
|
|
980
1196
|
|
|
981
|
-
|
|
1197
|
+
_postman_flows_list() {
|
|
982
1198
|
_arguments \
|
|
983
|
-
'(-
|
|
984
|
-
'--
|
|
985
|
-
'(-
|
|
986
|
-
'--
|
|
987
|
-
'--
|
|
988
|
-
'
|
|
989
|
-
'
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
|
|
1199
|
+
'(-w --workspace)'{-w,--workspace}'[Specify the workspace ID to list flows from]:workspaceId' \
|
|
1200
|
+
'(-p --paginate)'{-p,--paginate}'[Paginates the list of flows]' \
|
|
1201
|
+
'(-f --filter)'{-f,--filter}'[Filter flows by name. Pattern may be a regex, or a name prefix.]:pattern' \
|
|
1202
|
+
'(-s --sort)'{-s,--sort}'[Sort flows by criteria\: "name" or "updated" (default\: updated) (default\: "updated")]:criteria' \
|
|
1203
|
+
'--verbose[Verbose output]' \
|
|
1204
|
+
'--debug[Debug output]' \
|
|
1205
|
+
'--json[JSON output]' \
|
|
1206
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
_postman_flows_trigger() {
|
|
1210
|
+
_arguments \
|
|
1211
|
+
'(-i --input)'{-i,--input}'[Set key=value pairs in the trigger payload (e.g. --input foo=bar --input baz=qux) (default\: \[\])]:key=value:_files -g "*.(pem|crt|key)"' \
|
|
1212
|
+
'(-f --input-file)'{-f,--input-file}'[Set payload values from JSON files (e.g. --input-file ./inputs.json --input-file ./config.json) (default\: \[\])]:path.json:_files -g "*.json"' \
|
|
1213
|
+
'(-q --query)'{-q,--query}'[Set query parameters as key=value pairs (e.g. --query foo=bar --query baz=qux) (default\: \[\])]:key=value:_files -g "*.(pem|crt|key)"' \
|
|
1214
|
+
'--headers[Set custom headers as key=value pairs (e.g. --headers X-API-Key=12345 --headers User-Agent=MyApp) (default\: \[\])]:key=value:_files -g "*.(pem|crt|key)"' \
|
|
1215
|
+
'(-n --dry-run)'{-n,--dry-run}'[Show the flow requestURL and payload that would be sent without making the actual request (default\: false)]' \
|
|
1216
|
+
'--show-secrets[Show actual authentication tokens in dry-run output (otherwise secrets are masked) (default\: false)]' \
|
|
1217
|
+
'(-r --result)'{-r,--result}'[Show only the response body (default\: false)]' \
|
|
1218
|
+
'(-s --scenario)'{-s,--scenario}'[Use a named scenario from the flow definition to construct the input payload, headers, and query parameters (overridden by --headers/--query)]:name' \
|
|
1219
|
+
'--verbose[Verbose output]' \
|
|
1220
|
+
'--debug[Debug output]' \
|
|
1221
|
+
'--json[JSON output]' \
|
|
1222
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1223
|
+
'*:flowId:'
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
_postman_flows_deploy() {
|
|
1227
|
+
_arguments \
|
|
1228
|
+
'(-p --path)'{-p,--path}'[Specify the URL path for the trigger]:path:_files -g "*.json"' \
|
|
1229
|
+
'(-t --timeout)'{-t,--timeout}'[Specify the HTTP session timeout (5000ms to 60000ms) (default\: "10000ms")]:timeout' \
|
|
1230
|
+
'(-a --auth)'{-a,--auth}'[Enable authentication for the trigger (default\: false)]' \
|
|
1231
|
+
'--verbose[Verbose output]' \
|
|
1232
|
+
'--debug[Debug output]' \
|
|
1233
|
+
'--json[JSON output]' \
|
|
1234
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1235
|
+
'*:flowId:'
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
_postman_flows_run() {
|
|
1239
|
+
_arguments \
|
|
1240
|
+
'(-i --input)'{-i,--input}'[Set flow inputs as key=value pairs (e.g. --input foo=bar --input baz=qux) (default\: \[\])]:key=value:_files -g "*.(pem|crt|key)"' \
|
|
1241
|
+
'(-f --input-file)'{-f,--input-file}'[Set flow inputs from JSON files (e.g. --input-file ./inputs.json --input-file ./config.json) (default\: \[\])]:path.json:_files -g "*.json"' \
|
|
1242
|
+
'(-s --scenario)'{-s,--scenario}'[Use a pre-built scenario as flow inputs (by scenario name). Can be combined with --input and --input-file to override values.]:name' \
|
|
1243
|
+
'--iteration-data-dataset[\[BETA\] Run the flow once per row of a dataset view. Accepts a local .dataset.yaml path or a cloud dataset id (cloud requires login). Requires --iteration-data-view. Dataset columns feed the flow inputs (see --map-column).]:pathOrId:_files -g "*.(json|csv)"' \
|
|
1244
|
+
'--iteration-data-view[\[BETA\] Name or id of the view (within --iteration-data-dataset) whose rows drive the run.]:nameOrId' \
|
|
1245
|
+
'(-m --map-column)'{-m,--map-column}'[\[BETA\] Bind a flow input to a dataset column (e.g. -m isActive=active). Repeatable. Inputs whose name matches a column bind automatically. (default\: \[\])]:input=column' \
|
|
1246
|
+
'(-e --environment)'{-e,--environment}'[Specify a path to a Postman Environment file (JSON or YAML)]:path:_files -g "*.json"' \
|
|
1247
|
+
'--working-dir[Specify the path to the working directory]:path:_files -/' \
|
|
1248
|
+
'--no-insecure-file-read[Prevent reading dataset files situated outside of the working directory (applies to --iteration-data-dataset)]' \
|
|
1249
|
+
'--verbose[Show detailed information of flow run and each request (method, URL, assertions)]' \
|
|
1250
|
+
'--no-truncate[Show full output without truncating long values]' \
|
|
1251
|
+
'--output[Save execution result to a file (supported\: json)]:format' \
|
|
1252
|
+
'--reporters[Save a test results report to a file (supported\: html)]:format' \
|
|
1253
|
+
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
|
|
1254
|
+
'--workspace[Workspace ID required for flows that contain connector blocks. Find it in the Postman app URL\: https\://postman.com/workspace/<workspaceId>]:workspaceId' \
|
|
1255
|
+
'--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
|
|
1256
|
+
'--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
1257
|
+
'--verbose[Verbose output]' \
|
|
1258
|
+
'--debug[Debug output]' \
|
|
1259
|
+
'--json[JSON output]' \
|
|
1260
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1261
|
+
'*:path:_files -g "*.json"'
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
_postman_flows_update() {
|
|
1265
|
+
_arguments \
|
|
1266
|
+
'(-t --trigger)'{-t,--trigger}'[Enable or disable the flow trigger]:on|off' \
|
|
1267
|
+
'(-a --auth)'{-a,--auth}'[Enable or disable authentication for the flow trigger]:on|off' \
|
|
1268
|
+
'--verbose[Verbose output]' \
|
|
1269
|
+
'--debug[Debug output]' \
|
|
1270
|
+
'--json[JSON output]' \
|
|
1271
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1272
|
+
'*:flowId:'
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
_postman_flows_list_runs() {
|
|
1276
|
+
_arguments \
|
|
1277
|
+
'(-w --workspace)'{-w,--workspace}'[Specify the workspace ID]:workspaceId' \
|
|
1278
|
+
'(-f --flow)'{-f,--flow}'[Filter sessions by flow ID]:flowId' \
|
|
1279
|
+
'(-r --range)'{-r,--range}'[Time range to list runs (e.g. 30m, 2h, 3d) (default\: "1h")]:range' \
|
|
1280
|
+
'--verbose[Verbose output]' \
|
|
1281
|
+
'--debug[Debug output]' \
|
|
1282
|
+
'--json[JSON output]' \
|
|
1283
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
_postman_flows_get_run() {
|
|
1287
|
+
_arguments \
|
|
1288
|
+
'(-r --run-id)'{-r,--run-id}'[Specify the run ID to analyze]:runId' \
|
|
1289
|
+
'(-l --logs)'{-l,--logs}'[Show detailed event log (default\: false)]' \
|
|
1290
|
+
'--filter[Filter event log by block ID prefix (can be specified multiple times) (default\: \[\])]:blockId' \
|
|
1291
|
+
'--verbose[Verbose output]' \
|
|
1292
|
+
'--debug[Debug output]' \
|
|
1293
|
+
'--json[JSON output]' \
|
|
1294
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
_postman_globals() {
|
|
993
1298
|
local context state state_descr line
|
|
994
1299
|
typeset -A opt_args
|
|
995
1300
|
_arguments -C \
|
|
996
1301
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
997
|
-
'1: :
|
|
1302
|
+
'1: :_postman_globals_commands' \
|
|
998
1303
|
'*::arg:->args'
|
|
999
1304
|
case $state in
|
|
1000
1305
|
args)
|
|
1001
1306
|
case $words[1] in
|
|
1002
|
-
|
|
1307
|
+
get) _postman_globals_get ;;
|
|
1308
|
+
var) _postman_globals_var ;;
|
|
1309
|
+
lint) _postman_globals_lint ;;
|
|
1003
1310
|
esac
|
|
1004
1311
|
;;
|
|
1005
1312
|
esac
|
|
1006
1313
|
}
|
|
1007
1314
|
|
|
1008
|
-
|
|
1315
|
+
_postman_globals_commands() {
|
|
1009
1316
|
local -a sub
|
|
1010
1317
|
sub=(
|
|
1011
|
-
'
|
|
1318
|
+
'get:Read local workspace globals from the default file, or cloud globals with --workspace.'
|
|
1319
|
+
'var:Read and update variables in the workspace globals singleton.'
|
|
1320
|
+
'lint:Run linting on a local Postman globals file at the given file or directory path.'
|
|
1012
1321
|
)
|
|
1013
|
-
_describe -t commands '
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
_postman_spec_sync_collection() {
|
|
1017
|
-
_arguments \
|
|
1018
|
-
'--collection-id[Collection ID to sync (required for cloud mode)]:id' \
|
|
1019
|
-
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
1020
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1021
|
-
'*:spec:'
|
|
1322
|
+
_describe -t commands 'globals command' sub
|
|
1022
1323
|
}
|
|
1023
1324
|
|
|
1024
|
-
|
|
1325
|
+
_postman_globals_get() {
|
|
1025
1326
|
_arguments \
|
|
1026
|
-
'(-
|
|
1027
|
-
'--
|
|
1028
|
-
'
|
|
1029
|
-
'
|
|
1327
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID to read globals from.]:workspaceId' \
|
|
1328
|
+
'--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
|
|
1329
|
+
'--verbose[Verbose output]' \
|
|
1330
|
+
'--json[JSON output]' \
|
|
1331
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1030
1332
|
}
|
|
1031
1333
|
|
|
1032
|
-
|
|
1334
|
+
_postman_globals_var() {
|
|
1033
1335
|
local context state state_descr line
|
|
1034
1336
|
typeset -A opt_args
|
|
1035
1337
|
_arguments -C \
|
|
1036
1338
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1037
|
-
'1: :
|
|
1339
|
+
'1: :_postman_globals_var_commands' \
|
|
1038
1340
|
'*::arg:->args'
|
|
1039
1341
|
case $state in
|
|
1040
1342
|
args)
|
|
1041
1343
|
case $words[1] in
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
delete) _postman_monitor_delete ;;
|
|
1046
|
-
jobs) _postman_monitor_jobs ;;
|
|
1047
|
-
runs) _postman_monitor_runs ;;
|
|
1048
|
-
list) _postman_monitor_list ;;
|
|
1049
|
-
get) _postman_monitor_get ;;
|
|
1050
|
-
metrics) _postman_monitor_metrics ;;
|
|
1051
|
-
pause) _postman_monitor_pause ;;
|
|
1052
|
-
resume) _postman_monitor_resume ;;
|
|
1344
|
+
set) _postman_globals_var_set ;;
|
|
1345
|
+
get) _postman_globals_var_get ;;
|
|
1346
|
+
unset) _postman_globals_var_unset ;;
|
|
1053
1347
|
esac
|
|
1054
1348
|
;;
|
|
1055
1349
|
esac
|
|
1056
1350
|
}
|
|
1057
1351
|
|
|
1058
|
-
|
|
1352
|
+
_postman_globals_var_commands() {
|
|
1059
1353
|
local -a sub
|
|
1060
1354
|
sub=(
|
|
1061
|
-
'
|
|
1062
|
-
'
|
|
1063
|
-
'
|
|
1064
|
-
'delete:Permanently delete a monitor. Prompts for confirmation unless --yes is passed.'
|
|
1065
|
-
'jobs:Inspect a monitor'\''s jobs and their per-region runs.'
|
|
1066
|
-
'runs:Inspect a monitor run'\''s attempts.'
|
|
1067
|
-
'list:List the monitors visible to you.'
|
|
1068
|
-
'get:Show a monitor'\''s configuration.'
|
|
1069
|
-
'metrics:Show per-request latency and outcome history for a monitor.'
|
|
1070
|
-
'pause:Pause a monitor, so it stops firing on schedule.'
|
|
1071
|
-
'resume:Resume a paused monitor, so it fires on schedule again.'
|
|
1355
|
+
'set:Set one variable in local workspace globals, or link it to a shared-vault secret.'
|
|
1356
|
+
'get:Read one variable from local workspace globals, or cloud globals with --workspace.'
|
|
1357
|
+
'unset:Remove one variable from local workspace globals, or cloud globals with --workspace.'
|
|
1072
1358
|
)
|
|
1073
|
-
_describe -t commands '
|
|
1359
|
+
_describe -t commands 'var command' sub
|
|
1074
1360
|
}
|
|
1075
1361
|
|
|
1076
|
-
|
|
1362
|
+
_postman_globals_var_set() {
|
|
1077
1363
|
_arguments \
|
|
1078
|
-
'--
|
|
1079
|
-
'
|
|
1080
|
-
'
|
|
1081
|
-
'--
|
|
1082
|
-
'--
|
|
1364
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID whose cloud globals should be updated.]:workspaceId' \
|
|
1365
|
+
'--secret-id[Link this variable to a shared-vault secret instead of an inline value (from `secret create`'\''s output).]:id' \
|
|
1366
|
+
'--vault-id[Vault id for --secret-id (auto-resolved from --workspace when omitted).]:id' \
|
|
1367
|
+
'--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
|
|
1368
|
+
'--verbose[Verbose output]' \
|
|
1369
|
+
'--json[JSON output]' \
|
|
1083
1370
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1084
|
-
'*:
|
|
1371
|
+
'*:value:'
|
|
1085
1372
|
}
|
|
1086
1373
|
|
|
1087
|
-
|
|
1374
|
+
_postman_globals_var_get() {
|
|
1088
1375
|
_arguments \
|
|
1089
|
-
'(-
|
|
1090
|
-
'--
|
|
1091
|
-
'
|
|
1092
|
-
'
|
|
1093
|
-
'--
|
|
1094
|
-
'
|
|
1095
|
-
'--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable) (default\: \[\])]:value' \
|
|
1096
|
-
'--notify-email[Email to notify on a run failure or error (repeatable) (default\: \[\])]:email' \
|
|
1097
|
-
'--notification-limit[Consecutive failure notifications to send before muting them]:n' \
|
|
1098
|
-
'--retry[Times to retry a failed run]:n' \
|
|
1099
|
-
'--timeout[Request timeout in milliseconds]:ms' \
|
|
1100
|
-
'--delay[Delay between requests in milliseconds]:ms' \
|
|
1101
|
-
'--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
|
|
1102
|
-
'--insecure[Skip TLS certificate verification for the monitored target]' \
|
|
1103
|
-
'--follow-redirects[Follow HTTP redirects during the run]' \
|
|
1104
|
-
'--block-redirects[Do not follow HTTP redirects during the run]' \
|
|
1105
|
-
'--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
|
|
1106
|
-
'--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
|
|
1107
|
-
'--iteration-count[Number of iterations to run]:n' \
|
|
1108
|
-
'--iteration-strategy[How iteration data is consumed, for example round_robin, repeat_last or stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
|
|
1109
|
-
'--no-run-now[Do not trigger an immediate run after creating the monitor]' \
|
|
1110
|
-
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1111
|
-
'--json[Output as JSON instead of a table]' \
|
|
1112
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1376
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID whose cloud globals should be read.]:workspaceId' \
|
|
1377
|
+
'--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
|
|
1378
|
+
'--verbose[Verbose output]' \
|
|
1379
|
+
'--json[JSON output]' \
|
|
1380
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1381
|
+
'*:key:_files -g "*.json"'
|
|
1113
1382
|
}
|
|
1114
1383
|
|
|
1115
|
-
|
|
1384
|
+
_postman_globals_var_unset() {
|
|
1116
1385
|
_arguments \
|
|
1117
|
-
'--
|
|
1118
|
-
'--
|
|
1119
|
-
'--
|
|
1120
|
-
'--
|
|
1121
|
-
'--notify-email[Email to notify on a run failure or error (repeatable; replaces the current list) (default\: \[\])]:email' \
|
|
1122
|
-
'--clear-notifications[Remove every notification recipient]' \
|
|
1123
|
-
'(-e --environment)'{-e,--environment}'[Environment to run the monitored collection with (replaces the current one)]:id' \
|
|
1124
|
-
'--clear-environment[Run the monitored collection with no environment]' \
|
|
1125
|
-
'--notification-limit[Consecutive failure notifications to send before muting them]:n' \
|
|
1126
|
-
'--retry[Times to retry a failed run]:n' \
|
|
1127
|
-
'--timeout[Request timeout in milliseconds]:ms' \
|
|
1128
|
-
'--delay[Delay between requests in milliseconds]:ms' \
|
|
1129
|
-
'--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
|
|
1130
|
-
'--insecure[Skip TLS certificate verification for the monitored target]' \
|
|
1131
|
-
'--follow-redirects[Follow HTTP redirects during the run]' \
|
|
1132
|
-
'--block-redirects[Do not follow HTTP redirects during the run]' \
|
|
1133
|
-
'--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
|
|
1134
|
-
'--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
|
|
1135
|
-
'--iteration-count[Number of iterations to run]:n' \
|
|
1136
|
-
'--iteration-strategy[How iteration data is consumed, for example round_robin, repeat_last or stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
|
|
1137
|
-
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1138
|
-
'--json[Output as JSON instead of a table]' \
|
|
1386
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID whose cloud globals should be updated.]:workspaceId' \
|
|
1387
|
+
'--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
|
|
1388
|
+
'--verbose[Verbose output]' \
|
|
1389
|
+
'--json[JSON output]' \
|
|
1139
1390
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1140
|
-
'*:
|
|
1391
|
+
'*:key:_files -g "*.json"'
|
|
1141
1392
|
}
|
|
1142
1393
|
|
|
1143
|
-
|
|
1394
|
+
_postman_globals_lint() {
|
|
1144
1395
|
_arguments \
|
|
1145
|
-
'(-
|
|
1146
|
-
'--
|
|
1147
|
-
'--json[Output the outcome, including any failure, as JSON instead of a plain message]' \
|
|
1396
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning"\] (default\: "error")]:value' \
|
|
1397
|
+
'(-o --output)'{-o,--output}'[Output format\: cli (human-readable), table, json, or csv. (default\: "cli")]:value' \
|
|
1148
1398
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1149
|
-
'*:
|
|
1399
|
+
'*:path:_files -g "*.json"'
|
|
1150
1400
|
}
|
|
1151
1401
|
|
|
1152
|
-
|
|
1402
|
+
_postman_mock() {
|
|
1153
1403
|
local context state state_descr line
|
|
1154
1404
|
typeset -A opt_args
|
|
1155
1405
|
_arguments -C \
|
|
1156
1406
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1157
|
-
'1: :
|
|
1407
|
+
'1: :_postman_mock_commands' \
|
|
1158
1408
|
'*::arg:->args'
|
|
1159
1409
|
case $state in
|
|
1160
1410
|
args)
|
|
1161
1411
|
case $words[1] in
|
|
1162
|
-
|
|
1163
|
-
|
|
1412
|
+
generate) _postman_mock_generate ;;
|
|
1413
|
+
run) _postman_mock_run ;;
|
|
1414
|
+
push) _postman_mock_push ;;
|
|
1415
|
+
deploy) _postman_mock_deploy ;;
|
|
1416
|
+
get) _postman_mock_get ;;
|
|
1417
|
+
list) _postman_mock_list ;;
|
|
1418
|
+
log) _postman_mock_log ;;
|
|
1419
|
+
delete) _postman_mock_delete ;;
|
|
1164
1420
|
esac
|
|
1165
1421
|
;;
|
|
1166
1422
|
esac
|
|
1167
1423
|
}
|
|
1168
1424
|
|
|
1169
|
-
|
|
1425
|
+
_postman_mock_commands() {
|
|
1170
1426
|
local -a sub
|
|
1171
1427
|
sub=(
|
|
1172
|
-
'
|
|
1173
|
-
'
|
|
1428
|
+
'generate:Generate a mock from a Postman collection or an OpenAPI file, or from a built-in sample shopping-cart mock (POST /cart/items, GET /cart, POST /checkout). Writes a local mock by default, or a cloud mock with --workspace.'
|
|
1429
|
+
'run:Start a mock using its path if it lives in your repository, or its id if it lives in Postman cloud (fetched and run locally).'
|
|
1430
|
+
'push:Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).'
|
|
1431
|
+
'deploy:Turn a mock in Postman cloud into a live mock server others can call over the internet.'
|
|
1432
|
+
'get:Show a mock'\''s details using its path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
1433
|
+
'list:List the mocks in your repository or Postman cloud workspace'
|
|
1434
|
+
'log:Show the requests a live mock server has received and the responses it sent, using its id.'
|
|
1435
|
+
'delete:Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.'
|
|
1174
1436
|
)
|
|
1175
|
-
_describe -t commands '
|
|
1437
|
+
_describe -t commands 'mock command' sub
|
|
1176
1438
|
}
|
|
1177
1439
|
|
|
1178
|
-
|
|
1440
|
+
_postman_mock_generate() {
|
|
1179
1441
|
_arguments \
|
|
1180
|
-
'--
|
|
1181
|
-
'--
|
|
1182
|
-
'--
|
|
1183
|
-
'--
|
|
1184
|
-
'--
|
|
1185
|
-
'--
|
|
1186
|
-
'--
|
|
1442
|
+
'(-o --output)'{-o,--output}'[Folder to save the mock in. Relative or absolute, e.g. ./postman/mocks/orders. Defaults to postman/mocks/<name>.]:dir:_files -g "*.json"' \
|
|
1443
|
+
'(-n --name)'{-n,--name}'[Name for the mock. Taken from the source when you provide one; required for the sample.]:name' \
|
|
1444
|
+
'--port[Port the mock runs on (e.g. 4010) (default\: 4500)]:port' \
|
|
1445
|
+
'--force[Overwrite the mock'\''s files if the target folder already has one]' \
|
|
1446
|
+
'(-u --update)'{-u,--update}'[Update an existing mock from the source instead of creating a new one. Path to the mock, relative or absolute, e.g. ./postman/mocks/orders. Cannot be used with --output.]:mockPath:_files -g "*.json"' \
|
|
1447
|
+
'(-w --workspace)'{-w,--workspace}'[Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with --output, --force, or --update.]:id' \
|
|
1448
|
+
'--api-key[Postman API key to use with --workspace (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1449
|
+
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Always exit with code 0, even on failure]' \
|
|
1187
1450
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1188
|
-
'*:
|
|
1451
|
+
'*:sourcePath:'
|
|
1189
1452
|
}
|
|
1190
1453
|
|
|
1191
|
-
|
|
1454
|
+
_postman_mock_run() {
|
|
1192
1455
|
_arguments \
|
|
1193
|
-
'--
|
|
1194
|
-
'--
|
|
1195
|
-
'(-
|
|
1196
|
-
'
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
typeset -A opt_args
|
|
1202
|
-
_arguments -C \
|
|
1456
|
+
'(-e --environment)'{-e,--environment}'[Path to a file of environment variables for the mock. Relative or absolute, e.g. ./postman/environments/dev.environment.yaml]:path:_files -g "*.json"' \
|
|
1457
|
+
'(-g --globals)'{-g,--globals}'[Path to a file of global variables for the mock. Relative or absolute, e.g. ./globals.json]:path:_files -g "*.json"' \
|
|
1458
|
+
'(-p --port)'{-p,--port}'[Port to run on (e.g. 4010), or "auto" for a free one. Defaults to the mock'\''s configured port.]:port' \
|
|
1459
|
+
'--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1460
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace that owns the run, for recording its start history. Auto-resolved for a Postman cloud id; required to record history for a path.]:id' \
|
|
1461
|
+
'--no-history[Do not record this run in the mock'\''s start history.]' \
|
|
1462
|
+
'--output[Live output format\: auto (default, human-readable logs) or ndjson (one JSON event per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
|
|
1463
|
+
'--dataset[Pass --dataset multiple times to load several .dataset.yaml files (or directories containing them). Each is made available to the mock'\''s handlers as pm.datasets(<id>). (default\: \[\])]:pathOrDir:_files -g "*.json"' \
|
|
1203
1464
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1204
|
-
'
|
|
1205
|
-
'*::arg:->args'
|
|
1206
|
-
case $state in
|
|
1207
|
-
args)
|
|
1208
|
-
case $words[1] in
|
|
1209
|
-
get) _postman_monitor_runs_get ;;
|
|
1210
|
-
esac
|
|
1211
|
-
;;
|
|
1212
|
-
esac
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
_postman_monitor_runs_commands() {
|
|
1216
|
-
local -a sub
|
|
1217
|
-
sub=(
|
|
1218
|
-
'get:Report which test assertions ran during one attempt of a run, which failed, and why.'
|
|
1219
|
-
)
|
|
1220
|
-
_describe -t commands 'runs command' sub
|
|
1465
|
+
'*:mockIdOrPath:_files -g "*.json"'
|
|
1221
1466
|
}
|
|
1222
1467
|
|
|
1223
|
-
|
|
1468
|
+
_postman_mock_push() {
|
|
1224
1469
|
_arguments \
|
|
1225
|
-
'--
|
|
1226
|
-
'--
|
|
1227
|
-
'--failed-only[Show only failed assertions]' \
|
|
1228
|
-
'--json[Output as JSON instead of a table]' \
|
|
1470
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)]:id' \
|
|
1471
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1229
1472
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1230
|
-
'*:
|
|
1473
|
+
'*:mockPath:_files -g "*.json"'
|
|
1231
1474
|
}
|
|
1232
1475
|
|
|
1233
|
-
|
|
1476
|
+
_postman_mock_deploy() {
|
|
1234
1477
|
_arguments \
|
|
1235
|
-
'--
|
|
1236
|
-
'(-
|
|
1237
|
-
'(-
|
|
1238
|
-
'
|
|
1239
|
-
'--
|
|
1240
|
-
'--
|
|
1241
|
-
'--
|
|
1242
|
-
'--
|
|
1243
|
-
'
|
|
1244
|
-
'--cursor[Pagination cursor from a previous page'\''s response]:token' \
|
|
1245
|
-
'--columns[Comma-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available\: State, Notifications, Environment, Runners]:names' \
|
|
1246
|
-
'--no-headers[Omit the header row]' \
|
|
1247
|
-
'(-f --filter)'{-f,--filter}'[Show only monitors whose name contains this text (applies to the returned page, case-insensitive)]:text' \
|
|
1248
|
-
'--sort[Sort the returned page by "name" or "active"]:field' \
|
|
1249
|
-
'--json[Output as JSON instead of a table]' \
|
|
1250
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1478
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace that will own the server, by id (defaults to the workspace already linked to this project)]:id' \
|
|
1479
|
+
'(-n --name)'{-n,--name}'[Name for the mock server (you are asked for one if you skip this)]:name' \
|
|
1480
|
+
'(-s --slug)'{-s,--slug}'[Short label used in the server'\''s web address, e.g. "my-mock" (you are asked for one if you skip this)]:slug' \
|
|
1481
|
+
'--public[Let anyone with the link reach the server. Private by default (callers must send a Postman API key).]' \
|
|
1482
|
+
'--auto-deploy[Update the live server automatically whenever the mock changes (off by default)]' \
|
|
1483
|
+
'(-y --yes)'{-y,--yes}'[Use the defaults and skip all questions (private, no auto-deploy)]' \
|
|
1484
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1485
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1486
|
+
'*:mockId:_files -g "*.json"'
|
|
1251
1487
|
}
|
|
1252
1488
|
|
|
1253
|
-
|
|
1489
|
+
_postman_mock_get() {
|
|
1254
1490
|
_arguments \
|
|
1255
|
-
'--api-key[Postman API key (defaults to
|
|
1256
|
-
'--json[
|
|
1491
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1492
|
+
'--json[Print the details as machine-readable data instead of a table]' \
|
|
1257
1493
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1258
|
-
'*:
|
|
1494
|
+
'*:mockIdOrPath:_files -g "*.json"'
|
|
1259
1495
|
}
|
|
1260
1496
|
|
|
1261
|
-
|
|
1497
|
+
_postman_mock_list() {
|
|
1262
1498
|
_arguments \
|
|
1263
|
-
'--
|
|
1264
|
-
'--
|
|
1265
|
-
'--
|
|
1266
|
-
'(-f --filter)'{-f,--filter}'[Show only requests whose name contains this text (case-insensitive)]:text' \
|
|
1267
|
-
'--limit[Maximum number of rows to show\: executions, newest first, under --json, or requests, worst-behaving first, in the table. Applied to the results after they are fetched, so it does not make the command faster]:n' \
|
|
1268
|
-
'--json[Output as JSON instead of a table]' \
|
|
1499
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace whose mocks to list, by id (defaults to the workspace already linked to this project)]:id' \
|
|
1500
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1501
|
+
'--json[Print the list as machine-readable data instead of a table]' \
|
|
1269
1502
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1270
|
-
'*:
|
|
1503
|
+
'*:pathOrDir:_files -g "*.json"'
|
|
1271
1504
|
}
|
|
1272
1505
|
|
|
1273
|
-
|
|
1506
|
+
_postman_mock_log() {
|
|
1274
1507
|
_arguments \
|
|
1275
|
-
'--
|
|
1276
|
-
'--
|
|
1508
|
+
'--limit[Most entries to show (defaults to 50 when printing machine-readable output)]:n' \
|
|
1509
|
+
'--method[Show only requests of this type (e.g. GET, POST)]:method' \
|
|
1510
|
+
'--status[Show only these response codes (e.g. 404, or 5xx for any 500-series)]:code|range' \
|
|
1511
|
+
'--path[Show only requests to matching addresses (use * and ? as wildcards, e.g. /users/*)]:pattern' \
|
|
1512
|
+
'--since[Show entries from this long ago until now (e.g. 2h = the last 2 hours)]:duration' \
|
|
1513
|
+
'--until[Hide entries newer than this (e.g. 30m = skip the most recent 30 minutes)]:duration' \
|
|
1514
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1515
|
+
'--json[Print entries as machine-readable data instead of the scrollable view]' \
|
|
1277
1516
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1278
|
-
'*:
|
|
1517
|
+
'*:mockServerId:_files -g "*.json"'
|
|
1279
1518
|
}
|
|
1280
1519
|
|
|
1281
|
-
|
|
1520
|
+
_postman_mock_delete() {
|
|
1282
1521
|
_arguments \
|
|
1283
|
-
'--
|
|
1284
|
-
'--
|
|
1522
|
+
'(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
|
|
1523
|
+
'--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1285
1524
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1286
|
-
'*:
|
|
1525
|
+
'*:mockIdOrPath:_files -g "*.json"'
|
|
1287
1526
|
}
|
|
1288
1527
|
|
|
1289
|
-
|
|
1528
|
+
_postman_monitor() {
|
|
1290
1529
|
local context state state_descr line
|
|
1291
1530
|
typeset -A opt_args
|
|
1292
1531
|
_arguments -C \
|
|
1293
1532
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1294
|
-
'1: :
|
|
1533
|
+
'1: :_postman_monitor_commands' \
|
|
1295
1534
|
'*::arg:->args'
|
|
1296
1535
|
case $state in
|
|
1297
1536
|
args)
|
|
1298
1537
|
case $words[1] in
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1538
|
+
run) _postman_monitor_run ;;
|
|
1539
|
+
create) _postman_monitor_create ;;
|
|
1540
|
+
update) _postman_monitor_update ;;
|
|
1541
|
+
delete) _postman_monitor_delete ;;
|
|
1542
|
+
jobs) _postman_monitor_jobs ;;
|
|
1543
|
+
runs) _postman_monitor_runs ;;
|
|
1544
|
+
list) _postman_monitor_list ;;
|
|
1545
|
+
get) _postman_monitor_get ;;
|
|
1546
|
+
metrics) _postman_monitor_metrics ;;
|
|
1547
|
+
pause) _postman_monitor_pause ;;
|
|
1548
|
+
resume) _postman_monitor_resume ;;
|
|
1310
1549
|
esac
|
|
1311
1550
|
;;
|
|
1312
1551
|
esac
|
|
1313
1552
|
}
|
|
1314
1553
|
|
|
1315
|
-
|
|
1554
|
+
_postman_monitor_commands() {
|
|
1316
1555
|
local -a sub
|
|
1317
1556
|
sub=(
|
|
1318
|
-
'
|
|
1319
|
-
'
|
|
1320
|
-
'
|
|
1321
|
-
'
|
|
1322
|
-
'
|
|
1323
|
-
'
|
|
1324
|
-
'
|
|
1325
|
-
'
|
|
1326
|
-
'
|
|
1327
|
-
'
|
|
1328
|
-
'
|
|
1557
|
+
'run:Invoke a monitor run and display results.'
|
|
1558
|
+
'create:Create a collection-based monitor.'
|
|
1559
|
+
'update:Update a monitor'\''s schedule, runner, notifications, request selection or run options.'
|
|
1560
|
+
'delete:Permanently delete a monitor. Prompts for confirmation unless --yes is passed.'
|
|
1561
|
+
'jobs:Inspect a monitor'\''s jobs and their per-region runs.'
|
|
1562
|
+
'runs:Inspect a monitor run'\''s attempts.'
|
|
1563
|
+
'list:List the monitors visible to you.'
|
|
1564
|
+
'get:Show a monitor'\''s configuration.'
|
|
1565
|
+
'metrics:Show per-request latency and outcome history for a monitor.'
|
|
1566
|
+
'pause:Pause a monitor, so it stops firing on schedule.'
|
|
1567
|
+
'resume:Resume a paused monitor, so it fires on schedule again.'
|
|
1329
1568
|
)
|
|
1330
|
-
_describe -t commands '
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
_postman_workspace_list() {
|
|
1334
|
-
_arguments \
|
|
1335
|
-
'(-f --filter)'{-f,--filter}'[Filter workspaces by name.]:name' \
|
|
1336
|
-
'(-t --type)'{-t,--type}'[Filter workspaces by visibility type\: team, public, private, personal.]:type' \
|
|
1337
|
-
'--verbose[Verbose output]' \
|
|
1338
|
-
'--debug[Debug output]' \
|
|
1339
|
-
'--json[JSON output]' \
|
|
1340
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
_postman_workspace_prepare() {
|
|
1344
|
-
_arguments \
|
|
1345
|
-
'--verbose[Show detailed logging]' \
|
|
1346
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
_postman_workspace_push() {
|
|
1350
|
-
_arguments \
|
|
1351
|
-
'--no-prepare[Skip ID validation and auto-fix before pushing]' \
|
|
1352
|
-
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
|
|
1353
|
-
'--push-strategy[Push strategy. "force-sync"\: mirror the whole workspace — also DELETE cloud entities that have no local counterpart (destructive). Defaults to "default" (create/update only).]:strategy' \
|
|
1354
|
-
'--verbose[Show detailed logging]' \
|
|
1355
|
-
'--report-events[Accepted for compatibility; analytics are sent by default]' \
|
|
1356
|
-
'--no-report-events[Do not send analytics to Postman]' \
|
|
1357
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
_postman_workspace_lint() {
|
|
1361
|
-
_arguments \
|
|
1362
|
-
'(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning", "info", "hint"\] (default\: "error")]:value' \
|
|
1363
|
-
'(-o --output)'{-o,--output}'[Output format\: cli (human-readable), table, or json. (default\: "cli")]:value' \
|
|
1364
|
-
'--meta[Only lint the workspace configuration (.postman/resources.yaml); skip per-entity linting.]' \
|
|
1365
|
-
'--workspace-id[The workspace ID to use for fetching governance rulesets. Defaults to the id in .postman/resources.yaml.]:value' \
|
|
1366
|
-
'--fix[Apply safe autofixes to repairable workspace lint issues.]' \
|
|
1367
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1569
|
+
_describe -t commands 'monitor command' sub
|
|
1368
1570
|
}
|
|
1369
1571
|
|
|
1370
|
-
|
|
1572
|
+
_postman_monitor_run() {
|
|
1371
1573
|
_arguments \
|
|
1372
|
-
'--
|
|
1373
|
-
'--
|
|
1374
|
-
'--timeout[
|
|
1574
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1575
|
+
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
|
|
1576
|
+
'(-t --timeout)'{-t,--timeout}'[Maximum wait time for run completion in milliseconds (default\: 15 minutes) (default\: 900000)]:ms' \
|
|
1577
|
+
'--async[Submit the run and return immediately with its job id and Postman URL, without waiting for completion]' \
|
|
1578
|
+
'--json[Output the run'\''s verdict as JSON instead of a table, printing nothing else]' \
|
|
1375
1579
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1376
|
-
'*:
|
|
1580
|
+
'*:monitorId:'
|
|
1377
1581
|
}
|
|
1378
1582
|
|
|
1379
|
-
|
|
1583
|
+
_postman_monitor_create() {
|
|
1380
1584
|
_arguments \
|
|
1381
|
-
'--
|
|
1382
|
-
'--name[
|
|
1383
|
-
'--
|
|
1384
|
-
'--
|
|
1385
|
-
'--
|
|
1386
|
-
'--
|
|
1387
|
-
'--
|
|
1388
|
-
'--
|
|
1585
|
+
'(-c --collection)'{-c,--collection}'[Collection to monitor -- accepts the id shown in the Postman app, prefixed or bare]:id' \
|
|
1586
|
+
'--name[Monitor name (defaults to the linked collection'\''s own name)]:name' \
|
|
1587
|
+
'(-e --environment)'{-e,--environment}'[Environment to run the monitored collection with]:id' \
|
|
1588
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace to create the monitor in (defaults to the workspace named in the local .postman/resources.yaml manifest; required if neither is available)]:id' \
|
|
1589
|
+
'--schedule[Cron expression for the monitor'\''s schedule]:cron' \
|
|
1590
|
+
'--timezone[Time zone for --schedule, for example America/New_York (defaults to the host machine'\''s own zone)]:tz' \
|
|
1591
|
+
'--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable) (default\: \[\])]:value' \
|
|
1592
|
+
'(-i --item)'{-i,--item}'[Id of a request or folder in the collection to run, in the order given (repeatable; ids only, not names or paths; defaults to every request; list ids with `postman collection get <collection-id> --json`) (default\: \[\])]:id' \
|
|
1593
|
+
'--notify-email[Email to notify on a run failure or error (repeatable) (default\: \[\])]:email' \
|
|
1594
|
+
'--notification-limit[Consecutive failure notifications to send before muting them]:n' \
|
|
1595
|
+
'--retry[Times to retry a failed run]:n' \
|
|
1596
|
+
'--timeout[Request timeout in milliseconds]:ms' \
|
|
1597
|
+
'--delay[Delay between requests in milliseconds]:ms' \
|
|
1598
|
+
'--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
|
|
1599
|
+
'--insecure[Skip TLS certificate verification for the monitored target]' \
|
|
1600
|
+
'--follow-redirects[Follow HTTP redirects during the run]' \
|
|
1601
|
+
'--block-redirects[Do not follow HTTP redirects during the run]' \
|
|
1602
|
+
'--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
|
|
1603
|
+
'--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
|
|
1604
|
+
'--iteration-count[Number of iterations to run]:n' \
|
|
1605
|
+
'--iteration-strategy[How iteration data is consumed, for example round_robin, repeat_last or stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
|
|
1606
|
+
'--no-run-now[Do not trigger an immediate run after creating the monitor]' \
|
|
1607
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1608
|
+
'--json[Output as JSON instead of a table]' \
|
|
1389
1609
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1390
1610
|
}
|
|
1391
1611
|
|
|
1392
|
-
|
|
1393
|
-
_arguments \
|
|
1394
|
-
'(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
|
|
1395
|
-
'--json[Print the outcome as machine-readable JSON]' \
|
|
1396
|
-
'--verbose[Show detailed logging]' \
|
|
1397
|
-
'--timeout[Abort the run after this many milliseconds. Defaults to 30000.]:ms' \
|
|
1398
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1399
|
-
'*:workspaceId:'
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
_postman_workspace_pull() {
|
|
1403
|
-
_arguments \
|
|
1404
|
-
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
|
|
1405
|
-
'--source-workspace[Pull from a different source workspace.]:workspaceId' \
|
|
1406
|
-
'--verbose[Show detailed logging]' \
|
|
1407
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1408
|
-
'*:workspaceId:'
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
_postman_workspace_connect_git() {
|
|
1412
|
-
_arguments \
|
|
1413
|
-
'--verbose[Show detailed logging]' \
|
|
1414
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1415
|
-
'*:path:_files -g "*.json"'
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
_postman_workspace_disconnect_git() {
|
|
1419
|
-
_arguments \
|
|
1420
|
-
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
|
|
1421
|
-
'--verbose[Show detailed logging]' \
|
|
1422
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1423
|
-
'*:workspaceId:'
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
_postman_workspace_diff() {
|
|
1612
|
+
_postman_monitor_update() {
|
|
1427
1613
|
_arguments \
|
|
1428
|
-
'--
|
|
1429
|
-
'--
|
|
1430
|
-
'--
|
|
1431
|
-
'--
|
|
1432
|
-
'--
|
|
1433
|
-
'--
|
|
1434
|
-
'
|
|
1435
|
-
'
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
'
|
|
1443
|
-
'
|
|
1444
|
-
'
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
_postman_team_commands() {
|
|
1455
|
-
local -a sub
|
|
1456
|
-
sub=(
|
|
1457
|
-
'list:List the teams inside your organisation.'
|
|
1458
|
-
)
|
|
1459
|
-
_describe -t commands 'team command' sub
|
|
1614
|
+
'--name[New monitor name]:name' \
|
|
1615
|
+
'--schedule[New cron expression for the monitor'\''s schedule]:cron' \
|
|
1616
|
+
'--timezone[Time zone for --schedule, for example America/New_York (defaults to the host machine'\''s own zone)]:tz' \
|
|
1617
|
+
'--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable; replaces the current set) (default\: \[\])]:value' \
|
|
1618
|
+
'(-i --item)'{-i,--item}'[Id of a request or folder in the collection to run, in the order given (repeatable; ids only, not names or paths; replaces the saved selection; list ids with `postman collection get <collection-id> --json`) (default\: \[\])]:id' \
|
|
1619
|
+
'--clear-items[Remove the saved selection so the monitor runs every request in its collection]' \
|
|
1620
|
+
'--notify-email[Email to notify on a run failure or error (repeatable; replaces the current list) (default\: \[\])]:email' \
|
|
1621
|
+
'--clear-notifications[Remove every notification recipient]' \
|
|
1622
|
+
'(-e --environment)'{-e,--environment}'[Environment to run the monitored collection with (replaces the current one)]:id' \
|
|
1623
|
+
'--clear-environment[Run the monitored collection with no environment]' \
|
|
1624
|
+
'--notification-limit[Consecutive failure notifications to send before muting them]:n' \
|
|
1625
|
+
'--retry[Times to retry a failed run]:n' \
|
|
1626
|
+
'--timeout[Request timeout in milliseconds]:ms' \
|
|
1627
|
+
'--delay[Delay between requests in milliseconds]:ms' \
|
|
1628
|
+
'--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
|
|
1629
|
+
'--insecure[Skip TLS certificate verification for the monitored target]' \
|
|
1630
|
+
'--follow-redirects[Follow HTTP redirects during the run]' \
|
|
1631
|
+
'--block-redirects[Do not follow HTTP redirects during the run]' \
|
|
1632
|
+
'--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
|
|
1633
|
+
'--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
|
|
1634
|
+
'--iteration-count[Number of iterations to run]:n' \
|
|
1635
|
+
'--iteration-strategy[How iteration data is consumed, for example round_robin, repeat_last or stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
|
|
1636
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1637
|
+
'--json[Output as JSON instead of a table]' \
|
|
1638
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1639
|
+
'*:monitorId:'
|
|
1460
1640
|
}
|
|
1461
1641
|
|
|
1462
|
-
|
|
1642
|
+
_postman_monitor_delete() {
|
|
1463
1643
|
_arguments \
|
|
1464
|
-
'--
|
|
1465
|
-
'--
|
|
1466
|
-
'--
|
|
1467
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1644
|
+
'(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
|
|
1645
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1646
|
+
'--json[Output the outcome, including any failure, as JSON instead of a plain message]' \
|
|
1647
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1648
|
+
'*:monitorId:'
|
|
1468
1649
|
}
|
|
1469
1650
|
|
|
1470
|
-
|
|
1651
|
+
_postman_monitor_jobs() {
|
|
1471
1652
|
local context state state_descr line
|
|
1472
1653
|
typeset -A opt_args
|
|
1473
1654
|
_arguments -C \
|
|
1474
1655
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1475
|
-
'1: :
|
|
1656
|
+
'1: :_postman_monitor_jobs_commands' \
|
|
1476
1657
|
'*::arg:->args'
|
|
1477
1658
|
case $state in
|
|
1478
1659
|
args)
|
|
1479
1660
|
case $words[1] in
|
|
1480
|
-
|
|
1481
|
-
|
|
1661
|
+
list) _postman_monitor_jobs_list ;;
|
|
1662
|
+
get) _postman_monitor_jobs_get ;;
|
|
1482
1663
|
esac
|
|
1483
1664
|
;;
|
|
1484
1665
|
esac
|
|
1485
1666
|
}
|
|
1486
1667
|
|
|
1487
|
-
|
|
1668
|
+
_postman_monitor_jobs_commands() {
|
|
1488
1669
|
local -a sub
|
|
1489
1670
|
sub=(
|
|
1490
|
-
'
|
|
1491
|
-
'
|
|
1671
|
+
'list:List a monitor'\''s recent jobs.'
|
|
1672
|
+
'get:Report one job'\''s terminal state and its per-region run outcomes.'
|
|
1492
1673
|
)
|
|
1493
|
-
_describe -t commands '
|
|
1674
|
+
_describe -t commands 'jobs command' sub
|
|
1494
1675
|
}
|
|
1495
1676
|
|
|
1496
|
-
|
|
1677
|
+
_postman_monitor_jobs_list() {
|
|
1497
1678
|
_arguments \
|
|
1498
|
-
'
|
|
1499
|
-
'
|
|
1500
|
-
'--
|
|
1501
|
-
'--
|
|
1502
|
-
'--
|
|
1503
|
-
'
|
|
1504
|
-
'
|
|
1505
|
-
'--data-file[Path to a JSON or CSV data file to use with the collection]:path:_files -g "*.json"' \
|
|
1506
|
-
'--ssl-client-cert-list[Path to a client certificates configuration file (JSON). Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
1507
|
-
'--ssl-client-cert[Path to a client certificate (PEM) for mTLS targets. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
1508
|
-
'--ssl-client-key[Path to the client certificate private key. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
1509
|
-
'--ssl-client-passphrase[Client certificate passphrase (for a protected key). Local runner only.]:passphrase' \
|
|
1510
|
-
'(-k --insecure)'{-k,--insecure}'[Disable SSL certificate verification for the target. Local runner only.]' \
|
|
1511
|
-
'--ssl-extra-ca-certs[Path to additionally trusted CA certificates (PEM) for the target. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
1512
|
-
'--dataset-id[Use a Postman Dataset as iteration data (with --dataset-view-id)]:id' \
|
|
1513
|
-
'--dataset-view-id[Dataset view to execute for iteration data (requires --dataset-id)]:id' \
|
|
1514
|
-
'--dataset-distribution[How rows map to VUs\: round-robin (default), fixed, random]:strategy' \
|
|
1515
|
-
'--postman-api-key[API Key used to load the resources from the Postman API (Only supported in the US region, use '\''postman login --region'\'' to authenticate instead)]:apiKey' \
|
|
1516
|
-
'--output[Output format for live results\: auto (default, interactive dashboard) or ndjson (one JSON object per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
|
|
1517
|
-
'--runner[Runner to execute the performance test on\: local, postman-cloud, or postman-cloud-static-ip (egress from your account region'\''s static-IP cluster) (default\: local)]:runner' \
|
|
1518
|
-
'--pass-if[Pass condition in format\: function(metric, value). Functions\: less_than, greater_than, less_than_eq, greater_than_eq. Metrics\: avg, p90, p95, p99, error_rate, rps. Example\: less_than(p95, 500) or less_than(error_rate, 5)]:condition' \
|
|
1519
|
-
'--use-mock[Redirect a variable/host to a local code mock or cloud Mock Server (repeatable). Format\: "<{{var}}|host> mock|mock-server\:<path|id> \[scenario\]" (default\: \[\])]:mapping' \
|
|
1520
|
-
'--dataset[Pass --dataset multiple times to load several .dataset.yaml files (or directories containing them). Each is made available to the handlers of the local mocks started by --use-mock as pm.datasets(<id>). Local runner only. (default\: \[\])]:pathOrDir:_files -g "*.json"' \
|
|
1679
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1680
|
+
'--result[Filter by outcome, for example success, failure, error or abort]:value' \
|
|
1681
|
+
'--trigger[Filter by trigger, for example api, schedule, webhook or postman-cli]:value' \
|
|
1682
|
+
'--since[Only jobs that finished at or after this ISO 8601 date-time]:dateTime' \
|
|
1683
|
+
'--limit[Maximum number of jobs to return]:n' \
|
|
1684
|
+
'--cursor[Opaque pagination cursor]:token' \
|
|
1685
|
+
'--json[Output as JSON instead of a table]' \
|
|
1521
1686
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1522
|
-
'*:
|
|
1687
|
+
'*:monitorId:'
|
|
1523
1688
|
}
|
|
1524
1689
|
|
|
1525
|
-
|
|
1690
|
+
_postman_monitor_jobs_get() {
|
|
1526
1691
|
_arguments \
|
|
1527
|
-
'
|
|
1528
|
-
'--cursor[Pagination cursor from a previous page'\''s response]:token' \
|
|
1692
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1529
1693
|
'--json[Output as JSON instead of a table]' \
|
|
1530
|
-
'--timeout[Milliseconds to wait for the service before failing (default\: "30000")]:ms' \
|
|
1531
1694
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1532
|
-
'*:
|
|
1695
|
+
'*:jobId:'
|
|
1533
1696
|
}
|
|
1534
1697
|
|
|
1535
|
-
|
|
1698
|
+
_postman_monitor_runs() {
|
|
1536
1699
|
local context state state_descr line
|
|
1537
1700
|
typeset -A opt_args
|
|
1538
1701
|
_arguments -C \
|
|
1539
1702
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1540
|
-
'1: :
|
|
1703
|
+
'1: :_postman_monitor_runs_commands' \
|
|
1541
1704
|
'*::arg:->args'
|
|
1542
1705
|
case $state in
|
|
1543
1706
|
args)
|
|
1544
1707
|
case $words[1] in
|
|
1545
|
-
|
|
1546
|
-
trigger) _postman_flows_trigger ;;
|
|
1547
|
-
deploy) _postman_flows_deploy ;;
|
|
1548
|
-
run) _postman_flows_run ;;
|
|
1549
|
-
update) _postman_flows_update ;;
|
|
1550
|
-
list-runs) _postman_flows_list_runs ;;
|
|
1551
|
-
get-run) _postman_flows_get_run ;;
|
|
1708
|
+
get) _postman_monitor_runs_get ;;
|
|
1552
1709
|
esac
|
|
1553
1710
|
;;
|
|
1554
1711
|
esac
|
|
1555
1712
|
}
|
|
1556
1713
|
|
|
1557
|
-
|
|
1714
|
+
_postman_monitor_runs_commands() {
|
|
1558
1715
|
local -a sub
|
|
1559
1716
|
sub=(
|
|
1560
|
-
'
|
|
1561
|
-
'trigger:Trigger a deployed flow'
|
|
1562
|
-
'deploy:Deploy a flow (required to trigger it)'
|
|
1563
|
-
'run:Run a single flow from a file (e.g. ./path/to/flow.json)'
|
|
1564
|
-
'update:Update settings for a deployed flow'
|
|
1565
|
-
'list-runs:List run history for a deployed flow'
|
|
1566
|
-
'get-run:Analyze a specific flow run'
|
|
1717
|
+
'get:Report which test assertions ran during one attempt of a run, which failed, and why.'
|
|
1567
1718
|
)
|
|
1568
|
-
_describe -t commands '
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
_postman_flows_list() {
|
|
1572
|
-
_arguments \
|
|
1573
|
-
'(-w --workspace)'{-w,--workspace}'[Specify the workspace ID to list flows from]:workspaceId' \
|
|
1574
|
-
'(-p --paginate)'{-p,--paginate}'[Paginates the list of flows]' \
|
|
1575
|
-
'(-f --filter)'{-f,--filter}'[Filter flows by name. Pattern may be a regex, or a name prefix.]:pattern' \
|
|
1576
|
-
'(-s --sort)'{-s,--sort}'[Sort flows by criteria\: "name" or "updated" (default\: updated) (default\: "updated")]:criteria' \
|
|
1577
|
-
'--verbose[Verbose output]' \
|
|
1578
|
-
'--debug[Debug output]' \
|
|
1579
|
-
'--json[JSON output]' \
|
|
1580
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1719
|
+
_describe -t commands 'runs command' sub
|
|
1581
1720
|
}
|
|
1582
1721
|
|
|
1583
|
-
|
|
1722
|
+
_postman_monitor_runs_get() {
|
|
1584
1723
|
_arguments \
|
|
1585
|
-
'
|
|
1586
|
-
'
|
|
1587
|
-
'
|
|
1588
|
-
'--
|
|
1589
|
-
'(-n --dry-run)'{-n,--dry-run}'[Show the flow requestURL and payload that would be sent without making the actual request (default\: false)]' \
|
|
1590
|
-
'--show-secrets[Show actual authentication tokens in dry-run output (otherwise secrets are masked) (default\: false)]' \
|
|
1591
|
-
'(-r --result)'{-r,--result}'[Show only the response body (default\: false)]' \
|
|
1592
|
-
'(-s --scenario)'{-s,--scenario}'[Use a named scenario from the flow definition to construct the input payload, headers, and query parameters (overridden by --headers/--query)]:name' \
|
|
1593
|
-
'--verbose[Verbose output]' \
|
|
1594
|
-
'--debug[Debug output]' \
|
|
1595
|
-
'--json[JSON output]' \
|
|
1724
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1725
|
+
'--attempt[Which attempt of the run to show, where 0 is the first (default\: the most recent)]:n' \
|
|
1726
|
+
'--failed-only[Show only failed assertions]' \
|
|
1727
|
+
'--json[Output as JSON instead of a table]' \
|
|
1596
1728
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1597
|
-
'*:
|
|
1729
|
+
'*:runId:'
|
|
1598
1730
|
}
|
|
1599
1731
|
|
|
1600
|
-
|
|
1732
|
+
_postman_monitor_list() {
|
|
1601
1733
|
_arguments \
|
|
1602
|
-
'
|
|
1603
|
-
'(-
|
|
1604
|
-
'(-
|
|
1605
|
-
'--
|
|
1606
|
-
'--
|
|
1607
|
-
'--
|
|
1608
|
-
'
|
|
1609
|
-
'
|
|
1734
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1735
|
+
'(-w --workspace)'{-w,--workspace}'[Filter to monitors in this workspace]:id' \
|
|
1736
|
+
'(-c --collection)'{-c,--collection}'[Filter to monitors on this collection]:id' \
|
|
1737
|
+
'(-e --environment)'{-e,--environment}'[Filter to monitors on this environment]:id' \
|
|
1738
|
+
'--runner[Filter to a self-hosted runner id, not a Postman region. Cannot be combined with --workspace, --collection, --environment, --owner, --team or --active]:id' \
|
|
1739
|
+
'--owner[Filter to monitors created by this user id (shown in the Owner column)]:id' \
|
|
1740
|
+
'--team[Filter to monitors owned by your own team]' \
|
|
1741
|
+
'--active[Filter by active state]:true|false' \
|
|
1742
|
+
'--limit[Maximum number of monitors to return (Postman caps the page size and rejects a larger value)]:n' \
|
|
1743
|
+
'--cursor[Pagination cursor from a previous page'\''s response]:token' \
|
|
1744
|
+
'--columns[Comma-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available\: State, Notifications, Environment, Runners]:names' \
|
|
1745
|
+
'--no-headers[Omit the header row]' \
|
|
1746
|
+
'(-f --filter)'{-f,--filter}'[Show only monitors whose name contains this text (applies to the returned page, case-insensitive)]:text' \
|
|
1747
|
+
'--sort[Sort the returned page by "name" or "active"]:field' \
|
|
1748
|
+
'--json[Output as JSON instead of a table]' \
|
|
1749
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1610
1750
|
}
|
|
1611
1751
|
|
|
1612
|
-
|
|
1752
|
+
_postman_monitor_get() {
|
|
1613
1753
|
_arguments \
|
|
1614
|
-
'
|
|
1615
|
-
'
|
|
1616
|
-
'(-s --scenario)'{-s,--scenario}'[Use a pre-built scenario as flow inputs (by scenario name). Can be combined with --input and --input-file to override values.]:name' \
|
|
1617
|
-
'--iteration-data-dataset[\[BETA\] Run the flow once per row of a dataset view. Accepts a local .dataset.yaml path or a cloud dataset id (cloud requires login). Requires --iteration-data-view. Dataset columns feed the flow inputs (see --map-column).]:pathOrId:_files -g "*.(json|csv)"' \
|
|
1618
|
-
'--iteration-data-view[\[BETA\] Name or id of the view (within --iteration-data-dataset) whose rows drive the run.]:nameOrId' \
|
|
1619
|
-
'(-m --map-column)'{-m,--map-column}'[\[BETA\] Bind a flow input to a dataset column (e.g. -m isActive=active). Repeatable. Inputs whose name matches a column bind automatically. (default\: \[\])]:input=column' \
|
|
1620
|
-
'(-e --environment)'{-e,--environment}'[Specify a path to a Postman Environment file (JSON or YAML)]:path:_files -g "*.json"' \
|
|
1621
|
-
'--working-dir[Specify the path to the working directory]:path:_files -/' \
|
|
1622
|
-
'--no-insecure-file-read[Prevent reading dataset files situated outside of the working directory (applies to --iteration-data-dataset)]' \
|
|
1623
|
-
'--verbose[Show detailed information of flow run and each request (method, URL, assertions)]' \
|
|
1624
|
-
'--no-truncate[Show full output without truncating long values]' \
|
|
1625
|
-
'--output[Save execution result to a file (supported\: json)]:format' \
|
|
1626
|
-
'--reporters[Save a test results report to a file (supported\: html)]:format' \
|
|
1627
|
-
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
|
|
1628
|
-
'--workspace[Workspace ID required for flows that contain connector blocks. Find it in the Postman app URL\: https\://postman.com/workspace/<workspaceId>]:workspaceId' \
|
|
1629
|
-
'--report-events[Accepted for compatibility; analytics are sent by default]' \
|
|
1630
|
-
'--no-report-events[Do not send analytics to Postman]' \
|
|
1631
|
-
'--verbose[Verbose output]' \
|
|
1632
|
-
'--debug[Debug output]' \
|
|
1633
|
-
'--json[JSON output]' \
|
|
1754
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1755
|
+
'--json[Output as JSON instead of a table]' \
|
|
1634
1756
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1635
|
-
'*:
|
|
1757
|
+
'*:monitorId:'
|
|
1636
1758
|
}
|
|
1637
1759
|
|
|
1638
|
-
|
|
1760
|
+
_postman_monitor_metrics() {
|
|
1639
1761
|
_arguments \
|
|
1640
|
-
'
|
|
1641
|
-
'
|
|
1642
|
-
'--
|
|
1643
|
-
'--
|
|
1644
|
-
'--
|
|
1762
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1763
|
+
'--since[Only executions at or after this ISO 8601 date-time (defaults to 7 days ago)]:dateTime' \
|
|
1764
|
+
'--until[Only executions at or before this ISO 8601 date-time (defaults to now)]:dateTime' \
|
|
1765
|
+
'(-f --filter)'{-f,--filter}'[Show only requests whose name contains this text (case-insensitive)]:text' \
|
|
1766
|
+
'--limit[Maximum number of rows to show\: executions, newest first, under --json, or requests, worst-behaving first, in the table. Applied to the results after they are fetched, so it does not make the command faster]:n' \
|
|
1767
|
+
'--json[Output as JSON instead of a table]' \
|
|
1645
1768
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1646
|
-
'*:
|
|
1769
|
+
'*:monitorId:'
|
|
1647
1770
|
}
|
|
1648
1771
|
|
|
1649
|
-
|
|
1772
|
+
_postman_monitor_pause() {
|
|
1650
1773
|
_arguments \
|
|
1651
|
-
'
|
|
1652
|
-
'
|
|
1653
|
-
'(-
|
|
1654
|
-
'
|
|
1655
|
-
'--debug[Debug output]' \
|
|
1656
|
-
'--json[JSON output]' \
|
|
1657
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1774
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1775
|
+
'--json[Output as JSON instead of a table]' \
|
|
1776
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1777
|
+
'*:monitorId:'
|
|
1658
1778
|
}
|
|
1659
1779
|
|
|
1660
|
-
|
|
1780
|
+
_postman_monitor_resume() {
|
|
1661
1781
|
_arguments \
|
|
1662
|
-
'
|
|
1663
|
-
'
|
|
1664
|
-
'--
|
|
1665
|
-
'
|
|
1666
|
-
'--debug[Debug output]' \
|
|
1667
|
-
'--json[JSON output]' \
|
|
1668
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1782
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1783
|
+
'--json[Output as JSON instead of a table]' \
|
|
1784
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1785
|
+
'*:monitorId:'
|
|
1669
1786
|
}
|
|
1670
1787
|
|
|
1671
1788
|
_postman_request() {
|
|
@@ -1679,6 +1796,14 @@ _postman_request() {
|
|
|
1679
1796
|
'--redirects-max[Maximum number of redirects to follow. Default is unlimited. Useful for preventing redirect loops.]:n' \
|
|
1680
1797
|
'--redirects-follow-method[Preserves the original HTTP method when following redirects. By default, redirects are followed with GET method.]' \
|
|
1681
1798
|
'--redirects-remove-referrer[Removes the Referer header when following redirects. By default, Referer header is sent with redirects.]' \
|
|
1799
|
+
'(-k --insecure)'{-k,--insecure}'[Disable SSL certificate verification.]' \
|
|
1800
|
+
'--ssl-client-cert-list[Specify the path to client certificate configurations (JSON).]:path:_files -g "*.(pem|crt|key)"' \
|
|
1801
|
+
'--ssl-client-cert[Specify the path to a client certificate (PEM).]:path:_files -g "*.(pem|crt|key)"' \
|
|
1802
|
+
'--ssl-client-key[Specify the path to a client certificate private key.]:path:_files -g "*.(pem|crt|key)"' \
|
|
1803
|
+
'--ssl-client-passphrase[Specify the client certificate passphrase (for protected key).]:passphrase' \
|
|
1804
|
+
'--ssl-extra-ca-certs[Specify additional trusted CA certificates (PEM).]:path:_files -g "*.(pem|crt|key)"' \
|
|
1805
|
+
'--cookie-jar[Specify the path to a custom cookie jar (serialized tough-cookie JSON).]:path:_files -g "*.json"' \
|
|
1806
|
+
'--export-cookie-jar[Export the cookie jar to a file after completing the request.]:path:_files -g "*.json"' \
|
|
1682
1807
|
'--retry[Number of retry attempts for failed requests (4xx, 5xx, network errors). Useful for flaky endpoints or rate-limited APIs. (default\: 0)]:n' \
|
|
1683
1808
|
'--retry-delay[Delay between retry attempts in milliseconds. (default\: 1000)]:ms' \
|
|
1684
1809
|
'--script-pre-request[Add JavaScript script to run before the request. Can be inline JS or @filepath to load from file. Scripts have access to pm.* APIs. Example\: --script-pre-request "pm.environment.set('\''timestamp'\'', Date.now());" or --script-pre-request @setup.js]:script' \
|
|
@@ -1688,8 +1813,8 @@ _postman_request() {
|
|
|
1688
1813
|
'--verbose[Show detailed request and response information including headers, body, and metadata.]' \
|
|
1689
1814
|
'--response-only[suppress all output except response body. Useful for piping to other commands.]' \
|
|
1690
1815
|
'--debug[Debug mode\: show detailed execution information including retry attempts, redirects, and timing breakdowns.]' \
|
|
1691
|
-
'--report-events[
|
|
1692
|
-
'--no-report-events[Do not
|
|
1816
|
+
'--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
|
|
1817
|
+
'--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
1693
1818
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1694
1819
|
'--auth-basic-username[Supply authentication parameters dynamically.]:value' \
|
|
1695
1820
|
'--auth-basic-password[Supply authentication parameters dynamically.]:value' \
|
|
@@ -1717,7 +1842,67 @@ _postman_request() {
|
|
|
1717
1842
|
'--auth-apikey-key[Supply authentication parameters dynamically.]:value' \
|
|
1718
1843
|
'--auth-apikey-value[Supply authentication parameters dynamically.]:value' \
|
|
1719
1844
|
'--auth-apikey-in[Supply authentication parameters dynamically.]:value' \
|
|
1720
|
-
'*:
|
|
1845
|
+
'*:URL:'
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
_postman_runner() {
|
|
1849
|
+
local context state state_descr line
|
|
1850
|
+
typeset -A opt_args
|
|
1851
|
+
_arguments -C \
|
|
1852
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1853
|
+
'1: :_postman_runner_commands' \
|
|
1854
|
+
'*::arg:->args'
|
|
1855
|
+
case $state in
|
|
1856
|
+
args)
|
|
1857
|
+
case $words[1] in
|
|
1858
|
+
start) _postman_runner_start ;;
|
|
1859
|
+
list) _postman_runner_list ;;
|
|
1860
|
+
regions) _postman_runner_regions ;;
|
|
1861
|
+
esac
|
|
1862
|
+
;;
|
|
1863
|
+
esac
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
_postman_runner_commands() {
|
|
1867
|
+
local -a sub
|
|
1868
|
+
sub=(
|
|
1869
|
+
'start:Start a self-hosted runner in your own network.'
|
|
1870
|
+
'list:List the team'\''s registered self-hosted runners.'
|
|
1871
|
+
'regions:List the region and private-runner values valid for monitor create/update --runner, with the static IP Postman runs each one from, where your team has access to it.'
|
|
1872
|
+
)
|
|
1873
|
+
_describe -t commands 'runner command' sub
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
_postman_runner_start() {
|
|
1877
|
+
_arguments \
|
|
1878
|
+
'--id[The ID of the runner to execute]:id' \
|
|
1879
|
+
'--key[The secret key for the runner]:key:_files -g "*.(pem|crt|key)"' \
|
|
1880
|
+
'--region[Region this runner reports to -- use "eu" for the EU region]:region' \
|
|
1881
|
+
'--proxy[External proxy URL, for example http\://proxy.com or http\://proxy.com\:8080]:url' \
|
|
1882
|
+
'--egress-proxy[Enable built-in egress proxy]' \
|
|
1883
|
+
'--egress-proxy-authz-url[Custom egress proxy authorization service base URL]:url' \
|
|
1884
|
+
'--ssl-extra-ca-certs[Additional trusted CA certificates (PEM file, can contain multiple certs)]:path:_files -g "*.(pem|crt|key)"' \
|
|
1885
|
+
'--dataset-jdbc-driver-dir[Folder on this machine holding the JDBC driver .jar files you put there. Required to run a dataset that uses a JDBC source. Drivers are loaded only from this folder and matched by file name; driver paths saved in the dataset are ignored]:path:_files -/' \
|
|
1886
|
+
'--metrics[Enable the metrics server for health checks]' \
|
|
1887
|
+
'--metrics-port[Port for the metrics server (default\: "9090")]:port' \
|
|
1888
|
+
'--report-events[Dispatch run events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
|
|
1889
|
+
'--no-report-events[Do not dispatch run events to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
1890
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
_postman_runner_list() {
|
|
1894
|
+
_arguments \
|
|
1895
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1896
|
+
'(-w --workspace)'{-w,--workspace}'[Filter to runners in this workspace]:id' \
|
|
1897
|
+
'--json[Output the runner list as JSON instead of a table]' \
|
|
1898
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
_postman_runner_regions() {
|
|
1902
|
+
_arguments \
|
|
1903
|
+
'--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1904
|
+
'--json[Output the region list as JSON instead of a table]' \
|
|
1905
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1721
1906
|
}
|
|
1722
1907
|
|
|
1723
1908
|
_postman_sdk() {
|
|
@@ -1872,226 +2057,495 @@ _postman_sdk_connections_delete() {
|
|
|
1872
2057
|
'*:connectionId:'
|
|
1873
2058
|
}
|
|
1874
2059
|
|
|
1875
|
-
|
|
2060
|
+
_postman_spec() {
|
|
1876
2061
|
local context state state_descr line
|
|
1877
2062
|
typeset -A opt_args
|
|
1878
2063
|
_arguments -C \
|
|
1879
2064
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1880
|
-
'1: :
|
|
2065
|
+
'1: :_postman_spec_commands' \
|
|
1881
2066
|
'*::arg:->args'
|
|
1882
2067
|
case $state in
|
|
1883
2068
|
args)
|
|
1884
2069
|
case $words[1] in
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
2070
|
+
lint) _postman_spec_lint ;;
|
|
2071
|
+
ai-readiness) _postman_spec_ai_readiness ;;
|
|
2072
|
+
list) _postman_spec_list ;;
|
|
2073
|
+
get) _postman_spec_get ;;
|
|
2074
|
+
file) _postman_spec_file ;;
|
|
2075
|
+
create) _postman_spec_create ;;
|
|
2076
|
+
generate) _postman_spec_generate ;;
|
|
2077
|
+
sync) _postman_spec_sync ;;
|
|
2078
|
+
delete) _postman_spec_delete ;;
|
|
2079
|
+
esac
|
|
2080
|
+
;;
|
|
2081
|
+
esac
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
_postman_spec_commands() {
|
|
2085
|
+
local -a sub
|
|
2086
|
+
sub=(
|
|
2087
|
+
'lint:Run linting on the given specification by ID or local file path.'
|
|
2088
|
+
'ai-readiness:Score an OpenAPI specification for AI readiness by ID or local file path.'
|
|
2089
|
+
'list:List local spec files under a path, or (no path) a workspace'\''s cloud specs.'
|
|
2090
|
+
'get:Read a spec definition, including every file of a multi-file spec.'
|
|
2091
|
+
'file:Get, add, update, or remove files in a spec (cloud ID or local directory).'
|
|
2092
|
+
'create:Create a new spec in a workspace, or (with path) scaffold a local spec file.'
|
|
2093
|
+
'generate:Generate artifacts from a specification.'
|
|
2094
|
+
'sync:Sync a generated collection with its source specification.'
|
|
2095
|
+
'delete:Delete a spec by its cloud ID or local file path. Cannot be undone.'
|
|
2096
|
+
)
|
|
2097
|
+
_describe -t commands 'spec command' sub
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
_postman_spec_lint() {
|
|
2101
|
+
_arguments \
|
|
2102
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Results of this level or above will trigger a failure exit code. \[choices\: "error", "warning", "info", "hint"\] (default\: "ERROR")]:value' \
|
|
2103
|
+
'--issueType[Limit linting to a specific issue type. \[choices\: "syntax"\]]:value' \
|
|
2104
|
+
'(-o --output)'{-o,--output}'[Output format for the results. \[choices\: "json", "csv"\]]:value' \
|
|
2105
|
+
'--workspace-id[The workspace ID to use for fetching governance rulesets.]:value' \
|
|
2106
|
+
'--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
|
|
2107
|
+
'--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
2108
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2109
|
+
'*:spec:'
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
_postman_spec_ai_readiness() {
|
|
2113
|
+
_arguments \
|
|
2114
|
+
'(-o --output)'{-o,--output}'[Output format for the results. \[choices\: "cli", "json", "html"\]]:value' \
|
|
2115
|
+
'--export[Write the report to this file instead of stdout. A directory receives the report under a name derived from the specification. Requires --output html.]:path:_files -g "*.json"' \
|
|
2116
|
+
'--min-score[Exit with a non-zero code if the overall score is below this threshold (0-100).]:n' \
|
|
2117
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2118
|
+
'*:spec:'
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
_postman_spec_list() {
|
|
2122
|
+
_arguments \
|
|
2123
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID (defaults to .postman/resources.yaml binding)]:id' \
|
|
2124
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2125
|
+
'--json[Output as JSON]' \
|
|
2126
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2127
|
+
'*:pathOrDir:_files -g "*.json"'
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
_postman_spec_get() {
|
|
2131
|
+
_arguments \
|
|
2132
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2133
|
+
'--json[Output as JSON (full spec definition)]' \
|
|
2134
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2135
|
+
'*:spec...:'
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
_postman_spec_file() {
|
|
2139
|
+
local context state state_descr line
|
|
2140
|
+
typeset -A opt_args
|
|
2141
|
+
_arguments -C \
|
|
2142
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2143
|
+
'1: :_postman_spec_file_commands' \
|
|
2144
|
+
'*::arg:->args'
|
|
2145
|
+
case $state in
|
|
2146
|
+
args)
|
|
2147
|
+
case $words[1] in
|
|
2148
|
+
get) _postman_spec_file_get ;;
|
|
2149
|
+
add) _postman_spec_file_add ;;
|
|
2150
|
+
update) _postman_spec_file_update ;;
|
|
2151
|
+
rm) _postman_spec_file_rm ;;
|
|
2152
|
+
esac
|
|
2153
|
+
;;
|
|
2154
|
+
esac
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
_postman_spec_file_commands() {
|
|
2158
|
+
local -a sub
|
|
2159
|
+
sub=(
|
|
2160
|
+
'get:Show a file in a spec\: its path, size and content.'
|
|
2161
|
+
'add:Add a new file to a spec.'
|
|
2162
|
+
'update:Update an existing file in a spec.'
|
|
2163
|
+
'rm:Remove a file from a spec.'
|
|
2164
|
+
)
|
|
2165
|
+
_describe -t commands 'file command' sub
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
_postman_spec_file_get() {
|
|
2169
|
+
_arguments \
|
|
2170
|
+
'--json[Output as JSON]' \
|
|
2171
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2172
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2173
|
+
'*:filePath:_files -g "*.json"'
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
_postman_spec_file_add() {
|
|
2177
|
+
_arguments \
|
|
2178
|
+
'(-c --content)'{-c,--content}'[File content (reads from stdin if omitted)]:content' \
|
|
2179
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2180
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2181
|
+
'*:filePath:_files -g "*.json"'
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
_postman_spec_file_update() {
|
|
2185
|
+
_arguments \
|
|
2186
|
+
'(-c --content)'{-c,--content}'[New file content (reads from stdin if omitted)]:content' \
|
|
2187
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2188
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2189
|
+
'*:filePath:_files -g "*.json"'
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
_postman_spec_file_rm() {
|
|
2193
|
+
_arguments \
|
|
2194
|
+
'(-y --yes)'{-y,--yes}'[Skip confirmation prompt]' \
|
|
2195
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2196
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2197
|
+
'*:filePath:_files -g "*.json"'
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
_postman_spec_create() {
|
|
2201
|
+
_arguments \
|
|
2202
|
+
'(-n --name)'{-n,--name}'[Specification name / title]:name' \
|
|
2203
|
+
'(-t --type)'{-t,--type}'[Spec type\: openapi, asyncapi, graphql, protobuf, smithy (default\: openapi) (default\: "openapi")]:type' \
|
|
2204
|
+
'--spec-version[Spec version (e.g. 3.1 for openapi, 3 for protobuf)]:ver' \
|
|
2205
|
+
'(-f --format)'{-f,--format}'[File format\: yaml or json (openapi/asyncapi only, default\: yaml) (default\: "yaml")]:fmt' \
|
|
2206
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID (cloud create, defaults to .postman/resources.yaml)]:id' \
|
|
2207
|
+
'--force[Overwrite an existing local file]' \
|
|
2208
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2209
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2210
|
+
'*:path:_files -g "*.json"'
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
_postman_spec_generate() {
|
|
2214
|
+
local context state state_descr line
|
|
2215
|
+
typeset -A opt_args
|
|
2216
|
+
_arguments -C \
|
|
2217
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2218
|
+
'1: :_postman_spec_generate_commands' \
|
|
2219
|
+
'*::arg:->args'
|
|
2220
|
+
case $state in
|
|
2221
|
+
args)
|
|
2222
|
+
case $words[1] in
|
|
2223
|
+
collection) _postman_spec_generate_collection ;;
|
|
2224
|
+
esac
|
|
2225
|
+
;;
|
|
2226
|
+
esac
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
_postman_spec_generate_commands() {
|
|
2230
|
+
local -a sub
|
|
2231
|
+
sub=(
|
|
2232
|
+
'collection:Generate a Postman collection from a specification.'
|
|
2233
|
+
)
|
|
2234
|
+
_describe -t commands 'generate command' sub
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
_postman_spec_generate_collection() {
|
|
2238
|
+
_arguments \
|
|
2239
|
+
'(-n --name)'{-n,--name}'[Collection name]:name' \
|
|
2240
|
+
'--folder-strategy[Folder strategy\: Paths or Tags (default\: Paths) (default\: "Paths")]:strategy' \
|
|
2241
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace ID (cloud mode)]:id' \
|
|
2242
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2243
|
+
'--force[Overwrite the collection if one with this name already exists (local mode)]' \
|
|
2244
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2245
|
+
'*:spec:'
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
_postman_spec_sync() {
|
|
2249
|
+
local context state state_descr line
|
|
2250
|
+
typeset -A opt_args
|
|
2251
|
+
_arguments -C \
|
|
2252
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2253
|
+
'1: :_postman_spec_sync_commands' \
|
|
2254
|
+
'*::arg:->args'
|
|
2255
|
+
case $state in
|
|
2256
|
+
args)
|
|
2257
|
+
case $words[1] in
|
|
2258
|
+
collection) _postman_spec_sync_collection ;;
|
|
2259
|
+
esac
|
|
2260
|
+
;;
|
|
2261
|
+
esac
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
_postman_spec_sync_commands() {
|
|
2265
|
+
local -a sub
|
|
2266
|
+
sub=(
|
|
2267
|
+
'collection:Sync a collection from a linked specification (local path or cloud UUID).'
|
|
2268
|
+
)
|
|
2269
|
+
_describe -t commands 'sync command' sub
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
_postman_spec_sync_collection() {
|
|
2273
|
+
_arguments \
|
|
2274
|
+
'--collection-id[Collection ID to sync (required for cloud mode)]:id' \
|
|
2275
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2276
|
+
'--force[Overwrite hand-written scripts that the spec would otherwise drop]' \
|
|
2277
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2278
|
+
'*:spec:'
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
_postman_spec_delete() {
|
|
2282
|
+
_arguments \
|
|
2283
|
+
'(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
|
|
2284
|
+
'--api-key[Postman API key, used with a cloud ID (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2285
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2286
|
+
'*:spec:'
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
_postman_workspace() {
|
|
2290
|
+
local context state state_descr line
|
|
2291
|
+
typeset -A opt_args
|
|
2292
|
+
_arguments -C \
|
|
2293
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2294
|
+
'1: :_postman_workspace_commands' \
|
|
2295
|
+
'*::arg:->args'
|
|
2296
|
+
case $state in
|
|
2297
|
+
args)
|
|
2298
|
+
case $words[1] in
|
|
2299
|
+
list) _postman_workspace_list ;;
|
|
2300
|
+
prepare) _postman_workspace_prepare ;;
|
|
2301
|
+
push) _postman_workspace_push ;;
|
|
2302
|
+
lint) _postman_workspace_lint ;;
|
|
2303
|
+
get) _postman_workspace_get ;;
|
|
2304
|
+
create) _postman_workspace_create ;;
|
|
2305
|
+
delete) _postman_workspace_delete ;;
|
|
2306
|
+
pull) _postman_workspace_pull ;;
|
|
2307
|
+
connect-git) _postman_workspace_connect_git ;;
|
|
2308
|
+
disconnect-git) _postman_workspace_disconnect_git ;;
|
|
2309
|
+
diff) _postman_workspace_diff ;;
|
|
1893
2310
|
esac
|
|
1894
2311
|
;;
|
|
1895
2312
|
esac
|
|
1896
2313
|
}
|
|
1897
2314
|
|
|
1898
|
-
|
|
2315
|
+
_postman_workspace_commands() {
|
|
1899
2316
|
local -a sub
|
|
1900
2317
|
sub=(
|
|
1901
|
-
'
|
|
1902
|
-
'
|
|
1903
|
-
'push:
|
|
1904
|
-
'
|
|
1905
|
-
'get:
|
|
1906
|
-
'
|
|
1907
|
-
'
|
|
1908
|
-
'
|
|
2318
|
+
'list:List all available Postman Workspaces'
|
|
2319
|
+
'prepare:Prepare local collections and environments for push by validating and regenerating IDs if needed.'
|
|
2320
|
+
'push:Push local workspace entities (collections, environments, specifications, mocks and more) to Postman workspace.'
|
|
2321
|
+
'lint:Lint the current local Postman workspace\: its configuration (.postman/resources.yaml) plus every discovered entity. Use --meta to lint only the configuration.'
|
|
2322
|
+
'get:Read a workspace'\''s metadata, and optionally the ids of what it holds.'
|
|
2323
|
+
'create:Create a Postman workspace and bind it to this git repository.'
|
|
2324
|
+
'delete:Permanently delete a workspace and everything in it. Prompts for confirmation unless --yes is passed.'
|
|
2325
|
+
'pull:Pull workspace entities from a Postman workspace into the local git-native folder.'
|
|
2326
|
+
'connect-git:Connect a Postman workspace to a local git repository.'
|
|
2327
|
+
'disconnect-git:Disconnect a Postman workspace from its local git repository.'
|
|
2328
|
+
'diff:Preview local-vs-cloud drift before pushing. Read-only\: nothing is created, updated or deleted.'
|
|
1909
2329
|
)
|
|
1910
|
-
_describe -t commands '
|
|
2330
|
+
_describe -t commands 'workspace command' sub
|
|
1911
2331
|
}
|
|
1912
2332
|
|
|
1913
|
-
|
|
2333
|
+
_postman_workspace_list() {
|
|
1914
2334
|
_arguments \
|
|
1915
|
-
'(-
|
|
1916
|
-
'(-
|
|
1917
|
-
'--
|
|
1918
|
-
'--
|
|
1919
|
-
'
|
|
1920
|
-
'
|
|
1921
|
-
'--
|
|
1922
|
-
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Always exit with code 0, even on failure]' \
|
|
1923
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1924
|
-
'*:sourcePath:'
|
|
2335
|
+
'(-f --filter)'{-f,--filter}'[Filter workspaces by name.]:name' \
|
|
2336
|
+
'(-t --type)'{-t,--type}'[Filter workspaces by visibility type\: team, public, private, personal.]:type' \
|
|
2337
|
+
'--cursor[Fetch the page of workspaces that follows this cursor.]:cursor' \
|
|
2338
|
+
'--verbose[Verbose output]' \
|
|
2339
|
+
'--debug[Debug output]' \
|
|
2340
|
+
'--json[JSON output]' \
|
|
2341
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1925
2342
|
}
|
|
1926
2343
|
|
|
1927
|
-
|
|
2344
|
+
_postman_workspace_prepare() {
|
|
1928
2345
|
_arguments \
|
|
1929
|
-
'
|
|
1930
|
-
'
|
|
1931
|
-
'(-
|
|
1932
|
-
'--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1933
|
-
'(-w --workspace)'{-w,--workspace}'[Workspace that owns the run, for recording its start history. Auto-resolved for a Postman cloud id; required to record history for a path.]:id' \
|
|
1934
|
-
'--no-history[Do not record this run in the mock'\''s start history.]' \
|
|
1935
|
-
'--output[Live output format\: auto (default, human-readable logs) or ndjson (one JSON event per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
|
|
1936
|
-
'--dataset[Pass --dataset multiple times to load several .dataset.yaml files (or directories containing them). Each is made available to the mock'\''s handlers as pm.datasets(<id>). (default\: \[\])]:pathOrDir:_files -g "*.json"' \
|
|
1937
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1938
|
-
'*:mockIdOrPath:_files -g "*.json"'
|
|
2346
|
+
'--verbose[Show detailed logging]' \
|
|
2347
|
+
'--json[Print the outcome as machine-readable JSON.]' \
|
|
2348
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
1939
2349
|
}
|
|
1940
2350
|
|
|
1941
|
-
|
|
2351
|
+
_postman_workspace_push() {
|
|
1942
2352
|
_arguments \
|
|
1943
|
-
'
|
|
1944
|
-
'--
|
|
2353
|
+
'--no-prepare[Skip ID validation and auto-fix before pushing]' \
|
|
2354
|
+
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
|
|
2355
|
+
'--push-strategy[Push strategy. "force-sync"\: mirror the whole workspace — also DELETE cloud entities that have no local counterpart (destructive). Defaults to "default" (create/update only).]:strategy' \
|
|
2356
|
+
'--json[Print the outcome as machine-readable JSON. Implies non-interactive\: use --yes to actually push.]' \
|
|
2357
|
+
'--verbose[Show detailed logging]' \
|
|
2358
|
+
'--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
|
|
2359
|
+
'--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
2360
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
_postman_workspace_lint() {
|
|
2364
|
+
_arguments \
|
|
2365
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning", "info", "hint"\] (default\: "error")]:value' \
|
|
2366
|
+
'(-o --output)'{-o,--output}'[Output format\: cli (human-readable), table, or json. (default\: "cli")]:value' \
|
|
2367
|
+
'--meta[Only lint the workspace configuration (.postman/resources.yaml); skip per-entity linting.]' \
|
|
2368
|
+
'--workspace-id[The workspace ID to use for fetching governance rulesets. Defaults to the id in .postman/resources.yaml.]:value' \
|
|
2369
|
+
'--fix[Apply safe autofixes to repairable workspace lint issues.]' \
|
|
2370
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
_postman_workspace_get() {
|
|
2374
|
+
_arguments \
|
|
2375
|
+
'--elements[Also report the resources the workspace holds.]' \
|
|
2376
|
+
'--json[Print the workspace as machine-readable JSON.]' \
|
|
2377
|
+
'--timeout[Milliseconds to wait for the API (default 30000).]:ms' \
|
|
1945
2378
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1946
|
-
'*:
|
|
2379
|
+
'*:id:'
|
|
1947
2380
|
}
|
|
1948
2381
|
|
|
1949
|
-
|
|
2382
|
+
_postman_workspace_create() {
|
|
1950
2383
|
_arguments \
|
|
1951
|
-
'
|
|
1952
|
-
'
|
|
1953
|
-
'
|
|
1954
|
-
'--
|
|
1955
|
-
'--
|
|
1956
|
-
'
|
|
1957
|
-
'--
|
|
2384
|
+
'--visibility[Required. One of\: personal, private, team, public, partner.]:status' \
|
|
2385
|
+
'--name[Workspace name (defaults to owner/repo from the git remote)]:name' \
|
|
2386
|
+
'--summary[Optional workspace summary]:text' \
|
|
2387
|
+
'--team-id[The team inside your organisation the workspace belongs to. Required for a team workspace when your organisation has teams inside it. Find it with `postman team list`.]:id' \
|
|
2388
|
+
'--team-role[What a team or public workspace grants\: view or edit. Applies to the team named by --team-id, or to your whole organisation when none is named. Defaults to your team'\''s configured default.]:level' \
|
|
2389
|
+
'--path[Directory to bind (defaults to the current directory)]:dir:_files -g "*.json"' \
|
|
2390
|
+
'--no-connect[Create the workspace without binding it to the repository]' \
|
|
2391
|
+
'--force[Create even when a workspace is already recorded for this repo]' \
|
|
2392
|
+
'--json[Print the created workspace as machine-readable JSON.]' \
|
|
2393
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
_postman_workspace_delete() {
|
|
2397
|
+
_arguments \
|
|
2398
|
+
'(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
|
|
2399
|
+
'--json[Print the outcome as machine-readable JSON]' \
|
|
2400
|
+
'--verbose[Show detailed logging]' \
|
|
2401
|
+
'--timeout[Abort the run after this many milliseconds. Defaults to 30000.]:ms' \
|
|
1958
2402
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1959
|
-
'*:
|
|
2403
|
+
'*:workspaceId:'
|
|
1960
2404
|
}
|
|
1961
2405
|
|
|
1962
|
-
|
|
2406
|
+
_postman_workspace_pull() {
|
|
1963
2407
|
_arguments \
|
|
1964
|
-
'--
|
|
1965
|
-
'--
|
|
2408
|
+
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
|
|
2409
|
+
'--source-workspace[Pull from a different source workspace.]:workspaceId' \
|
|
2410
|
+
'--json[Print the outcome as machine-readable JSON. Implies non-interactive\: use --yes to actually pull.]' \
|
|
2411
|
+
'--verbose[Show detailed logging]' \
|
|
1966
2412
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1967
|
-
'*:
|
|
2413
|
+
'*:workspaceId:'
|
|
1968
2414
|
}
|
|
1969
2415
|
|
|
1970
|
-
|
|
2416
|
+
_postman_workspace_connect_git() {
|
|
1971
2417
|
_arguments \
|
|
1972
|
-
'
|
|
1973
|
-
'--
|
|
1974
|
-
'--json[Print the list as machine-readable data instead of a table]' \
|
|
2418
|
+
'--verbose[Show detailed logging]' \
|
|
2419
|
+
'--json[Print the outcome as machine-readable JSON.]' \
|
|
1975
2420
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1976
|
-
'*:
|
|
2421
|
+
'*:path:_files -g "*.json"'
|
|
1977
2422
|
}
|
|
1978
2423
|
|
|
1979
|
-
|
|
2424
|
+
_postman_workspace_disconnect_git() {
|
|
1980
2425
|
_arguments \
|
|
1981
|
-
'--
|
|
1982
|
-
'--
|
|
1983
|
-
'--
|
|
1984
|
-
'--path[Show only requests to matching addresses (use * and ? as wildcards, e.g. /users/*)]:pattern' \
|
|
1985
|
-
'--since[Show entries from this long ago until now (e.g. 2h = the last 2 hours)]:duration' \
|
|
1986
|
-
'--until[Hide entries newer than this (e.g. 30m = skip the most recent 30 minutes)]:duration' \
|
|
1987
|
-
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1988
|
-
'--json[Print entries as machine-readable data instead of the scrollable view]' \
|
|
2426
|
+
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
|
|
2427
|
+
'--verbose[Show detailed logging]' \
|
|
2428
|
+
'--json[Print the outcome as machine-readable JSON. Requires --yes to actually disconnect.]' \
|
|
1989
2429
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1990
|
-
'*:
|
|
2430
|
+
'*:workspaceId:'
|
|
1991
2431
|
}
|
|
1992
2432
|
|
|
1993
|
-
|
|
2433
|
+
_postman_workspace_diff() {
|
|
1994
2434
|
_arguments \
|
|
1995
|
-
'
|
|
1996
|
-
'--
|
|
2435
|
+
'--push-strategy[Strategy to preview. "force-sync" also shows cloud entities that would be DELETED. Defaults to "force-sync".]:strategy' \
|
|
2436
|
+
'--summary[Skip content comparison. Faster, but updates are listed without checking whether they changed.]' \
|
|
2437
|
+
'--json[Print the diff as machine-readable JSON.]' \
|
|
2438
|
+
'--exit-code[Exit with code 1 when a verified difference is found (for CI gates). Entity types with no comparison path are reported but do not fail the gate.]' \
|
|
2439
|
+
'--verbose[Show detailed logging]' \
|
|
2440
|
+
'--timeout[Abort the run after this many milliseconds. Defaults to 120000.]:ms' \
|
|
1997
2441
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1998
|
-
'*:
|
|
2442
|
+
'*:workspaceId:'
|
|
1999
2443
|
}
|
|
2000
2444
|
|
|
2001
|
-
|
|
2445
|
+
_postman_context_graph() {
|
|
2002
2446
|
local context state state_descr line
|
|
2003
2447
|
typeset -A opt_args
|
|
2004
2448
|
_arguments -C \
|
|
2005
2449
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2006
|
-
'1: :
|
|
2450
|
+
'1: :_postman_context_graph_commands' \
|
|
2007
2451
|
'*::arg:->args'
|
|
2008
2452
|
case $state in
|
|
2009
2453
|
args)
|
|
2010
2454
|
case $words[1] in
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2455
|
+
ask) _postman_context_graph_ask ;;
|
|
2456
|
+
status) _postman_context_graph_status ;;
|
|
2457
|
+
ingest) _postman_context_graph_ingest ;;
|
|
2014
2458
|
esac
|
|
2015
2459
|
;;
|
|
2016
2460
|
esac
|
|
2017
2461
|
}
|
|
2018
2462
|
|
|
2019
|
-
|
|
2463
|
+
_postman_context_graph_commands() {
|
|
2020
2464
|
local -a sub
|
|
2021
2465
|
sub=(
|
|
2022
|
-
'
|
|
2023
|
-
'
|
|
2024
|
-
'
|
|
2466
|
+
'ask:Ask a natural-language question about your team'\''s Context Graph.'
|
|
2467
|
+
'status:Check an ask submitted by `ask`, without blocking. Prints the answer when ready.'
|
|
2468
|
+
'ingest:Onboard repos and workspaces into your team'\''s Context Graph, and check ingestion progress.'
|
|
2025
2469
|
)
|
|
2026
|
-
_describe -t commands '
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
_postman_application_init() {
|
|
2030
|
-
_arguments \
|
|
2031
|
-
'--target-collection[Collection name or path for the default target (repeatable) (default\: \[\])]:name' \
|
|
2032
|
-
'--target-environment[Environment name or path for the default target (last value wins) (default\: \[\])]:name' \
|
|
2033
|
-
'--filter-urlpatterns[Comma-separated URL patterns to exclude from captured traffic (default\: \[\])]:patterns' \
|
|
2034
|
-
'--filter-methods[Comma-separated HTTP methods to exclude from captured traffic (default\: \[\])]:methods' \
|
|
2035
|
-
'--filter-headers[Comma-separated request header filters in header=value form (default\: \[\])]:headers' \
|
|
2036
|
-
'--command[Command to run your tests (e.g. "npx playwright test")]:cmd' \
|
|
2037
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2470
|
+
_describe -t commands 'context-graph command' sub
|
|
2038
2471
|
}
|
|
2039
2472
|
|
|
2040
|
-
|
|
2473
|
+
_postman_context_graph_ask() {
|
|
2041
2474
|
_arguments \
|
|
2042
|
-
'--
|
|
2043
|
-
'--
|
|
2044
|
-
'--
|
|
2045
|
-
'--
|
|
2046
|
-
'--
|
|
2047
|
-
'--
|
|
2048
|
-
'--
|
|
2049
|
-
'--
|
|
2050
|
-
'
|
|
2051
|
-
'--report-events[Send application test run results to Postman (default\: true)]:boolean' \
|
|
2052
|
-
'--no-report-events[Do not send run results or analytics to Postman]' \
|
|
2053
|
-
'--verbose[Show detailed per-request matching, sandbox errors, and debug information]' \
|
|
2054
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2475
|
+
'--wait[Block until the answer arrives, then print it]' \
|
|
2476
|
+
'--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2477
|
+
'--json[Output the ask record as JSON]' \
|
|
2478
|
+
'--no-include-answer[Do not ask the service to include the answer inline]' \
|
|
2479
|
+
'--max-steps[Cap the reasoning steps the service may take (its default applies when omitted)]:count' \
|
|
2480
|
+
'--interval[With --wait, seconds between polls (default\: 2)]:seconds' \
|
|
2481
|
+
'--timeout[With --wait, seconds to wait before giving up (default\: 300)]:seconds' \
|
|
2482
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2483
|
+
'*:query:'
|
|
2055
2484
|
}
|
|
2056
2485
|
|
|
2057
|
-
|
|
2486
|
+
_postman_context_graph_status() {
|
|
2058
2487
|
_arguments \
|
|
2059
|
-
'--
|
|
2060
|
-
'
|
|
2488
|
+
'--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2489
|
+
'--json[Output the ask record as JSON]' \
|
|
2490
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2491
|
+
'*:askId:'
|
|
2061
2492
|
}
|
|
2062
2493
|
|
|
2063
|
-
|
|
2494
|
+
_postman_context_graph_ingest() {
|
|
2064
2495
|
local context state state_descr line
|
|
2065
2496
|
typeset -A opt_args
|
|
2066
2497
|
_arguments -C \
|
|
2067
2498
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2068
|
-
'1: :
|
|
2499
|
+
'1: :_postman_context_graph_ingest_commands' \
|
|
2069
2500
|
'*::arg:->args'
|
|
2070
2501
|
case $state in
|
|
2071
2502
|
args)
|
|
2072
2503
|
case $words[1] in
|
|
2073
|
-
|
|
2504
|
+
git) _postman_context_graph_ingest_git ;;
|
|
2505
|
+
workspaces) _postman_context_graph_ingest_workspaces ;;
|
|
2506
|
+
status) _postman_context_graph_ingest_status ;;
|
|
2074
2507
|
esac
|
|
2075
2508
|
;;
|
|
2076
2509
|
esac
|
|
2077
2510
|
}
|
|
2078
2511
|
|
|
2079
|
-
|
|
2512
|
+
_postman_context_graph_ingest_commands() {
|
|
2080
2513
|
local -a sub
|
|
2081
2514
|
sub=(
|
|
2082
|
-
'
|
|
2515
|
+
'git:Onboard GitHub repos into your team'\''s Context Graph.'
|
|
2516
|
+
'workspaces:Onboard Postman workspaces into your team'\''s Context Graph.'
|
|
2517
|
+
'status:Check ingestion progress for the team, or for one source.'
|
|
2083
2518
|
)
|
|
2084
|
-
_describe -t commands '
|
|
2519
|
+
_describe -t commands 'ingest command' sub
|
|
2085
2520
|
}
|
|
2086
2521
|
|
|
2087
|
-
|
|
2522
|
+
_postman_context_graph_ingest_git() {
|
|
2088
2523
|
_arguments \
|
|
2089
|
-
'
|
|
2090
|
-
'--
|
|
2091
|
-
'--
|
|
2092
|
-
'--
|
|
2524
|
+
'--all-git-linked-workspaces[Also onboard the repo linked to every git-linked workspace in the team]' \
|
|
2525
|
+
'--tag[With --all-git-linked-workspaces, only workspaces with this tag. Repeatable, up to 5; all must match]:tag' \
|
|
2526
|
+
'--ttl[Override the service'\''s default TTL, in seconds]:seconds' \
|
|
2527
|
+
'--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2528
|
+
'--json[Output the onboarding response as JSON]' \
|
|
2093
2529
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2094
|
-
'*:
|
|
2530
|
+
'*:repoUrls...:'
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
_postman_context_graph_ingest_workspaces() {
|
|
2534
|
+
_arguments \
|
|
2535
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace to onboard. Repeatable. Omit to onboard the team'\''s git-linked workspaces]:id' \
|
|
2536
|
+
'--top[Cap how many workspaces this call onboards]:n' \
|
|
2537
|
+
'--ttl[Override the service'\''s default TTL, in seconds]:seconds' \
|
|
2538
|
+
'--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2539
|
+
'--json[Output the onboarding response as JSON]' \
|
|
2540
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
_postman_context_graph_ingest_status() {
|
|
2544
|
+
_arguments \
|
|
2545
|
+
'--source[Show one source'\''s jobs, by the source id `ingest git` or `ingest workspaces` printed]:sourceId' \
|
|
2546
|
+
'--api-key[Postman API key (falls back to POSTMAN_API_KEY, then a `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2547
|
+
'--json[Output the service response as JSON]' \
|
|
2548
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2095
2549
|
}
|
|
2096
2550
|
|
|
2097
2551
|
_postman_describe() {
|
|
@@ -2295,85 +2749,51 @@ _postman_describe_workspace_commands() {
|
|
|
2295
2749
|
|
|
2296
2750
|
_postman_describe_workspace_get() {
|
|
2297
2751
|
_arguments \
|
|
2298
|
-
'(-w --workspace-id)'{-w,--workspace-id}'[Workspace ID]:id' \
|
|
2299
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2300
|
-
}
|
|
2301
|
-
|
|
2302
|
-
_postman_describe_environment() {
|
|
2303
|
-
local context state state_descr line
|
|
2304
|
-
typeset -A opt_args
|
|
2305
|
-
_arguments -C \
|
|
2306
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2307
|
-
'1: :_postman_describe_environment_commands' \
|
|
2308
|
-
'*::arg:->args'
|
|
2309
|
-
case $state in
|
|
2310
|
-
args)
|
|
2311
|
-
case $words[1] in
|
|
2312
|
-
get) _postman_describe_environment_get ;;
|
|
2313
|
-
esac
|
|
2314
|
-
;;
|
|
2315
|
-
esac
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
_postman_describe_environment_commands() {
|
|
2319
|
-
local -a sub
|
|
2320
|
-
sub=(
|
|
2321
|
-
'get:Get a single environment by ID'
|
|
2322
|
-
)
|
|
2323
|
-
_describe -t commands 'environment command' sub
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
_postman_describe_environment_get() {
|
|
2327
|
-
_arguments \
|
|
2328
|
-
'(-e --environment-id)'{-e,--environment-id}'[Environment ID]:id' \
|
|
2752
|
+
'(-w --workspace-id)'{-w,--workspace-id}'[Workspace ID]:id' \
|
|
2329
2753
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2330
2754
|
}
|
|
2331
2755
|
|
|
2332
|
-
|
|
2756
|
+
_postman_describe_environment() {
|
|
2333
2757
|
local context state state_descr line
|
|
2334
2758
|
typeset -A opt_args
|
|
2335
2759
|
_arguments -C \
|
|
2336
2760
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2337
|
-
'1: :
|
|
2761
|
+
'1: :_postman_describe_environment_commands' \
|
|
2338
2762
|
'*::arg:->args'
|
|
2339
2763
|
case $state in
|
|
2340
2764
|
args)
|
|
2341
2765
|
case $words[1] in
|
|
2342
|
-
|
|
2343
|
-
status) _postman_context_graph_status ;;
|
|
2766
|
+
get) _postman_describe_environment_get ;;
|
|
2344
2767
|
esac
|
|
2345
2768
|
;;
|
|
2346
2769
|
esac
|
|
2347
2770
|
}
|
|
2348
2771
|
|
|
2349
|
-
|
|
2772
|
+
_postman_describe_environment_commands() {
|
|
2350
2773
|
local -a sub
|
|
2351
2774
|
sub=(
|
|
2352
|
-
'
|
|
2353
|
-
'status:Check an ask submitted by `ask`, without blocking. Prints the answer when ready.'
|
|
2775
|
+
'get:Get a single environment by ID'
|
|
2354
2776
|
)
|
|
2355
|
-
_describe -t commands '
|
|
2777
|
+
_describe -t commands 'environment command' sub
|
|
2356
2778
|
}
|
|
2357
2779
|
|
|
2358
|
-
|
|
2780
|
+
_postman_describe_environment_get() {
|
|
2359
2781
|
_arguments \
|
|
2360
|
-
'--
|
|
2361
|
-
'--
|
|
2362
|
-
'--json[Output the ask record as JSON]' \
|
|
2363
|
-
'--no-include-answer[Do not ask the service to include the answer inline]' \
|
|
2364
|
-
'--max-steps[Cap the reasoning steps the service may take (its default applies when omitted)]:count' \
|
|
2365
|
-
'--interval[With --wait, seconds between polls (default\: 2)]:seconds' \
|
|
2366
|
-
'--timeout[With --wait, seconds to wait before giving up (default\: 300)]:seconds' \
|
|
2367
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2368
|
-
'*:query:'
|
|
2782
|
+
'(-e --environment-id)'{-e,--environment-id}'[Environment ID]:id' \
|
|
2783
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2369
2784
|
}
|
|
2370
2785
|
|
|
2371
|
-
|
|
2786
|
+
_postman_init() {
|
|
2372
2787
|
_arguments \
|
|
2373
|
-
'--
|
|
2374
|
-
'--
|
|
2788
|
+
'--json[Emit machine-readable output for agents]' \
|
|
2789
|
+
'--dry-run[Report what would happen without writing anything]' \
|
|
2790
|
+
'--no-fetch[Use the skills bundled with this CLI instead of fetching the latest]' \
|
|
2791
|
+
'--spec[Which spec is authoritative, when more than one could be]:path:_files -g "*.(yaml|yml|json)"' \
|
|
2792
|
+
'--visibility[Create and bind a workspace non-interactively (personal, team)]:status' \
|
|
2793
|
+
'(-y --yes)'{-y,--yes}'[Accept the default for every question instead of asking or stopping]' \
|
|
2794
|
+
'--report-events[Dispatch init events to the API Catalog and Application Inventory ingestion pipelines (requires login)]' \
|
|
2375
2795
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2376
|
-
'*:
|
|
2796
|
+
'*:path:_files -g "*.json"'
|
|
2377
2797
|
}
|
|
2378
2798
|
|
|
2379
2799
|
_postman_search() {
|
|
@@ -2468,616 +2888,722 @@ _postman_search_documents() {
|
|
|
2468
2888
|
'*:query:'
|
|
2469
2889
|
}
|
|
2470
2890
|
|
|
2471
|
-
|
|
2891
|
+
_postman_skills() {
|
|
2472
2892
|
local context state state_descr line
|
|
2473
2893
|
typeset -A opt_args
|
|
2474
2894
|
_arguments -C \
|
|
2475
2895
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2476
|
-
'1: :
|
|
2896
|
+
'1: :_postman_skills_commands' \
|
|
2477
2897
|
'*::arg:->args'
|
|
2478
2898
|
case $state in
|
|
2479
2899
|
args)
|
|
2480
2900
|
case $words[1] in
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
pause) _postman_webhook_pause ;;
|
|
2484
|
-
list) _postman_webhook_list ;;
|
|
2485
|
-
delete) _postman_webhook_delete ;;
|
|
2486
|
-
status) _postman_webhook_status ;;
|
|
2487
|
-
requests) _postman_webhook_requests ;;
|
|
2488
|
-
scripts) _postman_webhook_scripts ;;
|
|
2489
|
-
forward) _postman_webhook_forward ;;
|
|
2901
|
+
status) _postman_skills_status ;;
|
|
2902
|
+
update) _postman_skills_update ;;
|
|
2490
2903
|
esac
|
|
2491
2904
|
;;
|
|
2492
2905
|
esac
|
|
2493
2906
|
}
|
|
2494
2907
|
|
|
2495
|
-
|
|
2908
|
+
_postman_skills_commands() {
|
|
2496
2909
|
local -a sub
|
|
2497
2910
|
sub=(
|
|
2498
|
-
'
|
|
2499
|
-
'
|
|
2500
|
-
'pause:Pause a webhook so it no longer accepts requests.'
|
|
2501
|
-
'list:List all webhooks in a workspace.'
|
|
2502
|
-
'delete:Permanently delete a webhook.'
|
|
2503
|
-
'status:Show details for a webhook.'
|
|
2504
|
-
'requests:List, inspect, and replay requests received by a webhook.'
|
|
2505
|
-
'scripts:Create or update scripts executed by a webhook.'
|
|
2506
|
-
'forward:Forward incoming webhook requests to a local port.'
|
|
2911
|
+
'status:Report whether this repository'\''s skills are up to date.'
|
|
2912
|
+
'update:Fetch the latest skills into this repository.'
|
|
2507
2913
|
)
|
|
2508
|
-
_describe -t commands '
|
|
2914
|
+
_describe -t commands 'skills command' sub
|
|
2509
2915
|
}
|
|
2510
2916
|
|
|
2511
|
-
|
|
2917
|
+
_postman_skills_status() {
|
|
2512
2918
|
_arguments \
|
|
2513
|
-
'
|
|
2514
|
-
'
|
|
2515
|
-
'--
|
|
2919
|
+
'--json[Emit machine-readable output for agents]' \
|
|
2920
|
+
'--strict[Exit non-zero when the skills are not current]' \
|
|
2921
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2922
|
+
'*:path:_files -g "*.json"'
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
_postman_skills_update() {
|
|
2926
|
+
_arguments \
|
|
2927
|
+
'--json[Emit machine-readable output for agents]' \
|
|
2928
|
+
'--dry-run[Report what would change without writing anything]' \
|
|
2929
|
+
'--force[Overwrite skill files that were edited locally]' \
|
|
2930
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2931
|
+
'*:path:_files -g "*.json"'
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
_postman_login() {
|
|
2935
|
+
_arguments \
|
|
2936
|
+
'--alias[Specify the alias of the API key to fetch your resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
|
|
2937
|
+
'--with-api-key[Specify the API key directly.]:apikey' \
|
|
2938
|
+
'--region[Specify the region for authentication. Use "eu" for EU region.]:region:(us eu)' \
|
|
2939
|
+
'--verbose[Show detailed error information]' \
|
|
2516
2940
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2517
2941
|
}
|
|
2518
2942
|
|
|
2519
|
-
|
|
2943
|
+
_postman_logout() {
|
|
2520
2944
|
_arguments \
|
|
2521
|
-
'
|
|
2522
|
-
'--
|
|
2945
|
+
'--alias[Specify the alias of the API key to fetch your resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
|
|
2946
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
_postman_signup() {
|
|
2950
|
+
_arguments \
|
|
2951
|
+
'--guest[Start working as an anonymous guest instead of signing up — no account or browser needed, so it works anywhere. Your work is saved to a temporary workspace you can keep later by running `postman signup`.]' \
|
|
2952
|
+
'--json[Print the sign-up details as machine-readable JSON.]' \
|
|
2953
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
_postman_whoami() {
|
|
2957
|
+
_arguments \
|
|
2958
|
+
'--json[Print current identity as machine-readable JSON.]' \
|
|
2959
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
_postman_application() {
|
|
2963
|
+
local context state state_descr line
|
|
2964
|
+
typeset -A opt_args
|
|
2965
|
+
_arguments -C \
|
|
2523
2966
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2524
|
-
'
|
|
2967
|
+
'1: :_postman_application_commands' \
|
|
2968
|
+
'*::arg:->args'
|
|
2969
|
+
case $state in
|
|
2970
|
+
args)
|
|
2971
|
+
case $words[1] in
|
|
2972
|
+
init) _postman_application_init ;;
|
|
2973
|
+
test) _postman_application_test ;;
|
|
2974
|
+
setup-capture) _postman_application_setup_capture ;;
|
|
2975
|
+
esac
|
|
2976
|
+
;;
|
|
2977
|
+
esac
|
|
2525
2978
|
}
|
|
2526
2979
|
|
|
2527
|
-
|
|
2980
|
+
_postman_application_commands() {
|
|
2981
|
+
local -a sub
|
|
2982
|
+
sub=(
|
|
2983
|
+
'init:\[DEPRECATED\] Use `postman app test` instead. Initialise a postman.config.cjs file with target collections, environment, and test command.'
|
|
2984
|
+
'test:Run a command first (primary task), then match captured traffic against Postman collections and run assertions.'
|
|
2985
|
+
'setup-capture:Install postman-playwright and patch playwright.config.* to capture network traffic automatically via withPostman().'
|
|
2986
|
+
)
|
|
2987
|
+
_describe -t commands 'application command' sub
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
_postman_application_init() {
|
|
2528
2991
|
_arguments \
|
|
2529
|
-
'
|
|
2530
|
-
'--
|
|
2992
|
+
'--target-collection[Collection name or path for the default target (repeatable) (default\: \[\])]:name' \
|
|
2993
|
+
'--target-environment[Environment name or path for the default target (last value wins) (default\: \[\])]:name' \
|
|
2994
|
+
'--filter-urlpatterns[Comma-separated URL patterns to exclude from captured traffic (default\: \[\])]:patterns' \
|
|
2995
|
+
'--filter-methods[Comma-separated HTTP methods to exclude from captured traffic (default\: \[\])]:methods' \
|
|
2996
|
+
'--filter-headers[Comma-separated request header filters in header=value form (default\: \[\])]:headers' \
|
|
2997
|
+
'--command[Command to run your tests (e.g. "npx playwright test")]:cmd' \
|
|
2998
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
_postman_application_test() {
|
|
3002
|
+
_arguments \
|
|
3003
|
+
'--target[Select a target from postman.config.js targets block (default\: "default")]:name' \
|
|
3004
|
+
'--target-collection[Collection override for the selected target (repeatable) (default\: \[\])]:path:_files -g "*.json"' \
|
|
3005
|
+
'--target-environment[Environment override for the selected target (last value wins) (default\: \[\])]:path:_files -g "*.json"' \
|
|
3006
|
+
'--command[Command to run first (primary task). Overrides config.]:cmd' \
|
|
3007
|
+
'--deployed-version[Version identity of the application under test (e.g. a build ID, release tag, or version string). Also read from the APP_DEPLOYED_VERSION environment variable.]:version' \
|
|
3008
|
+
'--network-log[Directory to scan for captured artifacts, or a direct path to a Playwright JSON report / NDJSON capture file. When a directory is given, recursively discovers `*.json` Playwright reports plus their `trace.zip` attachments, and `network-capture-*.ndjson` at the top level. By default, scans Playwright config `outputDir`, test-results/, then pm-results/.]:path:_files -g "*.json"' \
|
|
3009
|
+
'--capture-only[Skip collection matching and tests; capture traffic and save a V3 collection organised by host]' \
|
|
3010
|
+
'--output[Output directory for captured collection (default\: pm-results/captured/; used with --capture-only)]:path:_files -g "*.json"' \
|
|
3011
|
+
'--force[Deprecated\: output directory is always overwritten on re-run (used with --capture-only)]' \
|
|
3012
|
+
'--report-events[Dispatch application test run results to the API Catalog and Application Inventory ingestion pipelines (on by default) (default\: true)]:boolean' \
|
|
3013
|
+
'--no-report-events[Do not dispatch run results to the API Catalog and Application Inventory ingestion pipelines]' \
|
|
3014
|
+
'--verbose[Show detailed per-request matching, sandbox errors, and debug information]' \
|
|
3015
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
_postman_application_setup_capture() {
|
|
3019
|
+
_arguments \
|
|
3020
|
+
'--config[Path to playwright.config.* to patch (default\: auto-detect)]:path:_files -g "*.json"' \
|
|
3021
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
_postman_dependency() {
|
|
3025
|
+
local context state state_descr line
|
|
3026
|
+
typeset -A opt_args
|
|
3027
|
+
_arguments -C \
|
|
2531
3028
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2532
|
-
'
|
|
3029
|
+
'1: :_postman_dependency_commands' \
|
|
3030
|
+
'*::arg:->args'
|
|
3031
|
+
case $state in
|
|
3032
|
+
args)
|
|
3033
|
+
case $words[1] in
|
|
3034
|
+
add) _postman_dependency_add ;;
|
|
3035
|
+
get) _postman_dependency_get ;;
|
|
3036
|
+
list) _postman_dependency_list ;;
|
|
3037
|
+
install) _postman_dependency_install ;;
|
|
3038
|
+
update) _postman_dependency_update ;;
|
|
3039
|
+
remove) _postman_dependency_remove ;;
|
|
3040
|
+
esac
|
|
3041
|
+
;;
|
|
3042
|
+
esac
|
|
2533
3043
|
}
|
|
2534
3044
|
|
|
2535
|
-
|
|
3045
|
+
_postman_dependency_commands() {
|
|
3046
|
+
local -a sub
|
|
3047
|
+
sub=(
|
|
3048
|
+
'add:Add a Postman collection, environment, or mock as a workspace dependency.'
|
|
3049
|
+
'get:Show a declared workspace dependency from .postman/resources.yaml.'
|
|
3050
|
+
'list:List the workspace dependencies declared in .postman/resources.yaml.'
|
|
3051
|
+
'install:Materialise the dependencies declared in .postman/resources.yaml (all, or one).'
|
|
3052
|
+
'update:Refresh declared dependencies to the latest content from their source (all, or one).'
|
|
3053
|
+
'remove:Remove a workspace dependency and delete its local files.'
|
|
3054
|
+
)
|
|
3055
|
+
_describe -t commands 'dependency command' sub
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
_postman_dependency_add() {
|
|
2536
3059
|
_arguments \
|
|
2537
|
-
'(-w --workspace)'{-w,--workspace}'[
|
|
2538
|
-
'--
|
|
3060
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace id to resolve a name in (defaults to the current workspace).]:id' \
|
|
3061
|
+
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts.]' \
|
|
3062
|
+
'--json[Output the result as JSON.]' \
|
|
3063
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3064
|
+
'*:nameOrId:'
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
_postman_dependency_get() {
|
|
3068
|
+
_arguments \
|
|
3069
|
+
'--type[Only match dependencies of this type (collection, environment, or mock).]:type' \
|
|
3070
|
+
'--json[Output the result as JSON.]' \
|
|
3071
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3072
|
+
'*:nameOrId:'
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
_postman_dependency_list() {
|
|
3076
|
+
_arguments \
|
|
3077
|
+
'--type[Only list dependencies of this type (collection, environment, or mock).]:type' \
|
|
3078
|
+
'--json[Output the result as JSON.]' \
|
|
2539
3079
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2540
3080
|
}
|
|
2541
3081
|
|
|
2542
|
-
|
|
3082
|
+
_postman_dependency_install() {
|
|
2543
3083
|
_arguments \
|
|
2544
|
-
'
|
|
2545
|
-
'--
|
|
3084
|
+
'--type[Only install dependencies of this type (collection, environment, or mock).]:type' \
|
|
3085
|
+
'--json[Output the result as JSON.]' \
|
|
2546
3086
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2547
|
-
'*:
|
|
3087
|
+
'*:nameOrId:'
|
|
2548
3088
|
}
|
|
2549
3089
|
|
|
2550
|
-
|
|
3090
|
+
_postman_dependency_update() {
|
|
2551
3091
|
_arguments \
|
|
2552
|
-
'
|
|
2553
|
-
'--
|
|
3092
|
+
'--type[Only update dependencies of this type (collection, environment, or mock).]:type' \
|
|
3093
|
+
'--json[Output the result as JSON.]' \
|
|
3094
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3095
|
+
'*:nameOrId:'
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
_postman_dependency_remove() {
|
|
3099
|
+
_arguments \
|
|
3100
|
+
'--type[Only match dependencies of this type (collection, environment, or mock).]:type' \
|
|
3101
|
+
'(-y --yes)'{-y,--yes}'[Skip the confirmation prompt (required outside an interactive terminal).]' \
|
|
3102
|
+
'--json[Output the result as JSON.]' \
|
|
3103
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3104
|
+
'*:nameOrId:'
|
|
3105
|
+
}
|
|
3106
|
+
|
|
3107
|
+
_postman_feedback() {
|
|
3108
|
+
_arguments \
|
|
3109
|
+
'--type[Feedback type\: cli_gap, improvement_suggestion, bug_report, feature_request, general (default\: general)]:type' \
|
|
3110
|
+
'--context[Command or feature context this feedback is about]:context' \
|
|
3111
|
+
'--json[Print result as machine-readable JSON]' \
|
|
2554
3112
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2555
|
-
'*:
|
|
3113
|
+
'*:text:'
|
|
2556
3114
|
}
|
|
2557
3115
|
|
|
2558
|
-
|
|
3116
|
+
_postman_performance() {
|
|
2559
3117
|
local context state state_descr line
|
|
2560
3118
|
typeset -A opt_args
|
|
2561
3119
|
_arguments -C \
|
|
2562
3120
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2563
|
-
'1: :
|
|
3121
|
+
'1: :_postman_performance_commands' \
|
|
2564
3122
|
'*::arg:->args'
|
|
2565
3123
|
case $state in
|
|
2566
3124
|
args)
|
|
2567
3125
|
case $words[1] in
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
3126
|
+
run) _postman_performance_run ;;
|
|
3127
|
+
list) _postman_performance_list ;;
|
|
3128
|
+
get) _postman_performance_get ;;
|
|
2571
3129
|
esac
|
|
2572
3130
|
;;
|
|
2573
3131
|
esac
|
|
2574
3132
|
}
|
|
2575
3133
|
|
|
2576
|
-
|
|
3134
|
+
_postman_performance_commands() {
|
|
2577
3135
|
local -a sub
|
|
2578
3136
|
sub=(
|
|
2579
|
-
'
|
|
2580
|
-
'
|
|
2581
|
-
'
|
|
3137
|
+
'run:Run a performance test on a collection'
|
|
3138
|
+
'list:List past performance runs for a collection, newest first.'
|
|
3139
|
+
'get:Get one performance run by ID.'
|
|
2582
3140
|
)
|
|
2583
|
-
_describe -t commands '
|
|
3141
|
+
_describe -t commands 'performance command' sub
|
|
2584
3142
|
}
|
|
2585
3143
|
|
|
2586
|
-
|
|
3144
|
+
_postman_performance_run() {
|
|
2587
3145
|
_arguments \
|
|
2588
|
-
'(-
|
|
2589
|
-
'--
|
|
2590
|
-
'--
|
|
3146
|
+
'(-e --environment)'{-e,--environment}'[Specify an Id to a Postman Environment]:id' \
|
|
3147
|
+
'(-g --globals)'{-g,--globals}'[Specify an Id to a Postman Globals]:id' \
|
|
3148
|
+
'--setup-collection[Collection UID to run before the performance test]:id' \
|
|
3149
|
+
'--teardown-collection[Collection UID to run after the performance test]:id' \
|
|
3150
|
+
'--peak-vu[Peak (maximum) virtual users (default\: 20)]:count' \
|
|
3151
|
+
'--vu-count[Older name for --peak-vu]:count' \
|
|
3152
|
+
'--base-vu[Base (floor) virtual users the run starts from, 1 or more. Not for --load-profile fixed, which runs flat]:count' \
|
|
3153
|
+
'(-d --duration)'{-d,--duration}'[Duration of the performance test in minutes (default\: 1)]:minutes' \
|
|
3154
|
+
'(-p --load-profile)'{-p,--load-profile}'[Load profile type\: fixed, ramp-up, spike, peak (default\: "ramp-up")]:profile' \
|
|
3155
|
+
'(-s --load-segments)'{-s,--load-segments}'[Duration of each phase of the profile, comma separated, in order. ramp-up takes 2, spike 3, peak 4; fixed takes none. See the load-segment section below for which position is which phase]:durations' \
|
|
3156
|
+
'--data-file[Path to a JSON or CSV data file to use with the collection]:path:_files -g "*.json"' \
|
|
3157
|
+
'--ssl-client-cert-list[Path to a client certificates configuration file (JSON). Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
3158
|
+
'--ssl-client-cert[Path to a client certificate (PEM) for mTLS targets. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
3159
|
+
'--ssl-client-key[Path to the client certificate private key. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
3160
|
+
'--ssl-client-passphrase[Client certificate passphrase (for a protected key). Local runner only.]:passphrase' \
|
|
3161
|
+
'(-k --insecure)'{-k,--insecure}'[Disable SSL certificate verification for the target. Local runner only.]' \
|
|
3162
|
+
'--ssl-extra-ca-certs[Path to additionally trusted CA certificates (PEM) for the target. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
|
|
3163
|
+
'--dataset-id[Use a Postman Dataset as iteration data (with --dataset-view-id)]:id' \
|
|
3164
|
+
'--dataset-view-id[Dataset view to execute for iteration data (requires --dataset-id)]:id' \
|
|
3165
|
+
'--dataset-distribution[How rows map to VUs\: round-robin (default), fixed, random]:strategy' \
|
|
3166
|
+
'--postman-api-key[API Key used to load the resources from the Postman API (Only supported in the US region, use '\''postman login --region'\'' to authenticate instead)]:apiKey' \
|
|
3167
|
+
'--output[Output format for live results\: auto (default, interactive dashboard) or ndjson (one JSON object per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
|
|
3168
|
+
'--runner[Runner to execute the performance test on\: local, postman-cloud, or postman-cloud-static-ip (egress from your account region'\''s static-IP cluster) (default\: local)]:runner' \
|
|
3169
|
+
'--disable-unicode[Forces Unicode compliant symbols to be replaced by their plain text equivalents]' \
|
|
3170
|
+
'--pass-if[Pass condition in format\: function(metric, value) (repeatable; all conditions must hold). Functions\: less_than, greater_than, less_than_eq, greater_than_eq. Metrics\: avg, p90, p95, p99, error_rate, rps. Example\: less_than(p95, 500)]:condition' \
|
|
3171
|
+
'--use-mock[Redirect a variable/host to a local code mock or cloud Mock Server (repeatable). Format\: "<{{var}}|host> mock|mock-server\:<path|id> \[scenario\]" (default\: \[\])]:mapping' \
|
|
3172
|
+
'--dataset[Pass --dataset multiple times to load several .dataset.yaml files (or directories containing them). Each is made available to the handlers of the local mocks started by --use-mock as pm.datasets(<id>). Local runner only. (default\: \[\])]:pathOrDir:_files -g "*.json"' \
|
|
2591
3173
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2592
|
-
'*:
|
|
3174
|
+
'*:collectionId:_files -g "*.json"'
|
|
2593
3175
|
}
|
|
2594
3176
|
|
|
2595
|
-
|
|
3177
|
+
_postman_performance_list() {
|
|
2596
3178
|
_arguments \
|
|
2597
|
-
'(-
|
|
2598
|
-
'--
|
|
2599
|
-
'--
|
|
3179
|
+
'(-c --collection-id)'{-c,--collection-id}'[Collection ID whose performance runs to list]:id' \
|
|
3180
|
+
'--cursor[Pagination cursor from a previous page'\''s response]:token' \
|
|
3181
|
+
'--output[Output format\: table (default) or json (default\: "table")]:format' \
|
|
3182
|
+
'--json[Alias for --output json]' \
|
|
3183
|
+
'--timeout[Milliseconds to wait for the service before failing (default\: "30000")]:ms' \
|
|
2600
3184
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2601
|
-
'*:
|
|
3185
|
+
'*:id:'
|
|
2602
3186
|
}
|
|
2603
3187
|
|
|
2604
|
-
|
|
3188
|
+
_postman_performance_get() {
|
|
2605
3189
|
_arguments \
|
|
2606
|
-
'
|
|
2607
|
-
'--
|
|
3190
|
+
'--output[Output format\: table (default) or json (default\: "table")]:format' \
|
|
3191
|
+
'--json[Alias for --output json]' \
|
|
3192
|
+
'--timeout[Milliseconds to wait for the service before failing (default\: "30000")]:ms' \
|
|
2608
3193
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2609
|
-
'*:
|
|
3194
|
+
'*:runId:'
|
|
2610
3195
|
}
|
|
2611
3196
|
|
|
2612
|
-
|
|
3197
|
+
_postman_secret() {
|
|
2613
3198
|
local context state state_descr line
|
|
2614
3199
|
typeset -A opt_args
|
|
2615
3200
|
_arguments -C \
|
|
2616
3201
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2617
|
-
'1: :
|
|
3202
|
+
'1: :_postman_secret_commands' \
|
|
2618
3203
|
'*::arg:->args'
|
|
2619
3204
|
case $state in
|
|
2620
3205
|
args)
|
|
2621
3206
|
case $words[1] in
|
|
2622
|
-
|
|
3207
|
+
create) _postman_secret_create ;;
|
|
3208
|
+
list) _postman_secret_list ;;
|
|
2623
3209
|
esac
|
|
2624
3210
|
;;
|
|
2625
3211
|
esac
|
|
2626
3212
|
}
|
|
2627
3213
|
|
|
2628
|
-
|
|
3214
|
+
_postman_secret_commands() {
|
|
2629
3215
|
local -a sub
|
|
2630
3216
|
sub=(
|
|
2631
|
-
'
|
|
3217
|
+
'create:Create a secret in a team'\''s shared vault.'
|
|
3218
|
+
'list:List the secrets in a workspace'\''s shared vault\: key, secret id, vault id, and allowed domains.'
|
|
2632
3219
|
)
|
|
2633
|
-
_describe -t commands '
|
|
3220
|
+
_describe -t commands 'secret command' sub
|
|
2634
3221
|
}
|
|
2635
3222
|
|
|
2636
|
-
|
|
3223
|
+
_postman_secret_create() {
|
|
2637
3224
|
_arguments \
|
|
2638
|
-
'--
|
|
3225
|
+
'--team-id[Team id (defaults to your authenticated profile'\''s team; must be your own team — the vault rejects any other team id, even one you otherwise have access to)]:id' \
|
|
2639
3226
|
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
2640
3227
|
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3228
|
+
'--terminal[Enter one secret value through the terminal instead of the default browser form]' \
|
|
3229
|
+
'--value-stdin[Read the secret value from stdin instead of prompting; implies --terminal]' \
|
|
3230
|
+
'--timeout[Seconds to wait for the browser form (default 300)]:seconds' \
|
|
2641
3231
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2642
|
-
'*:
|
|
3232
|
+
'*:keys...:_files -g "*.json"'
|
|
2643
3233
|
}
|
|
2644
3234
|
|
|
2645
|
-
|
|
3235
|
+
_postman_secret_list() {
|
|
2646
3236
|
_arguments \
|
|
2647
|
-
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID]:workspaceId' \
|
|
3237
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
2648
3238
|
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2649
|
-
'
|
|
2650
|
-
'
|
|
3239
|
+
'--json[Print the list as machine-readable JSON.]' \
|
|
3240
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2651
3241
|
}
|
|
2652
3242
|
|
|
2653
|
-
|
|
3243
|
+
_postman_simulation() {
|
|
2654
3244
|
local context state state_descr line
|
|
2655
3245
|
typeset -A opt_args
|
|
2656
3246
|
_arguments -C \
|
|
2657
3247
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2658
|
-
'1: :
|
|
3248
|
+
'1: :_postman_simulation_commands' \
|
|
2659
3249
|
'*::arg:->args'
|
|
2660
3250
|
case $state in
|
|
2661
3251
|
args)
|
|
2662
3252
|
case $words[1] in
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
3253
|
+
create) _postman_simulation_create ;;
|
|
3254
|
+
list) _postman_simulation_list ;;
|
|
3255
|
+
get) _postman_simulation_get ;;
|
|
3256
|
+
run) _postman_simulation_run ;;
|
|
3257
|
+
push) _postman_simulation_push ;;
|
|
3258
|
+
deploy) _postman_simulation_deploy ;;
|
|
3259
|
+
update) _postman_simulation_update ;;
|
|
3260
|
+
log) _postman_simulation_log ;;
|
|
3261
|
+
delete) _postman_simulation_delete ;;
|
|
2671
3262
|
esac
|
|
2672
3263
|
;;
|
|
2673
3264
|
esac
|
|
2674
3265
|
}
|
|
2675
3266
|
|
|
2676
|
-
|
|
3267
|
+
_postman_simulation_commands() {
|
|
2677
3268
|
local -a sub
|
|
2678
3269
|
sub=(
|
|
2679
|
-
'
|
|
2680
|
-
'
|
|
2681
|
-
'
|
|
2682
|
-
'
|
|
2683
|
-
'
|
|
2684
|
-
'
|
|
2685
|
-
'
|
|
2686
|
-
'
|
|
3270
|
+
'create:Create a simulation that serves several mocks behind one address'
|
|
3271
|
+
'list:List the simulations in your repository or Postman cloud workspace'
|
|
3272
|
+
'get:Show a simulation'\''s details using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
3273
|
+
'run:Serve a simulation'\''s mocks on one local port, routing each by its routeKey. Pass a .sim.yaml path (local) or a Postman simulation id (fetched and run locally).'
|
|
3274
|
+
'push:Upload a simulation from your repository to Postman cloud (creates it the first time, updates it after). Its member mocks are pushed too.'
|
|
3275
|
+
'deploy:Turn a simulation in Postman cloud into a live mock server others can call over the internet.'
|
|
3276
|
+
'update:Change a simulation in place — rename it, switch routing, add mocks, or change a member'\''s address. Pass a .sim.yaml path (repository) or a Postman simulation id (cloud).'
|
|
3277
|
+
'log:Show the requests a deployed simulation has received and the responses it sent, using its mock server id.'
|
|
3278
|
+
'delete:Delete a simulation using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.'
|
|
2687
3279
|
)
|
|
2688
|
-
_describe -t commands '
|
|
3280
|
+
_describe -t commands 'simulation command' sub
|
|
2689
3281
|
}
|
|
2690
3282
|
|
|
2691
|
-
|
|
3283
|
+
_postman_simulation_create() {
|
|
2692
3284
|
_arguments \
|
|
2693
|
-
'(-
|
|
2694
|
-
'--
|
|
2695
|
-
'--
|
|
3285
|
+
'(-n --name)'{-n,--name}'[Name for the simulation]:name' \
|
|
3286
|
+
'--mock[A mock to include (repeatable). Use a local mock path to build the simulation in your repository, or a Postman mock id to create it in Postman cloud. Set its address with <mockIdOrPath>=<routeKey>. (default\: \[\])]:mockIdOrPath:_files -g "*.json"' \
|
|
3287
|
+
'--routing[How callers reach each mock\: header or path (default path)]:header|path' \
|
|
3288
|
+
'(-o --output)'{-o,--output}'[Where to save the simulation file in your repository, a file or folder (defaults to postman/simulations)]:path:_files -g "*.json"' \
|
|
3289
|
+
'--force[Overwrite the simulation file if it already exists]' \
|
|
3290
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to create the simulation in, by id (defaults to the workspace already linked to this project)]:id' \
|
|
3291
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3292
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
_postman_simulation_list() {
|
|
3296
|
+
_arguments \
|
|
3297
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace whose simulations to list, by id (defaults to the workspace already linked to this project)]:id' \
|
|
3298
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3299
|
+
'--json[Print the list as machine-readable data instead of a table]' \
|
|
2696
3300
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2697
3301
|
'*:pathOrDir:_files -g "*.json"'
|
|
2698
3302
|
}
|
|
2699
3303
|
|
|
2700
|
-
|
|
3304
|
+
_postman_simulation_get() {
|
|
2701
3305
|
_arguments \
|
|
2702
|
-
'--api-key[Postman API key (defaults to
|
|
2703
|
-
'--
|
|
2704
|
-
'--json[Output the full dataset as JSON]' \
|
|
3306
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3307
|
+
'--json[Print the details as machine-readable data instead of a table]' \
|
|
2705
3308
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2706
|
-
'*:
|
|
3309
|
+
'*:simIdOrPath:'
|
|
2707
3310
|
}
|
|
2708
3311
|
|
|
2709
|
-
|
|
3312
|
+
_postman_simulation_run() {
|
|
2710
3313
|
_arguments \
|
|
2711
|
-
'(-
|
|
2712
|
-
'(-
|
|
2713
|
-
'(-p --
|
|
2714
|
-
'--
|
|
2715
|
-
'--
|
|
2716
|
-
'--
|
|
3314
|
+
'(-e --environment)'{-e,--environment}'[Path to a file of environment variables for the mocks (relative or absolute)]:path:_files -g "*.json"' \
|
|
3315
|
+
'(-g --globals)'{-g,--globals}'[Path to a file of global variables for the mocks (relative or absolute)]:path:_files -g "*.json"' \
|
|
3316
|
+
'(-p --port)'{-p,--port}'[Port to serve on (e.g. 4010), or "auto" for a free one (default 3000)]:port' \
|
|
3317
|
+
'--dataset[Dataset file or folder to load for pm.datasets (repeatable) (default\: \[\])]:pathOrDir:_files -g "*.json"' \
|
|
3318
|
+
'(-w --workspace)'{-w,--workspace}'[Workspace for recording start history. Derived from a simulation id or the linked project; needed only for an unlinked .sim.yaml path.]:id' \
|
|
3319
|
+
'--simulation[Simulation id to record start history against for a .sim.yaml path (a local file has only a name). Not needed when running by simulation id, or when the file is linked to a cloud simulation (via workspace push).]:id' \
|
|
3320
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3321
|
+
'--no-history[Do not record this run in the simulation'\''s start history]' \
|
|
3322
|
+
'--output[Live output format\: auto (default, human-readable logs) or ndjson (one JSON event per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
|
|
3323
|
+
'--proxy[Serve the mocks behind a local HTTP(S) forward proxy instead of one routed port, so a repo under test can point HTTP_PROXY/HTTPS_PROXY at it and reach each mock by hostname without code changes. Requires a simulation.yaml (routing config), not a .sim.yaml.]' \
|
|
3324
|
+
'--proxy-port[Port for the proxy server. Distinct from --port, which is the one-port run'\''s own port. (default\: 7001)]:n' \
|
|
3325
|
+
'--scenario[Scenario each mock serves, sent as both pm-mock-scenario and x-mock-scenario. (default\: "default")]:name' \
|
|
3326
|
+
'--session[Session id to select via the x-mock-session header (default\: a generated id).]:id' \
|
|
3327
|
+
'--log-format[Proxy request log format\: text or json. (default\: "text")]:format' \
|
|
3328
|
+
'--log-body[Also log each response body (truncated). Buffers full responses in memory; meant for temporary debugging, not left on by default.]' \
|
|
3329
|
+
'--doctor[Start the proxy, probe each available HTTP client (fetch/undici/axios/node-fetch) to confirm it honors HTTP_PROXY/HTTPS_PROXY, then exit.]' \
|
|
2717
3330
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2718
|
-
'*:
|
|
3331
|
+
'*:simIdOrPath:'
|
|
2719
3332
|
}
|
|
2720
3333
|
|
|
2721
|
-
|
|
3334
|
+
_postman_simulation_push() {
|
|
2722
3335
|
_arguments \
|
|
2723
|
-
'(-
|
|
2724
|
-
'
|
|
2725
|
-
'--dataset-id[Override the generated dataset id (local only; defaults to a random v4 UUID)]:uuid' \
|
|
2726
|
-
'--force[Overwrite an existing file at <path>]' \
|
|
2727
|
-
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (create a cloud dataset)]:id' \
|
|
2728
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3336
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)]:id' \
|
|
3337
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2729
3338
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2730
|
-
'*:
|
|
3339
|
+
'*:simPath:'
|
|
2731
3340
|
}
|
|
2732
3341
|
|
|
2733
|
-
|
|
3342
|
+
_postman_simulation_deploy() {
|
|
2734
3343
|
_arguments \
|
|
2735
|
-
'(-
|
|
2736
|
-
'--
|
|
2737
|
-
'--
|
|
3344
|
+
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace that will own the server, by id (defaults to the workspace already linked to this project)]:id' \
|
|
3345
|
+
'(-n --name)'{-n,--name}'[Name for the mock server (you are asked for one if you skip this)]:name' \
|
|
3346
|
+
'(-s --slug)'{-s,--slug}'[Short label used in the server'\''s web address, e.g. "my-sim" (you are asked for one if you skip this)]:slug' \
|
|
3347
|
+
'--private[Require a Postman API key to reach the server. Public by default.]' \
|
|
3348
|
+
'(-y --yes)'{-y,--yes}'[Use the defaults and skip all questions (public)]' \
|
|
3349
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2738
3350
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2739
|
-
'*:
|
|
3351
|
+
'*:simId:'
|
|
2740
3352
|
}
|
|
2741
3353
|
|
|
2742
|
-
|
|
3354
|
+
_postman_simulation_update() {
|
|
3355
|
+
_arguments \
|
|
3356
|
+
'(-n --name)'{-n,--name}'[Rename the simulation]:name' \
|
|
3357
|
+
'--routing[Switch routing\: header or path]:header|path' \
|
|
3358
|
+
'--add-mock[Attach a mock (repeatable). A local mock path for a repository simulation, a Postman mock id for a cloud one. Set its address with <mockIdOrPath>=<routeKey>. (default\: \[\])]:mockIdOrPath:_files -g "*.json"' \
|
|
3359
|
+
'--route-key[Change a member mock'\''s address (repeatable), e.g. ./postman/mocks/payments=payments (default\: \[\])]:mockIdOrPath=routeKey:_files -g "*.(pem|crt|key)"' \
|
|
3360
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3361
|
+
'--json[Print the update as machine-readable data instead of a table]' \
|
|
3362
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3363
|
+
'*:simIdOrPath:'
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
_postman_simulation_log() {
|
|
3367
|
+
_arguments \
|
|
3368
|
+
'--mock[Show only requests served by this member (by routeKey). Repeat the flag for several members (default\: \[\])]:routeKey' \
|
|
3369
|
+
'--limit[Most entries to show (defaults to 50 when printing machine-readable output)]:n' \
|
|
3370
|
+
'--method[Show only requests of this type (e.g. GET, POST)]:method' \
|
|
3371
|
+
'--status[Show only these response codes (e.g. 404, or 5xx for any 500-series)]:code|range' \
|
|
3372
|
+
'--path[Show only requests to matching addresses (use * and ? as wildcards, e.g. /users/*)]:pattern' \
|
|
3373
|
+
'--since[Show entries from this long ago until now (e.g. 2h = the last 2 hours)]:duration' \
|
|
3374
|
+
'--until[Hide entries newer than this (e.g. 30m = skip the most recent 30 minutes)]:duration' \
|
|
3375
|
+
'--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3376
|
+
'--json[Print entries as machine-readable data instead of the scrollable view]' \
|
|
3377
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3378
|
+
'*:mockServerId:_files -g "*.json"'
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
_postman_simulation_delete() {
|
|
3382
|
+
_arguments \
|
|
3383
|
+
'(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
|
|
3384
|
+
'--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3385
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3386
|
+
'*:simIdOrPath:'
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
_postman_team() {
|
|
2743
3390
|
local context state state_descr line
|
|
2744
3391
|
typeset -A opt_args
|
|
2745
3392
|
_arguments -C \
|
|
2746
3393
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2747
|
-
'1: :
|
|
3394
|
+
'1: :_postman_team_commands' \
|
|
2748
3395
|
'*::arg:->args'
|
|
2749
3396
|
case $state in
|
|
2750
3397
|
args)
|
|
2751
3398
|
case $words[1] in
|
|
2752
|
-
list)
|
|
2753
|
-
add) _postman_dataset_source_add ;;
|
|
2754
|
-
remove) _postman_dataset_source_remove ;;
|
|
2755
|
-
update) _postman_dataset_source_update ;;
|
|
2756
|
-
test) _postman_dataset_source_test ;;
|
|
3399
|
+
list) _postman_team_list ;;
|
|
2757
3400
|
esac
|
|
2758
3401
|
;;
|
|
2759
3402
|
esac
|
|
2760
3403
|
}
|
|
2761
3404
|
|
|
2762
|
-
|
|
3405
|
+
_postman_team_commands() {
|
|
2763
3406
|
local -a sub
|
|
2764
3407
|
sub=(
|
|
2765
|
-
'list:List the
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
'update:Update fields on an existing datasource. Only the flags you provide are changed.'
|
|
2769
|
-
'test:Open and close a real connection using a source'\''s stored configuration.'
|
|
2770
|
-
)
|
|
2771
|
-
_describe -t commands 'source command' sub
|
|
2772
|
-
}
|
|
2773
|
-
|
|
2774
|
-
_postman_dataset_source_list() {
|
|
2775
|
-
_arguments \
|
|
2776
|
-
'(-d --dataset)'{-d,--dataset}'[Dataset whose sources to list — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
2777
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2778
|
-
'--json[Output sources as JSON instead of a table]' \
|
|
2779
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
|
-
_postman_dataset_source_add() {
|
|
2783
|
-
_arguments \
|
|
2784
|
-
'(-d --dataset)'{-d,--dataset}'[Dataset to add the source to; positional target is also accepted for v1.45 compatibility]:datasetPathOrId' \
|
|
2785
|
-
'(-n --name)'{-n,--name}'[Logical name for the source (becomes the SQL table name). Required for every source except a spreadsheet, whose worksheets are each named source_<worksheet>]:name' \
|
|
2786
|
-
'--source-id[Override the generated source id (local dataset only)]:uuid' \
|
|
2787
|
-
'--format[Use this format instead of extension/type inference; file contents are not sniffed. A spreadsheet (xlsx/xls/ods) is added as one source per worksheet, each named source_<worksheet>]:csv|json|xlsx|xls|ods|jdbc|mysql|postgres|sqlserver' \
|
|
2788
|
-
'--type[Source kind; local is inferred from --file, jdbc from --driver-jar]:local|mysql|postgresql|sqlserver|jdbc' \
|
|
2789
|
-
'--file[Path to a local CSV/JSON/spreadsheet file (absolute or cwd-relative)]:path:_files -g "*.json"' \
|
|
2790
|
-
'--ref-only[Reference the file in place; do NOT copy into data_dir (local dataset)]' \
|
|
2791
|
-
'--force[When copying, overwrite an existing file at the destination (local dataset)]' \
|
|
2792
|
-
'--upload[Cloud dataset only\: upload --file as a postmancloudfile source (runs via /exec). Without --upload, --file is registered as a local_filesystem source read by the local engine. Either way a cloud dataset takes csv/json only — add a spreadsheet to a local .dataset.yaml, where each worksheet becomes its own source.]' \
|
|
2793
|
-
'--driver-jar[JDBC driver JAR(s). Repeatable, or pass several after one flag]:path...:_files -g "*.json"' \
|
|
2794
|
-
'--driver-class[Driver class. Auto-resolved when the JAR contains exactly one]:fqcn' \
|
|
2795
|
-
'--driver-name[Label for this driver type (defaults to the JAR filename)]:label' \
|
|
2796
|
-
'--url-template[JDBC URL with {{placeholders}}, e.g. jdbc\:postgresql\://{{host}}\:{{port}}/{{database}}]:template' \
|
|
2797
|
-
'--var[Value for a {{placeholder}}. Repeatable. Use vault\:<vaultId>/<secretId> for a secret. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:name=value...' \
|
|
2798
|
-
'--prop[Driver connection property. Repeatable. Same vault\: syntax as --var]:name=value...' \
|
|
2799
|
-
'--vars-file[JSON object of --var values; "-" reads stdin. Supports {"$vaultId"\:..,"$secretId"\:..} objects, and keeps secrets out of argv entirely]:path:_files -g "*.json"' \
|
|
2800
|
-
'--from-source[Reuse another source'\''s driver JAR, class and URL template]:name' \
|
|
2801
|
-
'--java-path[Java runtime to use. Machine-local only - never written to the dataset. Also read from POSTMAN_JDBC_JAVA_PATH]:path:_files -g "*.json"' \
|
|
2802
|
-
'--no-test[Skip the pre-write connection test. Note that resolving the driver class still starts a JVM — on a machine with no Java, pass --driver-class (or --from-source) too]' \
|
|
2803
|
-
'--ssh-target-host-variable[Template variable holding the tunnelled host (inferred when omitted)]:name' \
|
|
2804
|
-
'--ssh-target-port-variable[Template variable holding the tunnelled port (inferred when omitted)]:name' \
|
|
2805
|
-
'--json[Emit the result as JSON instead of prose]' \
|
|
2806
|
-
'--host[DB host (mysql/postgresql/sqlserver)]:host' \
|
|
2807
|
-
'--port[DB port (defaults to 1433 for sqlserver)]:port' \
|
|
2808
|
-
'--user[DB user. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:user' \
|
|
2809
|
-
'--password[DB password. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:password' \
|
|
2810
|
-
'--database[DB database name]:db' \
|
|
2811
|
-
'--table[DB table name (required for sqlserver)]:table' \
|
|
2812
|
-
'--ssh-host[SSH bastion host]:host' \
|
|
2813
|
-
'--ssh-port[SSH bastion port]:port' \
|
|
2814
|
-
'--ssh-user[SSH bastion user]:user' \
|
|
2815
|
-
'--ssh-private-key[Path to the SSH private key. WARNING\: the path is visible in `ps` output and shell history; key contents are read locally at execution time and are not stored in the dataset config.]:filepath:_files -g "*.(pem|crt|key)"' \
|
|
2816
|
-
'--ssh-host-key[SSH bastion public host key]:publicKey' \
|
|
2817
|
-
'--ssh-host-key-vault-id[Shared Vault ID containing the SSH public host key]:id' \
|
|
2818
|
-
'--ssh-host-key-secret-id[Shared Vault secret ID containing the SSH public host key]:id' \
|
|
2819
|
-
'--ssh-insecure-skip-host-key-verification[WARNING\: disable SSH host-key verification; use only for trusted local testing]' \
|
|
2820
|
-
'--schema[DB schema (postgresql/sqlserver; defaults to dbo for sqlserver)]:schema' \
|
|
2821
|
-
'--encrypt[SQL Server TLS encryption (default\: true)]:true|false' \
|
|
2822
|
-
'--trust-server-certificate[SQL Server\: skip certificate verification (default\: false; insecure)]:true|false' \
|
|
2823
|
-
'--tls-certificate[SQL Server CA/server certificate file path]:path:_files -g "*.(pem|crt|key)"' \
|
|
2824
|
-
'--host-name-in-certificate[SQL Server certificate hostname override]:hostname' \
|
|
2825
|
-
'--tls-min-version[SQL Server minimum TLS version (default\: 1.2)]:1.2|1.3' \
|
|
2826
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2827
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2828
|
-
'*:datasetPathOrId:'
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
_postman_dataset_source_remove() {
|
|
2832
|
-
_arguments \
|
|
2833
|
-
'(-d --dataset)'{-d,--dataset}'[Dataset the source belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
|
|
2834
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2835
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2836
|
-
'*:sourceNameOrId:'
|
|
3408
|
+
'list:List the teams inside your organisation.'
|
|
3409
|
+
)
|
|
3410
|
+
_describe -t commands 'team command' sub
|
|
2837
3411
|
}
|
|
2838
3412
|
|
|
2839
|
-
|
|
3413
|
+
_postman_team_list() {
|
|
2840
3414
|
_arguments \
|
|
2841
|
-
'
|
|
2842
|
-
'
|
|
2843
|
-
'--
|
|
2844
|
-
'--
|
|
2845
|
-
'--ref-only[With --file, reference in place instead of copying (local dataset only)]' \
|
|
2846
|
-
'--force[With --file, overwrite the copied destination (local dataset only)]' \
|
|
2847
|
-
'--driver-jar[Replace the JDBC driver JAR(s)]:path...:_files -g "*.json"' \
|
|
2848
|
-
'--driver-class[Replace the JDBC driver class]:fqcn' \
|
|
2849
|
-
'--driver-name[Rename the JDBC driver type label]:label' \
|
|
2850
|
-
'--url-template[Replace the JDBC URL template]:template' \
|
|
2851
|
-
'--var[Set a JDBC template variable. Merges onto the existing values. Use vault\:<vaultId>/<secretId> for a secret. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:name=value...' \
|
|
2852
|
-
'--prop[Set a JDBC connection property. Merges, same vault\: syntax]:name=value...' \
|
|
2853
|
-
'--unset-var[Remove a JDBC template variable. Merging alone can never remove a key]:name...' \
|
|
2854
|
-
'--unset-prop[Remove a JDBC connection property]:name...' \
|
|
2855
|
-
'--vars-file[JSON object of --var values; "-" reads stdin]:path:_files -g "*.json"' \
|
|
2856
|
-
'--ssh-target-host-variable[Template variable holding the tunnelled host (JDBC)]:name' \
|
|
2857
|
-
'--ssh-target-port-variable[Template variable holding the tunnelled port (JDBC)]:name' \
|
|
2858
|
-
'--java-path[Java runtime for JDBC operations. Machine-local only]:path:_files -g "*.json"' \
|
|
2859
|
-
'--host[Update DB host (mysql/postgresql/sqlserver)]:host' \
|
|
2860
|
-
'--port[Update DB port]:port' \
|
|
2861
|
-
'--user[Update DB user. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:user' \
|
|
2862
|
-
'--password[Update DB password. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:password' \
|
|
2863
|
-
'--database[Update DB database name]:db' \
|
|
2864
|
-
'--table[Update DB table name]:table' \
|
|
2865
|
-
'--ssh-host[Update SSH bastion host]:host' \
|
|
2866
|
-
'--ssh-port[Update SSH bastion port]:port' \
|
|
2867
|
-
'--ssh-user[Update SSH bastion user]:user' \
|
|
2868
|
-
'--ssh-private-key[Update the SSH private-key file path. WARNING\: the path is visible in `ps` output and shell history; key contents are read locally and are not stored in the dataset config.]:filepath:_files -g "*.(pem|crt|key)"' \
|
|
2869
|
-
'--ssh-host-key[Update the SSH bastion public host key]:publicKey' \
|
|
2870
|
-
'--ssh-host-key-vault-id[Update the Shared Vault ID containing the SSH public host key]:id' \
|
|
2871
|
-
'--ssh-host-key-secret-id[Update the Shared Vault secret ID containing the SSH public host key]:id' \
|
|
2872
|
-
'--ssh-insecure-skip-host-key-verification[WARNING\: disable SSH host-key verification; use only for trusted local testing]' \
|
|
2873
|
-
'--schema[Update DB schema (postgresql/sqlserver)]:schema' \
|
|
2874
|
-
'--encrypt[Update SQL Server TLS encryption]:true|false' \
|
|
2875
|
-
'--trust-server-certificate[Update SQL Server certificate verification (true is insecure)]:true|false' \
|
|
2876
|
-
'--tls-certificate[Update SQL Server CA/server certificate file path]:path:_files -g "*.(pem|crt|key)"' \
|
|
2877
|
-
'--host-name-in-certificate[Update SQL Server certificate hostname override]:hostname' \
|
|
2878
|
-
'--tls-min-version[Update SQL Server minimum TLS version]:1.2|1.3' \
|
|
2879
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2880
|
-
'--json[Emit the result as JSON instead of prose]' \
|
|
2881
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2882
|
-
'*:sourceNameOrId:'
|
|
3415
|
+
'--can-create-workspace[Only list teams you could create a workspace in.]' \
|
|
3416
|
+
'--json[Print the list as machine-readable JSON.]' \
|
|
3417
|
+
'--timeout[Abort the run after this many milliseconds. Defaults to 30000.]:ms' \
|
|
3418
|
+
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2883
3419
|
}
|
|
2884
3420
|
|
|
2885
|
-
|
|
3421
|
+
_postman_update() {
|
|
2886
3422
|
_arguments \
|
|
2887
|
-
'
|
|
2888
|
-
'(-n --name)'{-n,--name}'[Source to test]:name' \
|
|
2889
|
-
'--java-path[Java runtime to use for a JDBC source. Machine-local only; also read from POSTMAN_JDBC_JAVA_PATH]:path:_files -g "*.json"' \
|
|
2890
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2891
|
-
'--json[Emit the result as JSON instead of prose]' \
|
|
3423
|
+
'--check[Check whether a Postman CLI update is available.]' \
|
|
2892
3424
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2893
3425
|
}
|
|
2894
3426
|
|
|
2895
|
-
|
|
3427
|
+
_postman_webhook() {
|
|
2896
3428
|
local context state state_descr line
|
|
2897
3429
|
typeset -A opt_args
|
|
2898
3430
|
_arguments -C \
|
|
2899
3431
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2900
|
-
'1: :
|
|
3432
|
+
'1: :_postman_webhook_commands' \
|
|
2901
3433
|
'*::arg:->args'
|
|
2902
3434
|
case $state in
|
|
2903
3435
|
args)
|
|
2904
3436
|
case $words[1] in
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
3437
|
+
create) _postman_webhook_create ;;
|
|
3438
|
+
start) _postman_webhook_start ;;
|
|
3439
|
+
pause) _postman_webhook_pause ;;
|
|
3440
|
+
list) _postman_webhook_list ;;
|
|
3441
|
+
delete) _postman_webhook_delete ;;
|
|
3442
|
+
status) _postman_webhook_status ;;
|
|
3443
|
+
requests) _postman_webhook_requests ;;
|
|
3444
|
+
scripts) _postman_webhook_scripts ;;
|
|
3445
|
+
forward) _postman_webhook_forward ;;
|
|
2910
3446
|
esac
|
|
2911
3447
|
;;
|
|
2912
3448
|
esac
|
|
2913
3449
|
}
|
|
2914
3450
|
|
|
2915
|
-
|
|
3451
|
+
_postman_webhook_commands() {
|
|
2916
3452
|
local -a sub
|
|
2917
3453
|
sub=(
|
|
2918
|
-
'
|
|
2919
|
-
'
|
|
2920
|
-
'
|
|
2921
|
-
'
|
|
2922
|
-
'
|
|
3454
|
+
'create:Create a new webhook and print its public URL.'
|
|
3455
|
+
'start:Activate a webhook so it can receive requests.'
|
|
3456
|
+
'pause:Pause a webhook so it no longer accepts requests.'
|
|
3457
|
+
'list:List all webhooks in a workspace.'
|
|
3458
|
+
'delete:Permanently delete a webhook.'
|
|
3459
|
+
'status:Show details for a webhook.'
|
|
3460
|
+
'requests:List, inspect, and replay requests received by a webhook.'
|
|
3461
|
+
'scripts:Create or update scripts executed by a webhook.'
|
|
3462
|
+
'forward:Forward incoming webhook requests to a local port.'
|
|
2923
3463
|
)
|
|
2924
|
-
_describe -t commands '
|
|
3464
|
+
_describe -t commands 'webhook command' sub
|
|
2925
3465
|
}
|
|
2926
3466
|
|
|
2927
|
-
|
|
3467
|
+
_postman_webhook_create() {
|
|
2928
3468
|
_arguments \
|
|
2929
|
-
'(-
|
|
2930
|
-
'--
|
|
2931
|
-
'--
|
|
3469
|
+
'(-t --title)'{-t,--title}'[Name for the webhook (default\: "CLI Webhook")]:title' \
|
|
3470
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3471
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2932
3472
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2933
3473
|
}
|
|
2934
3474
|
|
|
2935
|
-
|
|
3475
|
+
_postman_webhook_start() {
|
|
2936
3476
|
_arguments \
|
|
2937
|
-
'(-
|
|
2938
|
-
'
|
|
2939
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
2940
|
-
'--json[Output rows as JSON instead of a table]' \
|
|
2941
|
-
'--debug[Include safe classified dataset diagnostics]' \
|
|
3477
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID]:workspaceId' \
|
|
3478
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2942
3479
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2943
|
-
'*:
|
|
3480
|
+
'*:webhookIdOrUrl:'
|
|
2944
3481
|
}
|
|
2945
3482
|
|
|
2946
|
-
|
|
3483
|
+
_postman_webhook_pause() {
|
|
2947
3484
|
_arguments \
|
|
2948
|
-
'(-
|
|
2949
|
-
'
|
|
2950
|
-
'(-
|
|
2951
|
-
'
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
3485
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID]:workspaceId' \
|
|
3486
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3487
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3488
|
+
'*:webhookIdOrUrl:'
|
|
3489
|
+
}
|
|
3490
|
+
|
|
3491
|
+
_postman_webhook_list() {
|
|
3492
|
+
_arguments \
|
|
3493
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3494
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2955
3495
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
2956
3496
|
}
|
|
2957
3497
|
|
|
2958
|
-
|
|
3498
|
+
_postman_webhook_delete() {
|
|
2959
3499
|
_arguments \
|
|
2960
|
-
'(-
|
|
2961
|
-
'--api-key[Postman API key
|
|
3500
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID]:workspaceId' \
|
|
3501
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2962
3502
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2963
|
-
'*:
|
|
3503
|
+
'*:webhookId:'
|
|
2964
3504
|
}
|
|
2965
3505
|
|
|
2966
|
-
|
|
3506
|
+
_postman_webhook_status() {
|
|
2967
3507
|
_arguments \
|
|
2968
|
-
'(-
|
|
2969
|
-
'
|
|
2970
|
-
'(-q --query)'{-q,--query}'[New SQL query]:sql' \
|
|
2971
|
-
'--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3508
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID]:workspaceId' \
|
|
3509
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
2972
3510
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2973
|
-
'*:
|
|
3511
|
+
'*:webhookId:'
|
|
2974
3512
|
}
|
|
2975
3513
|
|
|
2976
|
-
|
|
3514
|
+
_postman_webhook_requests() {
|
|
2977
3515
|
local context state state_descr line
|
|
2978
3516
|
typeset -A opt_args
|
|
2979
3517
|
_arguments -C \
|
|
2980
3518
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
2981
|
-
'1: :
|
|
3519
|
+
'1: :_postman_webhook_requests_commands' \
|
|
2982
3520
|
'*::arg:->args'
|
|
2983
3521
|
case $state in
|
|
2984
3522
|
args)
|
|
2985
3523
|
case $words[1] in
|
|
2986
|
-
|
|
3524
|
+
list) _postman_webhook_requests_list ;;
|
|
3525
|
+
describe) _postman_webhook_requests_describe ;;
|
|
3526
|
+
replay) _postman_webhook_requests_replay ;;
|
|
2987
3527
|
esac
|
|
2988
3528
|
;;
|
|
2989
3529
|
esac
|
|
2990
3530
|
}
|
|
2991
3531
|
|
|
2992
|
-
|
|
3532
|
+
_postman_webhook_requests_commands() {
|
|
2993
3533
|
local -a sub
|
|
2994
3534
|
sub=(
|
|
2995
|
-
'
|
|
3535
|
+
'list:List recent requests received by a webhook.'
|
|
3536
|
+
'describe:Show details for a request received by a webhook.'
|
|
3537
|
+
'replay:Replay a request received by a webhook.'
|
|
2996
3538
|
)
|
|
2997
|
-
_describe -t commands '
|
|
3539
|
+
_describe -t commands 'requests command' sub
|
|
2998
3540
|
}
|
|
2999
3541
|
|
|
3000
|
-
|
|
3542
|
+
_postman_webhook_requests_list() {
|
|
3001
3543
|
_arguments \
|
|
3002
|
-
'--
|
|
3003
|
-
'--
|
|
3004
|
-
'--
|
|
3005
|
-
'--json[Emit the discovery result as JSON]' \
|
|
3544
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3545
|
+
'--cursor[Pagination cursor returned by a previous request list response]:cursor' \
|
|
3546
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3006
3547
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3007
|
-
'*:
|
|
3548
|
+
'*:webhookId:'
|
|
3008
3549
|
}
|
|
3009
3550
|
|
|
3010
|
-
|
|
3551
|
+
_postman_webhook_requests_describe() {
|
|
3552
|
+
_arguments \
|
|
3553
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3554
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3555
|
+
'--verbose[Show script execution logs]' \
|
|
3556
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3557
|
+
'*:requestId:'
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
_postman_webhook_requests_replay() {
|
|
3561
|
+
_arguments \
|
|
3562
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3563
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3564
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3565
|
+
'*:requestId:'
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
_postman_webhook_scripts() {
|
|
3011
3569
|
local context state state_descr line
|
|
3012
3570
|
typeset -A opt_args
|
|
3013
3571
|
_arguments -C \
|
|
3014
3572
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3015
|
-
'1: :
|
|
3573
|
+
'1: :_postman_webhook_scripts_commands' \
|
|
3016
3574
|
'*::arg:->args'
|
|
3017
3575
|
case $state in
|
|
3018
3576
|
args)
|
|
3019
3577
|
case $words[1] in
|
|
3020
|
-
|
|
3021
|
-
list) _postman_dependency_list ;;
|
|
3022
|
-
install) _postman_dependency_install ;;
|
|
3023
|
-
update) _postman_dependency_update ;;
|
|
3024
|
-
remove) _postman_dependency_remove ;;
|
|
3578
|
+
set) _postman_webhook_scripts_set ;;
|
|
3025
3579
|
esac
|
|
3026
3580
|
;;
|
|
3027
3581
|
esac
|
|
3028
3582
|
}
|
|
3029
3583
|
|
|
3030
|
-
|
|
3584
|
+
_postman_webhook_scripts_commands() {
|
|
3031
3585
|
local -a sub
|
|
3032
3586
|
sub=(
|
|
3033
|
-
'
|
|
3034
|
-
'list:List the workspace dependencies declared in .postman/resources.yaml.'
|
|
3035
|
-
'install:Materialise the dependencies declared in .postman/resources.yaml (all, or one).'
|
|
3036
|
-
'update:Refresh declared dependencies to the latest content from their source (all, or one).'
|
|
3037
|
-
'remove:Remove a workspace dependency and delete its local files.'
|
|
3587
|
+
'set:Create or update a webhook script from a JavaScript or TypeScript file.'
|
|
3038
3588
|
)
|
|
3039
|
-
_describe -t commands '
|
|
3040
|
-
}
|
|
3041
|
-
|
|
3042
|
-
_postman_dependency_add() {
|
|
3043
|
-
_arguments \
|
|
3044
|
-
'(-w --workspace)'{-w,--workspace}'[Workspace id to resolve a name in (defaults to the current workspace).]:id' \
|
|
3045
|
-
'(-y --yes)'{-y,--yes}'[Skip all confirmation prompts.]' \
|
|
3046
|
-
'--json[Output the result as JSON.]' \
|
|
3047
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3048
|
-
'*:nameOrId:'
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
_postman_dependency_list() {
|
|
3052
|
-
_arguments \
|
|
3053
|
-
'--type[Only list dependencies of this type (collection, environment, or mock).]:type' \
|
|
3054
|
-
'--json[Output the result as JSON.]' \
|
|
3055
|
-
'(-h --help)'{-h,--help}'[display help for command]'
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
_postman_dependency_install() {
|
|
3059
|
-
_arguments \
|
|
3060
|
-
'--type[Only install dependencies of this type (collection, environment, or mock).]:type' \
|
|
3061
|
-
'--json[Output the result as JSON.]' \
|
|
3062
|
-
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3063
|
-
'*:nameOrId:'
|
|
3589
|
+
_describe -t commands 'scripts command' sub
|
|
3064
3590
|
}
|
|
3065
3591
|
|
|
3066
|
-
|
|
3592
|
+
_postman_webhook_scripts_set() {
|
|
3067
3593
|
_arguments \
|
|
3068
|
-
'--
|
|
3069
|
-
'--
|
|
3594
|
+
'--event[Script event\: onEvent or onResponse]:event' \
|
|
3595
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3596
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3070
3597
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3071
|
-
'*:
|
|
3598
|
+
'*:scriptPath:'
|
|
3072
3599
|
}
|
|
3073
3600
|
|
|
3074
|
-
|
|
3601
|
+
_postman_webhook_forward() {
|
|
3075
3602
|
_arguments \
|
|
3076
|
-
'--
|
|
3077
|
-
'
|
|
3078
|
-
'--json[Output the result as JSON.]' \
|
|
3603
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID]:workspaceId' \
|
|
3604
|
+
'--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
|
|
3079
3605
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3080
|
-
'*:
|
|
3606
|
+
'*:port:'
|
|
3081
3607
|
}
|
|
3082
3608
|
|
|
3083
3609
|
# When loaded via fpath + compinit, the file body becomes the function body of
|