postman-cli-completion 1.59.0 → 1.62.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.
@@ -1,6 +1,6 @@
1
1
  #compdef postman
2
2
  compdef _postman postman
3
- # Zsh completion for Postman CLI (postman v1.59.0)
3
+ # Zsh completion for Postman CLI (postman v1.62.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
@@ -25,6 +25,7 @@ _postman() {
25
25
  logout) _postman_logout ;;
26
26
  init) _postman_init ;;
27
27
  whoami) _postman_whoami ;;
28
+ feedback) _postman_feedback ;;
28
29
  update) _postman_update ;;
29
30
  skills) _postman_skills ;;
30
31
  collection) _postman_collection ;;
@@ -35,6 +36,7 @@ _postman() {
35
36
  spec) _postman_spec ;;
36
37
  monitor) _postman_monitor ;;
37
38
  workspace|ws) _postman_workspace ;;
39
+ team) _postman_team ;;
38
40
  performance) _postman_performance ;;
39
41
  flows|fl) _postman_flows ;;
40
42
  request) _postman_request ;;
@@ -42,7 +44,7 @@ _postman() {
42
44
  mock) _postman_mock ;;
43
45
  application|app) _postman_application ;;
44
46
  simulate) _postman_simulate ;;
45
- context) _postman_context ;;
47
+ describe) _postman_describe ;;
46
48
  context-graph) _postman_context_graph ;;
47
49
  search) _postman_search ;;
48
50
  webhook) _postman_webhook ;;
@@ -61,17 +63,19 @@ _postman_commands() {
61
63
  'logout:Delete the stored Postman API key.'
62
64
  'init:Set up Postman artifacts and agent instructions in a repository.'
63
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.'
64
67
  'update:Update Postman CLI using the original installation method.'
65
68
  'skills:Check and update the agent skills in this repository.'
66
69
  'collection:Run and test your Postman collections directly from the command line.'
67
70
  'environment:Work with local Postman environments from the command line. Also read cloud environments by ID.'
68
71
  'globals:Work with local Postman globals from the command line.'
69
72
  'api:Publish and test your APIs directly from the command line'
70
- 'runner:Where your monitors execute\: run and inspect your own self-hosted runners, and list the Postman-operated regions available to your team'
73
+ 'runner:Where your monitors execute\: run and inspect your own self-hosted runners, and list the Postman-operated regions available to your team.'
71
74
  'spec:Lint and validate Specifications from the command line'
72
75
  'monitor:Run and manage Postman monitors.'
73
76
  'workspace:Manage workspace resources.'
74
77
  'ws:Alias for workspace'
78
+ 'team:Work with the teams inside your organisation.'
75
79
  'performance:Manage performance tests on your collections.'
76
80
  'flows:Manage and interact with flows.'
77
81
  'fl:Alias for flows'
@@ -81,7 +85,7 @@ _postman_commands() {
81
85
  'application:Application-level commands\: initialise config and run tests.'
82
86
  'app:Alias for application'
83
87
  'simulate:Start mock servers with simulated failure scenarios.'
84
- 'context:\[Beta\] Get API context for AI coding agents directly from the command line.'
88
+ 'describe:\[Beta\] Get API context for AI coding agents directly from the command line.'
85
89
  'context-graph:Ask natural-language questions about your team'\''s Context Graph.'
86
90
  'search:Search for Postman element types (requests, collections, workspaces, and more).'
87
91
  'webhook:Create and manage Postman webhooks.'
@@ -102,9 +106,7 @@ _postman_login() {
102
106
 
103
107
  _postman_signup() {
104
108
  _arguments \
105
- '--browser[Always open the sign-up URL in a browser here, rather than printing it.]' \
106
- '--wait[Wait for the sign-up to complete even if no local browser is detected.]' \
107
- '--no-wait[Print the sign-up URL and exit without waiting. Leaves this CLI a guest.]' \
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`.]' \
108
110
  '--json[Print the sign-up details as machine-readable JSON.]' \
109
111
  '(-h --help)'{-h,--help}'[display help for command]'
110
112
  }
@@ -134,8 +136,18 @@ _postman_whoami() {
134
136
  '(-h --help)'{-h,--help}'[display help for command]'
135
137
  }
136
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
+
137
148
  _postman_update() {
138
149
  _arguments \
150
+ '--check[Check whether a Postman CLI update is available.]' \
139
151
  '(-h --help)'{-h,--help}'[display help for command]'
140
152
  }
141
153
 
@@ -197,6 +209,7 @@ _postman_collection() {
197
209
  lint) _postman_collection_lint ;;
198
210
  ai-readiness) _postman_collection_ai_readiness ;;
199
211
  get) _postman_collection_get ;;
212
+ request) _postman_collection_request ;;
200
213
  list) _postman_collection_list ;;
201
214
  run) _postman_collection_run ;;
202
215
  esac
@@ -212,6 +225,7 @@ _postman_collection_commands() {
212
225
  'lint:Run linting on a local v3 collection at the given file or directory path.'
213
226
  'ai-readiness:Score a Postman collection for AI readiness by ID, local file path, or local-mode directory.'
214
227
  'get:Fetch a Postman collection in the V3 format and print it.'
228
+ 'request:Add, update, or remove requests in a local v3 collection.'
215
229
  'list:List collections\: your local project'\''s collections by default, or a Postman cloud workspace'\''s collections with --workspace.'
216
230
  'run:Initiate a Postman collection run from a given ID or path.'
217
231
  )
@@ -259,6 +273,78 @@ _postman_collection_get() {
259
273
  '*:id:'
260
274
  }
261
275
 
276
+ _postman_collection_request() {
277
+ local context state state_descr line
278
+ typeset -A opt_args
279
+ _arguments -C \
280
+ '(-h --help)'{-h,--help}'[display help for command]' \
281
+ '1: :_postman_collection_request_commands' \
282
+ '*::arg:->args'
283
+ case $state in
284
+ args)
285
+ case $words[1] in
286
+ add) _postman_collection_request_add ;;
287
+ update) _postman_collection_request_update ;;
288
+ rm|remove) _postman_collection_request_rm ;;
289
+ esac
290
+ ;;
291
+ esac
292
+ }
293
+
294
+ _postman_collection_request_commands() {
295
+ local -a sub
296
+ sub=(
297
+ 'add:Add an empty request to a local v3 collection (set its details later with `update`).'
298
+ 'update:Update a request in a v3 collection (only the fields you pass).'
299
+ 'rm:Remove a request (any type) from a v3 collection.'
300
+ 'remove:Alias for rm'
301
+ )
302
+ _describe -t commands 'request command' sub
303
+ }
304
+
305
+ _postman_collection_request_add() {
306
+ _arguments \
307
+ '--collection[Target collection\: name, directory, id, cloud id, or path. Required.]:id|name' \
308
+ '--folder[Folder within the collection, e.g. "Users/Admin". Defaults to the root.]:id|name|path' \
309
+ '--type[Request type\: http, graphql, grpc, websocket, socketio. (default\: "http")]:type' \
310
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
311
+ '--json[JSON output.]' \
312
+ '(-h --help)'{-h,--help}'[display help for command]' \
313
+ '*:request-name:'
314
+ }
315
+
316
+ _postman_collection_request_update() {
317
+ _arguments \
318
+ '--collection[Target collection\: name, directory, id, cloud id, or path (cloud\: id only). Required.]:id|name' \
319
+ '--folder[Folder to scope the request selector, e.g. "Users/Admin" (local\: name/path; cloud\: id).]:id|name|path' \
320
+ '--rename[Rename the request (moves its file). Any request type.]:name' \
321
+ '--url[Request URL. Any request type.]:url' \
322
+ '--method[HTTP method (http requests only).]:method' \
323
+ '--param[Replace query parameters. Repeatable (http requests only). (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
324
+ '(-d --body)'{-d,--body}'[Request payload (inline, @file, or - for stdin), interpreted by request type. For http, an optional "<type>\:" prefix picks the content type\: json/text/xml/html/javascript, file\:<path>, urlencoded\:key=v&k2=v2, or formdata\:key=v&file=@path.]:body' \
325
+ '--variables[GraphQL variables JSON (graphql requests only).]:json' \
326
+ '--description[Request description.]:text' \
327
+ '--headers[Replace request headers. Repeatable; any request type with headers. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
328
+ '--auth[Request auth\: none, inherit, bearer\:TOKEN, basic\:USER\:PASS, apikey\:KEY\:VALUE\[\:header|query\], oauth2\:TOKEN. Any request type.]:spec' \
329
+ '--scripts[Replace scripts. event is prerequest or test; script is @file, - for stdin, or inline. Repeatable; any request type. (default\: \[\])]:event\:script' \
330
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
331
+ '--type[Request type for cloud mode\: http, graphql, grpc, websocket, socketio. (default\: "http")]:type' \
332
+ '--json[JSON output.]' \
333
+ '(-h --help)'{-h,--help}'[display help for command]' \
334
+ '*:request:'
335
+ }
336
+
337
+ _postman_collection_request_rm() {
338
+ _arguments \
339
+ '--collection[Target collection\: name, directory, id, cloud id, or path (cloud\: id only). Required.]:id|name' \
340
+ '--folder[Folder to scope the request selector, e.g. "Users/Admin" (local\: name/path; cloud\: id).]:id|name|path' \
341
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
342
+ '--type[Request type for cloud mode\: http, graphql, grpc, websocket, socketio. (default\: "http")]:type' \
343
+ '--json[JSON output.]' \
344
+ '(-h --help)'{-h,--help}'[display help for command]' \
345
+ '*:request:'
346
+ }
347
+
262
348
  _postman_collection_list() {
263
349
  _arguments \
264
350
  '(-w --workspace)'{-w,--workspace}'[List a Postman cloud workspace'\''s collections by id. Omit to list the local project'\''s collections.]:workspaceId' \
@@ -553,9 +639,9 @@ _postman_runner() {
553
639
  _postman_runner_commands() {
554
640
  local -a sub
555
641
  sub=(
556
- 'start:Start a runner'
557
- 'list:List the team'\''s registered self-hosted runners'
558
- 'regions:List the region and private-runner values valid for monitor create/update --runner, including a static IP where configured'
642
+ 'start:Start a self-hosted runner in your own network.'
643
+ 'list:List the team'\''s registered self-hosted runners.'
644
+ '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.'
559
645
  )
560
646
  _describe -t commands 'runner command' sub
561
647
  }
@@ -564,15 +650,16 @@ _postman_runner_start() {
564
650
  _arguments \
565
651
  '--id[The ID of the runner to execute]:id' \
566
652
  '--key[The secret key for the runner]:key:_files -g "*.(pem|crt|key)"' \
567
- '--region[Specify the region for the runner. Use "eu" for EU region.]:region' \
568
- '--proxy[External proxy URL (e.g., http\://proxy.com or http\://proxy.com\:8080)]:url' \
653
+ '--region[Region this runner reports to -- use "eu" for the EU region]:region' \
654
+ '--proxy[External proxy URL, for example http\://proxy.com or http\://proxy.com\:8080]:url' \
569
655
  '--egress-proxy[Enable built-in egress proxy]' \
570
656
  '--egress-proxy-authz-url[Custom egress proxy authorization service base URL]:url' \
571
657
  '--ssl-extra-ca-certs[Additional trusted CA certificates (PEM file, can contain multiple certs)]:path:_files -g "*.(pem|crt|key)"' \
658
+ '--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 -/' \
572
659
  '--metrics[Enable the metrics server for health checks]' \
573
660
  '--metrics-port[Port for the metrics server (default\: "9090")]:port' \
574
- '--report-events[Accepted for compatibility; analytics are sent by default]' \
575
- '--no-report-events[Do not send analytics to Postman]' \
661
+ '--report-events[Accepted for compatibility; run events are reported by default]' \
662
+ '--no-report-events[Do not report run events to Postman]' \
576
663
  '(-h --help)'{-h,--help}'[display help for command]'
577
664
  }
578
665
 
@@ -808,7 +895,7 @@ _postman_monitor_commands() {
808
895
 
809
896
  _postman_monitor_run() {
810
897
  _arguments \
811
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
898
+ '--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)"' \
812
899
  '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
813
900
  '(-t --timeout)'{-t,--timeout}'[Maximum wait time for run completion in milliseconds (default\: 15 minutes) (default\: 900000)]:ms' \
814
901
  '--async[Submit the run and return immediately with its job id and Postman URL, without waiting for completion]' \
@@ -821,14 +908,14 @@ _postman_monitor_create() {
821
908
  _arguments \
822
909
  '(-c --collection)'{-c,--collection}'[Collection to monitor -- accepts the id shown in the Postman app, prefixed or bare]:id' \
823
910
  '--name[Monitor name (defaults to the linked collection'\''s own name)]:name' \
824
- '--environment[Environment to run the monitored collection with]:id' \
911
+ '(-e --environment)'{-e,--environment}'[Environment to run the monitored collection with]:id' \
825
912
  '(-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' \
826
913
  '--schedule[Cron expression for the monitor'\''s schedule]:cron' \
827
- '--timezone[Time zone for --schedule, e.g. America/New_York (defaults to the host machine'\''s own zone)]:tz' \
914
+ '--timezone[Time zone for --schedule, for example America/New_York (defaults to the host machine'\''s own zone)]:tz' \
828
915
  '--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' \
829
916
  '--notify-email[Email to notify on a run failure or error (repeatable) (default\: \[\])]:email' \
830
- '--notification-limit[Cap consecutive notifications before they are muted (service range\: 1-99)]:n' \
831
- '--retry[Retries on a failed run (service caps this at 2)]:n' \
917
+ '--notification-limit[Consecutive failure notifications to send before muting them]:n' \
918
+ '--retry[Times to retry a failed run]:n' \
832
919
  '--timeout[Request timeout in milliseconds]:ms' \
833
920
  '--delay[Delay between requests in milliseconds]:ms' \
834
921
  '--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
@@ -838,9 +925,9 @@ _postman_monitor_create() {
838
925
  '--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
839
926
  '--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
840
927
  '--iteration-count[Number of iterations to run]:n' \
841
- '--iteration-strategy[How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
928
+ '--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' \
842
929
  '--no-run-now[Do not trigger an immediate run after creating the monitor]' \
843
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
930
+ '--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)"' \
844
931
  '--json[Output as JSON instead of a table]' \
845
932
  '(-h --help)'{-h,--help}'[display help for command]'
846
933
  }
@@ -849,12 +936,14 @@ _postman_monitor_update() {
849
936
  _arguments \
850
937
  '--name[New monitor name]:name' \
851
938
  '--schedule[New cron expression for the monitor'\''s schedule]:cron' \
852
- '--timezone[Time zone for --schedule, e.g. America/New_York (defaults to the host machine'\''s own zone)]:tz' \
939
+ '--timezone[Time zone for --schedule, for example America/New_York (defaults to the host machine'\''s own zone)]:tz' \
853
940
  '--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' \
854
941
  '--notify-email[Email to notify on a run failure or error (repeatable; replaces the current list) (default\: \[\])]:email' \
855
942
  '--clear-notifications[Remove every notification recipient]' \
856
- '--notification-limit[Cap consecutive notifications before they are muted (service range\: 1-99)]:n' \
857
- '--retry[Retries on a failed run (service caps this at 2)]:n' \
943
+ '(-e --environment)'{-e,--environment}'[Environment to run the monitored collection with (replaces the current one)]:id' \
944
+ '--clear-environment[Run the monitored collection with no environment]' \
945
+ '--notification-limit[Consecutive failure notifications to send before muting them]:n' \
946
+ '--retry[Times to retry a failed run]:n' \
858
947
  '--timeout[Request timeout in milliseconds]:ms' \
859
948
  '--delay[Delay between requests in milliseconds]:ms' \
860
949
  '--strict-ssl[Fail the run when the target'\''s TLS certificate cannot be verified]' \
@@ -864,8 +953,8 @@ _postman_monitor_update() {
864
953
  '--dataset-id[Dataset to use as iteration data (used together with --dataset-view-id)]:id' \
865
954
  '--dataset-view-id[Dataset view to iterate (used together with --dataset-id)]:id' \
866
955
  '--iteration-count[Number of iterations to run]:n' \
867
- '--iteration-strategy[How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires --iteration-count, --dataset-id and --dataset-view-id)]:strategy' \
868
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
956
+ '--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' \
957
+ '--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)"' \
869
958
  '--json[Output as JSON instead of a table]' \
870
959
  '(-h --help)'{-h,--help}'[display help for command]' \
871
960
  '*:monitorId:'
@@ -874,7 +963,7 @@ _postman_monitor_update() {
874
963
  _postman_monitor_delete() {
875
964
  _arguments \
876
965
  '(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
877
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
966
+ '--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)"' \
878
967
  '--json[Output the outcome, including any failure, as JSON instead of a plain message]' \
879
968
  '(-h --help)'{-h,--help}'[display help for command]' \
880
969
  '*:monitorId:'
@@ -908,9 +997,9 @@ _postman_monitor_jobs_commands() {
908
997
 
909
998
  _postman_monitor_jobs_list() {
910
999
  _arguments \
911
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
912
- '--result[Filter by outcome, e.g. success, failure, error, abort (server-validated, not a fixed list)]:value' \
913
- '--trigger[Filter by trigger, e.g. api, schedule, webhook, postman-cli (server-validated, not a fixed list)]:value' \
1000
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1001
+ '--result[Filter by outcome, for example success, failure, error or abort]:value' \
1002
+ '--trigger[Filter by trigger, for example api, schedule, webhook or postman-cli]:value' \
914
1003
  '--since[Only jobs that finished at or after this ISO 8601 date-time]:dateTime' \
915
1004
  '--limit[Maximum number of jobs to return]:n' \
916
1005
  '--cursor[Opaque pagination cursor]:token' \
@@ -921,7 +1010,7 @@ _postman_monitor_jobs_list() {
921
1010
 
922
1011
  _postman_monitor_jobs_get() {
923
1012
  _arguments \
924
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1013
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
925
1014
  '--json[Output as JSON instead of a table]' \
926
1015
  '(-h --help)'{-h,--help}'[display help for command]' \
927
1016
  '*:jobId:'
@@ -953,8 +1042,8 @@ _postman_monitor_runs_commands() {
953
1042
 
954
1043
  _postman_monitor_runs_get() {
955
1044
  _arguments \
956
- '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
957
- '--attempt[Which attempt of the run to show, counting from 0 (default\: the latest)]:n' \
1045
+ '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1046
+ '--attempt[Which attempt of the run to show, where 0 is the first (default\: the most recent)]:n' \
958
1047
  '--failed-only[Show only failed assertions]' \
959
1048
  '--json[Output as JSON instead of a table]' \
960
1049
  '(-h --help)'{-h,--help}'[display help for command]' \
@@ -963,18 +1052,17 @@ _postman_monitor_runs_get() {
963
1052
 
964
1053
  _postman_monitor_list() {
965
1054
  _arguments \
966
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1055
+ '--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)"' \
967
1056
  '(-w --workspace)'{-w,--workspace}'[Filter to monitors in this workspace]:id' \
968
1057
  '(-c --collection)'{-c,--collection}'[Filter to monitors on this collection]:id' \
969
- '--environment[Filter to monitors on this environment]:id' \
970
- '--runner[Filter to a Self-Hosted Runner ID (not a Postman Region). Cannot be combined with --workspace, --collection, --environment, --owner, --team or --active.]:id' \
1058
+ '(-e --environment)'{-e,--environment}'[Filter to monitors on this environment]:id' \
1059
+ '--runner[Filter to a self-hosted runner id, not a Postman region. Cannot be combined with --workspace, --collection, --environment, --owner, --team or --active]:id' \
971
1060
  '--owner[Filter to monitors created by this user id (shown in the Owner column)]:id' \
972
1061
  '--team[Filter to monitors owned by your own team]' \
973
1062
  '--active[Filter by active state]:true|false' \
974
- '--limit[Max monitors to return. The service caps page size and rejects a value above it with its own error.]:n' \
975
- '--offset[Not supported\: the service accepts this parameter and silently ignores it. Refused locally. Use --cursor instead.]:n' \
976
- '--cursor[Pagination cursor from a previous page'\''s response.]:token' \
977
- '--columns[Comma-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available\: State, Notifications, Environment, Runners.]:names' \
1063
+ '--limit[Maximum number of monitors to return (Postman caps the page size and rejects a larger value)]:n' \
1064
+ '--cursor[Pagination cursor from a previous page'\''s response]:token' \
1065
+ '--columns[Comma-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available\: State, Notifications, Environment, Runners]:names' \
978
1066
  '--no-headers[Omit the header row]' \
979
1067
  '(-f --filter)'{-f,--filter}'[Show only monitors whose name contains this text (applies to the returned page, case-insensitive)]:text' \
980
1068
  '--sort[Sort the returned page by "name" or "active"]:field' \
@@ -984,7 +1072,7 @@ _postman_monitor_list() {
984
1072
 
985
1073
  _postman_monitor_get() {
986
1074
  _arguments \
987
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1075
+ '--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)"' \
988
1076
  '--json[Output as JSON instead of a table]' \
989
1077
  '(-h --help)'{-h,--help}'[display help for command]' \
990
1078
  '*:monitorId:'
@@ -992,11 +1080,11 @@ _postman_monitor_get() {
992
1080
 
993
1081
  _postman_monitor_metrics() {
994
1082
  _arguments \
995
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
996
- '--since[Only executions at or after this ISO 8601 date-time. Defaults to 7 days ago.]:dateTime' \
997
- '--until[Only executions at or before this ISO 8601 date-time. Defaults to now.]:dateTime' \
1083
+ '--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)"' \
1084
+ '--since[Only executions at or after this ISO 8601 date-time (defaults to 7 days ago)]:dateTime' \
1085
+ '--until[Only executions at or before this ISO 8601 date-time (defaults to now)]:dateTime' \
998
1086
  '(-f --filter)'{-f,--filter}'[Show only requests whose name contains this text (case-insensitive)]:text' \
999
- '--limit[Cap the number of rows shown\: executions (newest first) under --json, or table rows (worst-behaving request first) otherwise. Not honoured by the service -- there is no server-side pagination on this route.]:n' \
1087
+ '--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' \
1000
1088
  '--json[Output as JSON instead of a table]' \
1001
1089
  '(-h --help)'{-h,--help}'[display help for command]' \
1002
1090
  '*:monitorId:'
@@ -1004,7 +1092,7 @@ _postman_monitor_metrics() {
1004
1092
 
1005
1093
  _postman_monitor_pause() {
1006
1094
  _arguments \
1007
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1095
+ '--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)"' \
1008
1096
  '--json[Output as JSON instead of a table]' \
1009
1097
  '(-h --help)'{-h,--help}'[display help for command]' \
1010
1098
  '*:monitorId:'
@@ -1012,7 +1100,7 @@ _postman_monitor_pause() {
1012
1100
 
1013
1101
  _postman_monitor_resume() {
1014
1102
  _arguments \
1015
- '--api-key[Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1103
+ '--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)"' \
1016
1104
  '--json[Output as JSON instead of a table]' \
1017
1105
  '(-h --help)'{-h,--help}'[display help for command]' \
1018
1106
  '*:monitorId:'
@@ -1032,6 +1120,7 @@ _postman_workspace() {
1032
1120
  prepare) _postman_workspace_prepare ;;
1033
1121
  push) _postman_workspace_push ;;
1034
1122
  lint) _postman_workspace_lint ;;
1123
+ get) _postman_workspace_get ;;
1035
1124
  create) _postman_workspace_create ;;
1036
1125
  pull) _postman_workspace_pull ;;
1037
1126
  connect-git) _postman_workspace_connect_git ;;
@@ -1048,6 +1137,7 @@ _postman_workspace_commands() {
1048
1137
  'prepare:Prepare local collections and environments for push by validating and regenerating IDs if needed.'
1049
1138
  'push:Push local workspace entities (collections, environments, specifications, mocks and more) to Postman workspace.'
1050
1139
  'lint:Lint the current local Postman workspace\: its configuration (.postman/resources.yaml) plus every discovered entity. Use --meta to lint only the configuration.'
1140
+ 'get:Read a workspace'\''s metadata, and optionally the ids of what it holds.'
1051
1141
  'create:Create a Postman workspace and bind it to this git repository.'
1052
1142
  'pull:Pull workspace entities from a Postman workspace into the local git-native folder.'
1053
1143
  'connect-git:Connect a Postman workspace to a local git repository.'
@@ -1093,11 +1183,22 @@ _postman_workspace_lint() {
1093
1183
  '(-h --help)'{-h,--help}'[display help for command]'
1094
1184
  }
1095
1185
 
1186
+ _postman_workspace_get() {
1187
+ _arguments \
1188
+ '--elements[Also report the resources the workspace holds.]' \
1189
+ '--json[Print the workspace as machine-readable JSON.]' \
1190
+ '--timeout[Milliseconds to wait for the API (default 30000).]:ms' \
1191
+ '(-h --help)'{-h,--help}'[display help for command]' \
1192
+ '*:id:'
1193
+ }
1194
+
1096
1195
  _postman_workspace_create() {
1097
1196
  _arguments \
1098
- '--visibility[Required. Workspace visibility, e.g. personal or team]:status' \
1197
+ '--visibility[Required. One of\: personal, private, team, public, partner.]:status' \
1099
1198
  '--name[Workspace name (defaults to owner/repo from the git remote)]:name' \
1100
1199
  '--summary[Optional workspace summary]:text' \
1200
+ '--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' \
1201
+ '--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' \
1101
1202
  '--path[Directory to bind (defaults to the current directory)]:dir:_files -g "*.json"' \
1102
1203
  '--no-connect[Create the workspace without binding it to the repository]' \
1103
1204
  '--force[Create even when a workspace is already recorded for this repo]' \
@@ -1132,6 +1233,38 @@ _postman_workspace_diff() {
1132
1233
  '*:workspaceId:'
1133
1234
  }
1134
1235
 
1236
+ _postman_team() {
1237
+ local context state state_descr line
1238
+ typeset -A opt_args
1239
+ _arguments -C \
1240
+ '(-h --help)'{-h,--help}'[display help for command]' \
1241
+ '1: :_postman_team_commands' \
1242
+ '*::arg:->args'
1243
+ case $state in
1244
+ args)
1245
+ case $words[1] in
1246
+ list) _postman_team_list ;;
1247
+ esac
1248
+ ;;
1249
+ esac
1250
+ }
1251
+
1252
+ _postman_team_commands() {
1253
+ local -a sub
1254
+ sub=(
1255
+ 'list:List the teams inside your organisation.'
1256
+ )
1257
+ _describe -t commands 'team command' sub
1258
+ }
1259
+
1260
+ _postman_team_list() {
1261
+ _arguments \
1262
+ '--can-create-workspace[Only list teams you could create a workspace in.]' \
1263
+ '--json[Print the list as machine-readable JSON.]' \
1264
+ '--timeout[Abort the run after this many milliseconds. Defaults to 30000.]:ms' \
1265
+ '(-h --help)'{-h,--help}'[display help for command]'
1266
+ }
1267
+
1135
1268
  _postman_performance() {
1136
1269
  local context state state_descr line
1137
1270
  typeset -A opt_args
@@ -1143,7 +1276,7 @@ _postman_performance() {
1143
1276
  args)
1144
1277
  case $words[1] in
1145
1278
  run) _postman_performance_run ;;
1146
- runs) _postman_performance_runs ;;
1279
+ list) _postman_performance_list ;;
1147
1280
  esac
1148
1281
  ;;
1149
1282
  esac
@@ -1153,7 +1286,7 @@ _postman_performance_commands() {
1153
1286
  local -a sub
1154
1287
  sub=(
1155
1288
  'run:Run a performance test on a collection'
1156
- 'runs:List past performance runs for a collection, newest first.'
1289
+ 'list:List past performance runs for a collection, newest first.'
1157
1290
  )
1158
1291
  _describe -t commands 'performance command' sub
1159
1292
  }
@@ -1172,6 +1305,7 @@ _postman_performance_run() {
1172
1305
  '--dataset-view-id[Dataset view to execute for iteration data (requires --dataset-id)]:id' \
1173
1306
  '--dataset-distribution[How rows map to VUs\: round-robin (default), fixed, random]:strategy' \
1174
1307
  '--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' \
1308
+ '--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' \
1175
1309
  '--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' \
1176
1310
  '--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' \
1177
1311
  '--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' \
@@ -1179,7 +1313,7 @@ _postman_performance_run() {
1179
1313
  '*:collectionId:_files -g "*.json"'
1180
1314
  }
1181
1315
 
1182
- _postman_performance_runs() {
1316
+ _postman_performance_list() {
1183
1317
  _arguments \
1184
1318
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID whose performance runs to list]:id' \
1185
1319
  '--cursor[Pagination cursor from a previous page'\''s response]:token' \
@@ -1743,29 +1877,29 @@ _postman_simulate_run() {
1743
1877
  '*:filepath:_files -g "*.json"'
1744
1878
  }
1745
1879
 
1746
- _postman_context() {
1880
+ _postman_describe() {
1747
1881
  local context state state_descr line
1748
1882
  typeset -A opt_args
1749
1883
  _arguments -C \
1750
1884
  '(-h --help)'{-h,--help}'[display help for command]' \
1751
- '1: :_postman_context_commands' \
1885
+ '1: :_postman_describe_commands' \
1752
1886
  '*::arg:->args'
1753
1887
  case $state in
1754
1888
  args)
1755
1889
  case $words[1] in
1756
- instructions) _postman_context_instructions ;;
1757
- collection) _postman_context_collection ;;
1758
- request) _postman_context_request ;;
1759
- folder) _postman_context_folder ;;
1760
- response) _postman_context_response ;;
1761
- workspace) _postman_context_workspace ;;
1762
- environment) _postman_context_environment ;;
1890
+ instructions) _postman_describe_instructions ;;
1891
+ collection) _postman_describe_collection ;;
1892
+ request) _postman_describe_request ;;
1893
+ folder) _postman_describe_folder ;;
1894
+ response) _postman_describe_response ;;
1895
+ workspace) _postman_describe_workspace ;;
1896
+ environment) _postman_describe_environment ;;
1763
1897
  esac
1764
1898
  ;;
1765
1899
  esac
1766
1900
  }
1767
1901
 
1768
- _postman_context_commands() {
1902
+ _postman_describe_commands() {
1769
1903
  local -a sub
1770
1904
  sub=(
1771
1905
  'instructions:Get agent instructions for using Postman Context with AI coding agents.'
@@ -1776,32 +1910,32 @@ _postman_context_commands() {
1776
1910
  'workspace:Workspace commands'
1777
1911
  'environment:Environment commands'
1778
1912
  )
1779
- _describe -t commands 'context command' sub
1913
+ _describe -t commands 'describe command' sub
1780
1914
  }
1781
1915
 
1782
- _postman_context_instructions() {
1916
+ _postman_describe_instructions() {
1783
1917
  _arguments \
1784
1918
  '(-h --help)'{-h,--help}'[display help for command]' \
1785
1919
  '*:topic:'
1786
1920
  }
1787
1921
 
1788
- _postman_context_collection() {
1922
+ _postman_describe_collection() {
1789
1923
  local context state state_descr line
1790
1924
  typeset -A opt_args
1791
1925
  _arguments -C \
1792
1926
  '(-h --help)'{-h,--help}'[display help for command]' \
1793
- '1: :_postman_context_collection_commands' \
1927
+ '1: :_postman_describe_collection_commands' \
1794
1928
  '*::arg:->args'
1795
1929
  case $state in
1796
1930
  args)
1797
1931
  case $words[1] in
1798
- get) _postman_context_collection_get ;;
1932
+ get) _postman_describe_collection_get ;;
1799
1933
  esac
1800
1934
  ;;
1801
1935
  esac
1802
1936
  }
1803
1937
 
1804
- _postman_context_collection_commands() {
1938
+ _postman_describe_collection_commands() {
1805
1939
  local -a sub
1806
1940
  sub=(
1807
1941
  'get:Get a collection'\''s metadata and a map of its folders and requests. Returns collection info (name, description, variables, auth) plus a recursive tree of folders and requests.'
@@ -1809,30 +1943,30 @@ _postman_context_collection_commands() {
1809
1943
  _describe -t commands 'collection command' sub
1810
1944
  }
1811
1945
 
1812
- _postman_context_collection_get() {
1946
+ _postman_describe_collection_get() {
1813
1947
  _arguments \
1814
1948
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID]:id' \
1815
1949
  '(-h --help)'{-h,--help}'[display help for command]'
1816
1950
  }
1817
1951
 
1818
- _postman_context_request() {
1952
+ _postman_describe_request() {
1819
1953
  local context state state_descr line
1820
1954
  typeset -A opt_args
1821
1955
  _arguments -C \
1822
1956
  '(-h --help)'{-h,--help}'[display help for command]' \
1823
- '1: :_postman_context_request_commands' \
1957
+ '1: :_postman_describe_request_commands' \
1824
1958
  '*::arg:->args'
1825
1959
  case $state in
1826
1960
  args)
1827
1961
  case $words[1] in
1828
- get) _postman_context_request_get ;;
1829
- context) _postman_context_request_context ;;
1962
+ get) _postman_describe_request_get ;;
1963
+ context) _postman_describe_request_context ;;
1830
1964
  esac
1831
1965
  ;;
1832
1966
  esac
1833
1967
  }
1834
1968
 
1835
- _postman_context_request_commands() {
1969
+ _postman_describe_request_commands() {
1836
1970
  local -a sub
1837
1971
  sub=(
1838
1972
  'get:Get a request from a collection'
@@ -1841,37 +1975,37 @@ _postman_context_request_commands() {
1841
1975
  _describe -t commands 'request command' sub
1842
1976
  }
1843
1977
 
1844
- _postman_context_request_get() {
1978
+ _postman_describe_request_get() {
1845
1979
  _arguments \
1846
1980
  '(-r --request-id)'{-r,--request-id}'[Request ID]:id' \
1847
1981
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID]:id' \
1848
1982
  '(-h --help)'{-h,--help}'[display help for command]'
1849
1983
  }
1850
1984
 
1851
- _postman_context_request_context() {
1985
+ _postman_describe_request_context() {
1852
1986
  _arguments \
1853
1987
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID]:id' \
1854
1988
  '(-r --request-id)'{-r,--request-id}'[Request ID]:id' \
1855
1989
  '(-h --help)'{-h,--help}'[display help for command]'
1856
1990
  }
1857
1991
 
1858
- _postman_context_folder() {
1992
+ _postman_describe_folder() {
1859
1993
  local context state state_descr line
1860
1994
  typeset -A opt_args
1861
1995
  _arguments -C \
1862
1996
  '(-h --help)'{-h,--help}'[display help for command]' \
1863
- '1: :_postman_context_folder_commands' \
1997
+ '1: :_postman_describe_folder_commands' \
1864
1998
  '*::arg:->args'
1865
1999
  case $state in
1866
2000
  args)
1867
2001
  case $words[1] in
1868
- get) _postman_context_folder_get ;;
2002
+ get) _postman_describe_folder_get ;;
1869
2003
  esac
1870
2004
  ;;
1871
2005
  esac
1872
2006
  }
1873
2007
 
1874
- _postman_context_folder_commands() {
2008
+ _postman_describe_folder_commands() {
1875
2009
  local -a sub
1876
2010
  sub=(
1877
2011
  'get:Get a folder from a collection'
@@ -1879,30 +2013,30 @@ _postman_context_folder_commands() {
1879
2013
  _describe -t commands 'folder command' sub
1880
2014
  }
1881
2015
 
1882
- _postman_context_folder_get() {
2016
+ _postman_describe_folder_get() {
1883
2017
  _arguments \
1884
2018
  '--folder-id[Folder ID]:id' \
1885
2019
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID]:id' \
1886
2020
  '(-h --help)'{-h,--help}'[display help for command]'
1887
2021
  }
1888
2022
 
1889
- _postman_context_response() {
2023
+ _postman_describe_response() {
1890
2024
  local context state state_descr line
1891
2025
  typeset -A opt_args
1892
2026
  _arguments -C \
1893
2027
  '(-h --help)'{-h,--help}'[display help for command]' \
1894
- '1: :_postman_context_response_commands' \
2028
+ '1: :_postman_describe_response_commands' \
1895
2029
  '*::arg:->args'
1896
2030
  case $state in
1897
2031
  args)
1898
2032
  case $words[1] in
1899
- get) _postman_context_response_get ;;
2033
+ get) _postman_describe_response_get ;;
1900
2034
  esac
1901
2035
  ;;
1902
2036
  esac
1903
2037
  }
1904
2038
 
1905
- _postman_context_response_commands() {
2039
+ _postman_describe_response_commands() {
1906
2040
  local -a sub
1907
2041
  sub=(
1908
2042
  'get:Get a saved response example from a collection'
@@ -1910,7 +2044,7 @@ _postman_context_response_commands() {
1910
2044
  _describe -t commands 'response command' sub
1911
2045
  }
1912
2046
 
1913
- _postman_context_response_get() {
2047
+ _postman_describe_response_get() {
1914
2048
  _arguments \
1915
2049
  '--id[Response ID]:id' \
1916
2050
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID]:id' \
@@ -1918,23 +2052,23 @@ _postman_context_response_get() {
1918
2052
  '(-h --help)'{-h,--help}'[display help for command]'
1919
2053
  }
1920
2054
 
1921
- _postman_context_workspace() {
2055
+ _postman_describe_workspace() {
1922
2056
  local context state state_descr line
1923
2057
  typeset -A opt_args
1924
2058
  _arguments -C \
1925
2059
  '(-h --help)'{-h,--help}'[display help for command]' \
1926
- '1: :_postman_context_workspace_commands' \
2060
+ '1: :_postman_describe_workspace_commands' \
1927
2061
  '*::arg:->args'
1928
2062
  case $state in
1929
2063
  args)
1930
2064
  case $words[1] in
1931
- get) _postman_context_workspace_get ;;
2065
+ get) _postman_describe_workspace_get ;;
1932
2066
  esac
1933
2067
  ;;
1934
2068
  esac
1935
2069
  }
1936
2070
 
1937
- _postman_context_workspace_commands() {
2071
+ _postman_describe_workspace_commands() {
1938
2072
  local -a sub
1939
2073
  sub=(
1940
2074
  'get:Get a workspace by ID'
@@ -1942,29 +2076,29 @@ _postman_context_workspace_commands() {
1942
2076
  _describe -t commands 'workspace command' sub
1943
2077
  }
1944
2078
 
1945
- _postman_context_workspace_get() {
2079
+ _postman_describe_workspace_get() {
1946
2080
  _arguments \
1947
2081
  '(-w --workspace-id)'{-w,--workspace-id}'[Workspace ID]:id' \
1948
2082
  '(-h --help)'{-h,--help}'[display help for command]'
1949
2083
  }
1950
2084
 
1951
- _postman_context_environment() {
2085
+ _postman_describe_environment() {
1952
2086
  local context state state_descr line
1953
2087
  typeset -A opt_args
1954
2088
  _arguments -C \
1955
2089
  '(-h --help)'{-h,--help}'[display help for command]' \
1956
- '1: :_postman_context_environment_commands' \
2090
+ '1: :_postman_describe_environment_commands' \
1957
2091
  '*::arg:->args'
1958
2092
  case $state in
1959
2093
  args)
1960
2094
  case $words[1] in
1961
- get) _postman_context_environment_get ;;
2095
+ get) _postman_describe_environment_get ;;
1962
2096
  esac
1963
2097
  ;;
1964
2098
  esac
1965
2099
  }
1966
2100
 
1967
- _postman_context_environment_commands() {
2101
+ _postman_describe_environment_commands() {
1968
2102
  local -a sub
1969
2103
  sub=(
1970
2104
  'get:Get a single environment by ID'
@@ -1972,7 +2106,7 @@ _postman_context_environment_commands() {
1972
2106
  _describe -t commands 'environment command' sub
1973
2107
  }
1974
2108
 
1975
- _postman_context_environment_get() {
2109
+ _postman_describe_environment_get() {
1976
2110
  _arguments \
1977
2111
  '(-e --environment-id)'{-e,--environment-id}'[Environment ID]:id' \
1978
2112
  '(-h --help)'{-h,--help}'[display help for command]'
@@ -2316,6 +2450,7 @@ _postman_dataset() {
2316
2450
  delete) _postman_dataset_delete ;;
2317
2451
  source) _postman_dataset_source ;;
2318
2452
  view) _postman_dataset_view ;;
2453
+ jdbc) _postman_dataset_jdbc ;;
2319
2454
  esac
2320
2455
  ;;
2321
2456
  esac
@@ -2331,6 +2466,7 @@ _postman_dataset_commands() {
2331
2466
  'delete:Permanently remove a dataset\: a local .dataset.yaml or a cloud dataset id.'
2332
2467
  'source:Inspect and manage a dataset'\''s datasources.'
2333
2468
  'view:Inspect and manage saved views on a dataset.'
2469
+ 'jdbc:Inspect JDBC drivers before attaching one to a dataset.'
2334
2470
  )
2335
2471
  _describe -t commands 'dataset command' sub
2336
2472
  }
@@ -2400,6 +2536,7 @@ _postman_dataset_source() {
2400
2536
  add) _postman_dataset_source_add ;;
2401
2537
  remove) _postman_dataset_source_remove ;;
2402
2538
  update) _postman_dataset_source_update ;;
2539
+ test) _postman_dataset_source_test ;;
2403
2540
  esac
2404
2541
  ;;
2405
2542
  esac
@@ -2412,6 +2549,7 @@ _postman_dataset_source_commands() {
2412
2549
  'add:Add a datasource to a dataset.'
2413
2550
  'remove:Remove a datasource from a dataset (local YAML path or cloud id).'
2414
2551
  'update:Update fields on an existing datasource. Only the flags you provide are changed.'
2552
+ 'test:Open and close a real connection using a source'\''s stored configuration.'
2415
2553
  )
2416
2554
  _describe -t commands 'source command' sub
2417
2555
  }
@@ -2430,15 +2568,28 @@ _postman_dataset_source_add() {
2430
2568
  '(-n --name)'{-n,--name}'[Logical name for the source (becomes the SQL table name)]:name' \
2431
2569
  '--source-id[Override the generated source id (local dataset only)]:uuid' \
2432
2570
  '--format[Use this format instead of extension/type inference; file contents are not sniffed]:csv|json|mysql|postgres|sqlserver' \
2433
- '--type[Source kind; local is inferred when --file is provided]:local|mysql|postgresql|sqlserver' \
2571
+ '--type[Source kind; local is inferred from --file, jdbc from --driver-jar]:local|mysql|postgresql|sqlserver|jdbc' \
2434
2572
  '--file[Path to a local CSV/JSON file (absolute or cwd-relative)]:path:_files -g "*.json"' \
2435
2573
  '--ref-only[Reference the file in place; do NOT copy into data_dir (local dataset)]' \
2436
2574
  '--force[When copying, overwrite an existing file at the destination (local dataset)]' \
2437
2575
  '--upload[Cloud dataset only\: upload --file as a postmancloudfile source (runs via /exec). Without --upload, --file is registered as a local_filesystem csv/json source read by the local engine.]' \
2576
+ '--driver-jar[JDBC driver JAR(s). Repeatable, or pass several after one flag]:path...:_files -g "*.json"' \
2577
+ '--driver-class[Driver class. Auto-resolved when the JAR contains exactly one]:fqcn' \
2578
+ '--driver-name[Label for this driver type (defaults to the JAR filename)]:label' \
2579
+ '--url-template[JDBC URL with {{placeholders}}, e.g. jdbc\:postgresql\://{{host}}\:{{port}}/{{database}}]:template' \
2580
+ '--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...' \
2581
+ '--prop[Driver connection property. Repeatable. Same vault\: syntax as --var]:name=value...' \
2582
+ '--vars-file[JSON object of --var values; "-" reads stdin. Supports {"$vaultId"\:..,"$secretId"\:..} objects, and keeps secrets out of argv entirely]:path:_files -g "*.json"' \
2583
+ '--from-source[Reuse another source'\''s driver JAR, class and URL template]:name' \
2584
+ '--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"' \
2585
+ '--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]' \
2586
+ '--ssh-target-host-variable[Template variable holding the tunnelled host (inferred when omitted)]:name' \
2587
+ '--ssh-target-port-variable[Template variable holding the tunnelled port (inferred when omitted)]:name' \
2588
+ '--json[Emit the result as JSON instead of prose]' \
2438
2589
  '--host[DB host (mysql/postgresql/sqlserver)]:host' \
2439
2590
  '--port[DB port (defaults to 1433 for sqlserver)]:port' \
2440
- '--user[DB user (warning\: stored as plaintext in the YAML).]:user' \
2441
- '--password[DB password. WARNING\: passing it here exposes it in `ps` output and shell history, and it is stored as plaintext in the dataset YAML (local) or sent in the request body (cloud). Prefer a restricted DB user; secure input (prompt / stdin / env) is planned.]:password' \
2591
+ '--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' \
2592
+ '--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' \
2442
2593
  '--database[DB database name]:db' \
2443
2594
  '--table[DB table name (required for sqlserver)]:table' \
2444
2595
  '--ssh-host[SSH bastion host]:host' \
@@ -2476,10 +2627,22 @@ _postman_dataset_source_update() {
2476
2627
  '--file[Replace the source file (local dataset only; cloud file replacement is unsupported)]:path:_files -g "*.json"' \
2477
2628
  '--ref-only[With --file, reference in place instead of copying (local dataset only)]' \
2478
2629
  '--force[With --file, overwrite the copied destination (local dataset only)]' \
2630
+ '--driver-jar[Replace the JDBC driver JAR(s)]:path...:_files -g "*.json"' \
2631
+ '--driver-class[Replace the JDBC driver class]:fqcn' \
2632
+ '--driver-name[Rename the JDBC driver type label]:label' \
2633
+ '--url-template[Replace the JDBC URL template]:template' \
2634
+ '--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...' \
2635
+ '--prop[Set a JDBC connection property. Merges, same vault\: syntax]:name=value...' \
2636
+ '--unset-var[Remove a JDBC template variable. Merging alone can never remove a key]:name...' \
2637
+ '--unset-prop[Remove a JDBC connection property]:name...' \
2638
+ '--vars-file[JSON object of --var values; "-" reads stdin]:path:_files -g "*.json"' \
2639
+ '--ssh-target-host-variable[Template variable holding the tunnelled host (JDBC)]:name' \
2640
+ '--ssh-target-port-variable[Template variable holding the tunnelled port (JDBC)]:name' \
2641
+ '--java-path[Java runtime for JDBC operations. Machine-local only]:path:_files -g "*.json"' \
2479
2642
  '--host[Update DB host (mysql/postgresql/sqlserver)]:host' \
2480
2643
  '--port[Update DB port]:port' \
2481
- '--user[Update DB user (warning\: stored as plaintext in the YAML).]:user' \
2482
- '--password[Update DB password. WARNING\: passing it here exposes it in `ps` output and shell history, and it is stored as plaintext in the dataset YAML (local) or sent in the request body (cloud). Prefer a restricted DB user; secure input (prompt / stdin / env) is planned.]:password' \
2644
+ '--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' \
2645
+ '--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' \
2483
2646
  '--database[Update DB database name]:db' \
2484
2647
  '--table[Update DB table name]:table' \
2485
2648
  '--ssh-host[Update SSH bastion host]:host' \
@@ -2497,10 +2660,21 @@ _postman_dataset_source_update() {
2497
2660
  '--host-name-in-certificate[Update SQL Server certificate hostname override]:hostname' \
2498
2661
  '--tls-min-version[Update SQL Server minimum TLS version]:1.2|1.3' \
2499
2662
  '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2663
+ '--json[Emit the result as JSON instead of prose]' \
2500
2664
  '(-h --help)'{-h,--help}'[display help for command]' \
2501
2665
  '*:sourceNameOrId:'
2502
2666
  }
2503
2667
 
2668
+ _postman_dataset_source_test() {
2669
+ _arguments \
2670
+ '(-d --dataset)'{-d,--dataset}'[Dataset the source belongs to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
2671
+ '(-n --name)'{-n,--name}'[Source to test]:name' \
2672
+ '--java-path[Java runtime to use for a JDBC source. Machine-local only; also read from POSTMAN_JDBC_JAVA_PATH]:path:_files -g "*.json"' \
2673
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2674
+ '--json[Emit the result as JSON instead of prose]' \
2675
+ '(-h --help)'{-h,--help}'[display help for command]'
2676
+ }
2677
+
2504
2678
  _postman_dataset_view() {
2505
2679
  local context state state_descr line
2506
2680
  typeset -A opt_args
@@ -2557,7 +2731,9 @@ _postman_dataset_view_create() {
2557
2731
  '(-d --dataset)'{-d,--dataset}'[Dataset to add the view to — a local .dataset.yaml path or a cloud dataset id]:datasetPathOrId' \
2558
2732
  '(-n --name)'{-n,--name}'[View name]:name' \
2559
2733
  '(-q --query)'{-q,--query}'[SQL query the view executes]:sql' \
2734
+ '(-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' \
2560
2735
  '--view-id[Override the generated view id (local only; cloud assigns its own)]:uuid' \
2736
+ '--json[Emit the result as JSON instead of prose]' \
2561
2737
  '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2562
2738
  '(-h --help)'{-h,--help}'[display help for command]'
2563
2739
  }
@@ -2580,6 +2756,40 @@ _postman_dataset_view_update() {
2580
2756
  '*:viewNameOrId:'
2581
2757
  }
2582
2758
 
2759
+ _postman_dataset_jdbc() {
2760
+ local context state state_descr line
2761
+ typeset -A opt_args
2762
+ _arguments -C \
2763
+ '(-h --help)'{-h,--help}'[display help for command]' \
2764
+ '1: :_postman_dataset_jdbc_commands' \
2765
+ '*::arg:->args'
2766
+ case $state in
2767
+ args)
2768
+ case $words[1] in
2769
+ inspect) _postman_dataset_jdbc_inspect ;;
2770
+ esac
2771
+ ;;
2772
+ esac
2773
+ }
2774
+
2775
+ _postman_dataset_jdbc_commands() {
2776
+ local -a sub
2777
+ sub=(
2778
+ 'inspect:Detect Java, list driver classes, suggest a URL template and read driver properties.'
2779
+ )
2780
+ _describe -t commands 'jdbc command' sub
2781
+ }
2782
+
2783
+ _postman_dataset_jdbc_inspect() {
2784
+ _arguments \
2785
+ '--driver-class[Introspect this class instead of auto-selecting]:fqcn' \
2786
+ '--url-template[Use this URL template instead of the one inferred from the JAR filename]:template' \
2787
+ '--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"' \
2788
+ '--json[Emit the discovery result as JSON]' \
2789
+ '(-h --help)'{-h,--help}'[display help for command]' \
2790
+ '*:jar...:'
2791
+ }
2792
+
2583
2793
  _postman_dependency() {
2584
2794
  local context state state_descr line
2585
2795
  typeset -A opt_args