postman-cli 1.74.0 → 1.76.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/man/postman.1 +320 -73
- package/package.json +6 -6
package/man/postman.1
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.TH POSTMAN 1 "2026-10-
|
|
1
|
+
.TH POSTMAN 1 "2026-10-22" "v1.76.0" "Postman CLI Manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
postman \- Command\-line companion utility for Postman
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -246,10 +246,8 @@ Exit codes:
|
|
|
246
246
|
3 not current, and \-\-strict was passed
|
|
247
247
|
|
|
248
248
|
States:
|
|
249
|
-
current
|
|
250
|
-
behind
|
|
251
|
-
modified edited locally; update needs \-\-force
|
|
252
|
-
unknown written before init recorded hashes, so not comparable
|
|
249
|
+
current the skills match what is published
|
|
250
|
+
behind skills are missing or out of date \- run `postman skills update`
|
|
253
251
|
|
|
254
252
|
Set POSTMAN_SKILLS_URL to check against a different origin.
|
|
255
253
|
|
|
@@ -351,6 +349,9 @@ Create the collection in a cloud Postman workspace instead of scaffolding it loc
|
|
|
351
349
|
.B \-\-force
|
|
352
350
|
Rewrite the definition of an existing local collection. Existing request files are left alone.
|
|
353
351
|
.TP
|
|
352
|
+
.B \-m, \-\-message <text>
|
|
353
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode (\-\-workspace) only.
|
|
354
|
+
.TP
|
|
354
355
|
.B \-\-verbose
|
|
355
356
|
Verbose output
|
|
356
357
|
.TP
|
|
@@ -460,6 +461,9 @@ Delete without asking for confirmation first
|
|
|
460
461
|
.B \-\-api\-key <key>
|
|
461
462
|
Postman API key, used when deleting a cloud collection
|
|
462
463
|
.TP
|
|
464
|
+
.B \-m, \-\-message <text>
|
|
465
|
+
Short note on why, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud collections only.
|
|
466
|
+
.TP
|
|
463
467
|
.B \-\-verbose
|
|
464
468
|
Verbose output
|
|
465
469
|
.TP
|
|
@@ -630,6 +634,9 @@ Request type: http, graphql, grpc, websocket, socketio. (default: http)
|
|
|
630
634
|
.B \-w, \-\-workspace <id>
|
|
631
635
|
Target a Postman cloud workspace by id (cloud mode).
|
|
632
636
|
.TP
|
|
637
|
+
.B \-m, \-\-message <text>
|
|
638
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
639
|
+
.TP
|
|
633
640
|
.B \-\-json
|
|
634
641
|
JSON output.
|
|
635
642
|
|
|
@@ -729,6 +736,9 @@ Target a Postman cloud workspace by id (cloud mode).
|
|
|
729
736
|
.B \-\-type <type>
|
|
730
737
|
Request type for cloud mode: http, graphql, grpc, websocket, socketio. (default: http)
|
|
731
738
|
.TP
|
|
739
|
+
.B \-m, \-\-message <text>
|
|
740
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
741
|
+
.TP
|
|
732
742
|
.B \-\-json
|
|
733
743
|
JSON output.
|
|
734
744
|
|
|
@@ -766,6 +776,9 @@ Target a Postman cloud workspace by id (cloud mode).
|
|
|
766
776
|
.B \-\-type <type>
|
|
767
777
|
Request type for cloud mode: http, graphql, grpc, websocket, socketio. (default: http)
|
|
768
778
|
.TP
|
|
779
|
+
.B \-m, \-\-message <text>
|
|
780
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
781
|
+
.TP
|
|
769
782
|
.B \-\-json
|
|
770
783
|
JSON output.
|
|
771
784
|
|
|
@@ -817,6 +830,9 @@ Parent folder within the collection, e.g. "Users/Admin". Defaults to the root.
|
|
|
817
830
|
.B \-w, \-\-workspace <id>
|
|
818
831
|
Target a Postman cloud workspace by id (cloud mode).
|
|
819
832
|
.TP
|
|
833
|
+
.B \-m, \-\-message <text>
|
|
834
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
835
|
+
.TP
|
|
820
836
|
.B \-\-json
|
|
821
837
|
JSON output.
|
|
822
838
|
|
|
@@ -892,6 +908,9 @@ Replace folder scripts. event is prerequest or test; script is @file, \- for std
|
|
|
892
908
|
.B \-w, \-\-workspace <id>
|
|
893
909
|
Target a Postman cloud workspace by id (cloud mode).
|
|
894
910
|
.TP
|
|
911
|
+
.B \-m, \-\-message <text>
|
|
912
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
913
|
+
.TP
|
|
895
914
|
.B \-\-json
|
|
896
915
|
JSON output.
|
|
897
916
|
|
|
@@ -927,6 +946,9 @@ Skip the confirmation prompt (required when stdout is not a TTY).
|
|
|
927
946
|
.B \-w, \-\-workspace <id>
|
|
928
947
|
Target a Postman cloud workspace by id (cloud mode).
|
|
929
948
|
.TP
|
|
949
|
+
.B \-m, \-\-message <text>
|
|
950
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
951
|
+
.TP
|
|
930
952
|
.B \-\-json
|
|
931
953
|
JSON output.
|
|
932
954
|
|
|
@@ -987,6 +1009,9 @@ Example type: http (default). (default: http)
|
|
|
987
1009
|
.B \-w, \-\-workspace <id>
|
|
988
1010
|
Target a Postman cloud workspace by id (cloud mode).
|
|
989
1011
|
.TP
|
|
1012
|
+
.B \-m, \-\-message <text>
|
|
1013
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
1014
|
+
.TP
|
|
990
1015
|
.B \-\-json
|
|
991
1016
|
JSON output.
|
|
992
1017
|
|
|
@@ -1063,6 +1088,9 @@ Target a Postman cloud workspace by id (cloud mode).
|
|
|
1063
1088
|
.B \-\-type <type>
|
|
1064
1089
|
Example type for cloud mode: http. (default: http)
|
|
1065
1090
|
.TP
|
|
1091
|
+
.B \-m, \-\-message <text>
|
|
1092
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
1093
|
+
.TP
|
|
1066
1094
|
.B \-\-json
|
|
1067
1095
|
JSON output.
|
|
1068
1096
|
|
|
@@ -1089,6 +1117,9 @@ Target a Postman cloud workspace by id (cloud mode).
|
|
|
1089
1117
|
.B \-\-type <type>
|
|
1090
1118
|
Example type for cloud mode: http. (default: http)
|
|
1091
1119
|
.TP
|
|
1120
|
+
.B \-m, \-\-message <text>
|
|
1121
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
|
|
1122
|
+
.TP
|
|
1092
1123
|
.B \-\-json
|
|
1093
1124
|
JSON output.
|
|
1094
1125
|
|
|
@@ -1362,11 +1393,8 @@ Exports the cookie jar to a file after completing the run
|
|
|
1362
1393
|
.B \-\-verbose
|
|
1363
1394
|
Show detailed information of collection run and each request sent
|
|
1364
1395
|
.TP
|
|
1365
|
-
.B \-\-mock <pathOrId>
|
|
1366
|
-
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).
|
|
1367
|
-
.TP
|
|
1368
1396
|
.B \-\-port <port>
|
|
1369
|
-
Port for the \-\-
|
|
1397
|
+
Port for the \-\-simulation server (e.g. 4010), or "auto" for a free one. Defaults to the configured port. Only valid with \-\-simulation.
|
|
1370
1398
|
.TP
|
|
1371
1399
|
.B \-\-use\-mock <mapping>
|
|
1372
1400
|
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: )
|
|
@@ -1385,8 +1413,8 @@ Do not dispatch run events (results, \-\-simulation start history, and analytics
|
|
|
1385
1413
|
|
|
1386
1414
|
.TP Examples:
|
|
1387
1415
|
Eg. postman collection run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab
|
|
1388
|
-
postman collection run <id> \-\-mock
|
|
1389
|
-
postman collection run <id> \-\-mock 12345678\-90ab\-cdef\-1234\-567890abcdef # a mock in Postman cloud
|
|
1416
|
+
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./postman/mocks/orders" # a mock in your repository
|
|
1417
|
+
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:12345678\-90ab\-cdef\-1234\-567890abcdef" # a mock in Postman cloud
|
|
1390
1418
|
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./mock/config.yaml delay"
|
|
1391
1419
|
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./a.yaml" \-\-use\-mock "api.com mock\-server:9d8e7f6a"
|
|
1392
1420
|
|
|
@@ -2940,6 +2968,9 @@ Lint the current local Postman workspace: its configuration (.postman/resources.
|
|
|
2940
2968
|
.B workspace get
|
|
2941
2969
|
Read a workspace's metadata, and optionally the ids of what it holds.
|
|
2942
2970
|
.TP
|
|
2971
|
+
.B workspace activity
|
|
2972
|
+
Read a workspace's activity feed.
|
|
2973
|
+
.TP
|
|
2943
2974
|
.B workspace create
|
|
2944
2975
|
Create a Postman workspace and bind it to this git repository.
|
|
2945
2976
|
.TP
|
|
@@ -3089,6 +3120,50 @@ Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth.
|
|
|
3089
3120
|
|
|
3090
3121
|
|
|
3091
3122
|
|
|
3123
|
+
.SS "workspace activity"
|
|
3124
|
+
Read a workspace's activity feed.
|
|
3125
|
+
|
|
3126
|
+
.B Usage:
|
|
3127
|
+
[options] [id]
|
|
3128
|
+
|
|
3129
|
+
.B Options:
|
|
3130
|
+
.TP
|
|
3131
|
+
.B \-\-type <types>
|
|
3132
|
+
Comma\-separated element types to filter on, e.g. "api,collection".
|
|
3133
|
+
.TP
|
|
3134
|
+
.B \-\-contributor <ids>
|
|
3135
|
+
Comma\-separated user ids to filter on.
|
|
3136
|
+
.TP
|
|
3137
|
+
.B \-\-cursor <cursor>
|
|
3138
|
+
Fetch the page of entries that follows this cursor.
|
|
3139
|
+
.TP
|
|
3140
|
+
.B \-\-limit <n>
|
|
3141
|
+
Max entries to return.
|
|
3142
|
+
.TP
|
|
3143
|
+
.B \-\-markdown
|
|
3144
|
+
Ask the API for a human\-readable description of each entry.
|
|
3145
|
+
.TP
|
|
3146
|
+
.B \-\-json
|
|
3147
|
+
Print the feed as machine\-readable JSON.
|
|
3148
|
+
.TP
|
|
3149
|
+
.B \-\-timeout <ms>
|
|
3150
|
+
Milliseconds to wait for the API (default 30000).
|
|
3151
|
+
|
|
3152
|
+
.TP Examples:
|
|
3153
|
+
|
|
3154
|
+
Examples:
|
|
3155
|
+
postman workspace activity
|
|
3156
|
+
Reads the current folder's bound workspace
|
|
3157
|
+
postman workspace activity 00a50319\-1262\-49d2\-83e5\-551e3c5dba00
|
|
3158
|
+
postman workspace activity <id> \-\-type api,collection
|
|
3159
|
+
postman workspace activity <id> \-\-contributor <userId>
|
|
3160
|
+
postman workspace activity <id> \-\-markdown
|
|
3161
|
+
postman workspace activity <id> \-\-json
|
|
3162
|
+
|
|
3163
|
+
Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth.
|
|
3164
|
+
|
|
3165
|
+
|
|
3166
|
+
|
|
3092
3167
|
.SS "workspace create"
|
|
3093
3168
|
Create a Postman workspace and bind it to this git repository.
|
|
3094
3169
|
|
|
@@ -3126,8 +3201,9 @@ Print the created workspace as machine\-readable JSON.
|
|
|
3126
3201
|
|
|
3127
3202
|
.TP Examples:
|
|
3128
3203
|
|
|
3129
|
-
Requires a login (`postman login`) or
|
|
3130
|
-
|
|
3204
|
+
Requires a login (`postman login`), POSTMAN_API_KEY, or the guest session
|
|
3205
|
+
`postman init` starts. A guest owns the team it was given, so it can create
|
|
3206
|
+
workspaces in it; `postman signup` claims the account and keeps them.
|
|
3131
3207
|
Refuses to run on CI: create once locally and commit the binding.
|
|
3132
3208
|
|
|
3133
3209
|
Examples:
|
|
@@ -3494,9 +3570,9 @@ Load segments:
|
|
|
3494
3570
|
ramp\-up — 2 segments
|
|
3495
3571
|
|
|
3496
3572
|
peak ┤ _________ at peak __________
|
|
3497
|
-
│ ramp\-up _____
|
|
3498
|
-
│ ______
|
|
3499
|
-
base ┤__ warm\-up ___
|
|
3573
|
+
│ ramp\-up _____/
|
|
3574
|
+
│ ______/
|
|
3575
|
+
base ┤__ warm\-up ___/
|
|
3500
3576
|
└┬─────────────┬─────────────┬───────────────────────────┤ \-\-duration
|
|
3501
3577
|
1 2 (3)
|
|
3502
3578
|
|
|
@@ -3508,10 +3584,10 @@ Load segments:
|
|
|
3508
3584
|
|
|
3509
3585
|
spike — 3 segments · no time at the peak; use \-\-load\-profile peak to hold
|
|
3510
3586
|
|
|
3511
|
-
peak ┤
|
|
3512
|
-
│ ramp\-up _
|
|
3513
|
-
│ _
|
|
3514
|
-
base ┤______ warm\-up _______
|
|
3587
|
+
peak ┤ /\e
|
|
3588
|
+
│ ramp\-up _/ \e_ ramp\-down
|
|
3589
|
+
│ _/ \e_
|
|
3590
|
+
base ┤______ warm\-up _______/ \e______ at base _______
|
|
3515
3591
|
└┬─────────────────────┬─────┬─────┬─────────────────────┤ \-\-duration
|
|
3516
3592
|
1 2 3 (4)
|
|
3517
3593
|
|
|
@@ -3524,9 +3600,9 @@ Load segments:
|
|
|
3524
3600
|
peak — 4 segments
|
|
3525
3601
|
|
|
3526
3602
|
peak ┤ __ hold ___
|
|
3527
|
-
│ ramp\-up ____
|
|
3528
|
-
│ ____
|
|
3529
|
-
base ┤_ warm\-up _
|
|
3603
|
+
│ ramp\-up ____/ \e____ ramp\-down
|
|
3604
|
+
│ ____/ \e____
|
|
3605
|
+
base ┤_ warm\-up _/ \e_ at base __
|
|
3530
3606
|
└┬──────────┬──────────┬──────────┬──────────┬───────────┤ \-\-duration
|
|
3531
3607
|
1 2 3 4 (5)
|
|
3532
3608
|
|
|
@@ -4712,7 +4788,7 @@ Create, run, and manage Postman mocks — in your repository or in Postman cloud
|
|
|
4712
4788
|
.B Subcommands:
|
|
4713
4789
|
.TP
|
|
4714
4790
|
.B mock generate
|
|
4715
|
-
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.
|
|
4791
|
+
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. Add \-\-deploy to also make it a live mock server.
|
|
4716
4792
|
.TP
|
|
4717
4793
|
.B mock run
|
|
4718
4794
|
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).
|
|
@@ -4736,7 +4812,7 @@ Show the requests a live mock server has received and the responses it sent, usi
|
|
|
4736
4812
|
Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.
|
|
4737
4813
|
|
|
4738
4814
|
.SS "mock generate"
|
|
4739
|
-
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.
|
|
4815
|
+
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. Add \-\-deploy to also make it a live mock server.
|
|
4740
4816
|
|
|
4741
4817
|
.B Usage:
|
|
4742
4818
|
[sourcePath] [options]
|
|
@@ -4762,10 +4838,22 @@ Overwrite the mock's files if the target folder already has one
|
|
|
4762
4838
|
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.
|
|
4763
4839
|
.TP
|
|
4764
4840
|
.B \-w, \-\-workspace <id>
|
|
4765
|
-
Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with \-\-output, \-\-force, or \-\-update.
|
|
4841
|
+
Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with \-\-output, \-\-force, or \-\-update, except with \-\-deploy, where it only picks the workspace.
|
|
4842
|
+
.TP
|
|
4843
|
+
.B \-\-deploy
|
|
4844
|
+
After generating, upload the mock to Postman cloud and deploy it to a live mock server (private by default). Uses \-\-workspace, else the workspace linked to this project.
|
|
4845
|
+
.TP
|
|
4846
|
+
.B \-\-public
|
|
4847
|
+
With \-\-deploy, let anyone with the link reach the server (default: callers need an API key)
|
|
4848
|
+
.TP
|
|
4849
|
+
.B \-s, \-\-slug <slug>
|
|
4850
|
+
With \-\-deploy, the short label used in the server's web address
|
|
4851
|
+
.TP
|
|
4852
|
+
.B \-\-json
|
|
4853
|
+
With \-\-deploy, print the live server details as machine\-readable data instead of a summary
|
|
4766
4854
|
.TP
|
|
4767
4855
|
.B \-\-api\-key <key>
|
|
4768
|
-
Postman API key to use with \-\-workspace (defaults to your `postman login` session)
|
|
4856
|
+
Postman API key to use with \-\-workspace or \-\-deploy (defaults to your `postman login` session)
|
|
4769
4857
|
.TP
|
|
4770
4858
|
.B \-x, \-\-suppress\-exit\-code
|
|
4771
4859
|
Always exit with code 0, even on failure
|
|
@@ -4776,6 +4864,8 @@ Eg. postman mock generate ./my\-collection.json
|
|
|
4776
4864
|
postman mock generate \-\-name "My Mock" # sample shopping\-cart mock
|
|
4777
4865
|
postman mock generate \-\-name "My Mock" \-\-port 4010 # sample mock, custom port
|
|
4778
4866
|
postman mock generate ./openapi.yaml \-\-output ./postman/mocks/api \-\-port 4010
|
|
4867
|
+
postman mock generate ./openapi.yaml \-n orders \-\-deploy # generate and get a live URL
|
|
4868
|
+
postman mock generate ./openapi.yaml \-n orders \-\-deploy \-\-json # same, machine\-readable
|
|
4779
4869
|
postman mock generate ./openapi.yaml \-\-stateful # CRUD handlers backed by pm.state
|
|
4780
4870
|
postman mock generate ./my\-collection.json \-\-update ./postman/mocks/orders
|
|
4781
4871
|
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # save to Postman cloud
|
|
@@ -4812,6 +4902,9 @@ Do not record this run in the mock's start history.
|
|
|
4812
4902
|
.B \-\-output <format>
|
|
4813
4903
|
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)
|
|
4814
4904
|
.TP
|
|
4905
|
+
.B \-\-verbose
|
|
4906
|
+
Show request and response headers and bodies for each request. By default each request prints one line, plus any applied scenario or error.
|
|
4907
|
+
.TP
|
|
4815
4908
|
.B \-\-dataset <pathOrDir>
|
|
4816
4909
|
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: )
|
|
4817
4910
|
|
|
@@ -4823,6 +4916,7 @@ Eg. postman mock run 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Pos
|
|
|
4823
4916
|
postman mock run ./postman/mocks/orders \-\-port auto # pick any free port
|
|
4824
4917
|
postman mock run ./postman/mocks/orders \-\-port 4600 # use port 4600 (fails if it is in use)
|
|
4825
4918
|
postman mock run ./postman/mocks/orders \-\-output ndjson # stream machine\-readable events
|
|
4919
|
+
postman mock run ./postman/mocks/orders \-\-verbose # include headers and bodies
|
|
4826
4920
|
postman mock run ./postman/mocks/orders \-\-workspace <id> # record start history for a path run
|
|
4827
4921
|
postman mock run ./postman/mocks/orders \-\-dataset ./postman/datasets/Orders
|
|
4828
4922
|
|
|
@@ -4887,6 +4981,9 @@ Use the defaults and skip all questions (private, no auto\-deploy)
|
|
|
4887
4981
|
.TP
|
|
4888
4982
|
.B \-\-api\-key <key>
|
|
4889
4983
|
Postman API key (defaults to your `postman login` session)
|
|
4984
|
+
.TP
|
|
4985
|
+
.B \-\-json
|
|
4986
|
+
Print the live server details as machine\-readable data instead of a summary (asks no questions)
|
|
4890
4987
|
|
|
4891
4988
|
.TP Examples:
|
|
4892
4989
|
|
|
@@ -5124,6 +5221,12 @@ Dispatch application test run results to the API Catalog and Application Invento
|
|
|
5124
5221
|
.B \-\-no\-report\-events
|
|
5125
5222
|
Do not dispatch run results to the API Catalog and Application Inventory ingestion pipelines
|
|
5126
5223
|
.TP
|
|
5224
|
+
.B \-\-generate\-collection
|
|
5225
|
+
Capture traffic and generate a collection with tests from it, then test with it. Saved to postman.config.cjs only when the target lists no collections.
|
|
5226
|
+
.TP
|
|
5227
|
+
.B \-y, \-\-yes
|
|
5228
|
+
Do not prompt for collection, command, or capture\-plugin setup: generate a collection from test traffic when none is configured, run `npx playwright test` when neither \-\-command nor the config sets a command (Playwright projects only), and install/patch the capture plugin. Workspace setup is unchanged and may still prompt in an interactive terminal.
|
|
5229
|
+
.TP
|
|
5127
5230
|
.B \-\-verbose
|
|
5128
5231
|
Show detailed per\-request matching, sandbox errors, and debug information
|
|
5129
5232
|
|
|
@@ -5142,6 +5245,12 @@ Run results are dispatched to the API Catalog and Application Inventory
|
|
|
5142
5245
|
ingestion pipelines automatically after analysis.
|
|
5143
5246
|
Use \-\-report\-events=false (or \-\-report\-events false) to skip dispatching run results.
|
|
5144
5247
|
|
|
5248
|
+
Outside an interactive terminal (CI, piped input), setup never prompts.
|
|
5249
|
+
With \-\-yes, the collection, command, and capture\-plugin steps do not
|
|
5250
|
+
prompt either. With no command set, `npx playwright test` is used when a
|
|
5251
|
+
playwright.config.* is found. Other missing answers exit with code 2: pass
|
|
5252
|
+
\-\-target\-collection, \-\-generate\-collection, \-\-command, or \-\-yes.
|
|
5253
|
+
|
|
5145
5254
|
Examples:
|
|
5146
5255
|
postman application test \-\-command "npx playwright test"
|
|
5147
5256
|
postman application test \-\-target prod
|
|
@@ -5149,6 +5258,8 @@ Examples:
|
|
|
5149
5258
|
postman application test \-\-target beta \-\-target\-collection api.json \-\-target\-environment staging.json
|
|
5150
5259
|
postman app test \-\-capture\-only \-\-command "npx playwright test"
|
|
5151
5260
|
postman app test \-\-capture\-only \-\-output ./my\-captured\-traffic/
|
|
5261
|
+
postman app test \-\-yes
|
|
5262
|
+
postman app test \-\-generate\-collection \-\-command "npx playwright test"
|
|
5152
5263
|
|
|
5153
5264
|
|
|
5154
5265
|
.SS "application setup\-capture"
|
|
@@ -5161,6 +5272,12 @@ Install postman\-playwright and patch playwright.config.* to capture network tra
|
|
|
5161
5272
|
.TP
|
|
5162
5273
|
.B \-\-config <path>
|
|
5163
5274
|
Path to playwright.config.* to patch (default: auto\-detect)
|
|
5275
|
+
.TP
|
|
5276
|
+
.B \-y, \-\-yes
|
|
5277
|
+
Install and patch without asking for confirmation (required outside an interactive terminal)
|
|
5278
|
+
.TP
|
|
5279
|
+
.B \-\-dry\-run
|
|
5280
|
+
Show the current capture setup and list what would be installed or patched, without changing files
|
|
5164
5281
|
|
|
5165
5282
|
.TP Examples:
|
|
5166
5283
|
|
|
@@ -5171,9 +5288,18 @@ wraps your Playwright config's default export with withPostman().
|
|
|
5171
5288
|
If auto\-patching is not possible (unusual config patterns), the
|
|
5172
5289
|
command prints manual setup steps instead.
|
|
5173
5290
|
|
|
5291
|
+
Outside an interactive terminal (CI, piped input), the command makes
|
|
5292
|
+
no changes and exits with code 2 unless \-\-yes is passed.
|
|
5293
|
+
|
|
5294
|
+
\-\-dry\-run never changes files or prompts, and exits 0 (it takes
|
|
5295
|
+
precedence over \-\-yes).
|
|
5296
|
+
|
|
5174
5297
|
Examples:
|
|
5175
5298
|
postman app setup\-capture
|
|
5176
5299
|
postman app setup\-capture \-\-config apps/api/playwright.config.ts
|
|
5300
|
+
postman app setup\-capture \-\-yes
|
|
5301
|
+
postman app setup\-capture \-\-yes \-\-config apps/api/playwright.config.ts
|
|
5302
|
+
postman app setup\-capture \-\-dry\-run
|
|
5177
5303
|
|
|
5178
5304
|
After setup, run your tests normally:
|
|
5179
5305
|
postman app test
|
|
@@ -5188,7 +5314,7 @@ Create, run and manage simulations — serve several mocks behind one address.
|
|
|
5188
5314
|
.B Subcommands:
|
|
5189
5315
|
.TP
|
|
5190
5316
|
.B simulation create
|
|
5191
|
-
Create a simulation that serves several mocks behind one address
|
|
5317
|
+
Create a simulation that serves several mocks behind one address. Add \-\-deploy to also make it a live mock server.
|
|
5192
5318
|
.TP
|
|
5193
5319
|
.B simulation list
|
|
5194
5320
|
List the simulations in your repository or Postman cloud workspace
|
|
@@ -5215,7 +5341,7 @@ Show the requests a deployed simulation has received and the responses it sent,
|
|
|
5215
5341
|
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.
|
|
5216
5342
|
|
|
5217
5343
|
.SS "simulation create"
|
|
5218
|
-
Create a simulation that serves several mocks behind one address
|
|
5344
|
+
Create a simulation that serves several mocks behind one address. Add \-\-deploy to also make it a live mock server.
|
|
5219
5345
|
|
|
5220
5346
|
.B Usage:
|
|
5221
5347
|
[options]
|
|
@@ -5238,7 +5364,19 @@ Where to save the simulation file in your repository, a file or folder (defaults
|
|
|
5238
5364
|
Overwrite the simulation file if it already exists
|
|
5239
5365
|
.TP
|
|
5240
5366
|
.B \-w, \-\-workspace <id>
|
|
5241
|
-
Postman cloud workspace to create the simulation in, by id (defaults to the workspace already linked to this project)
|
|
5367
|
+
Postman cloud workspace to create the simulation in (or deploy it to, with \-\-deploy), by id (defaults to the workspace already linked to this project)
|
|
5368
|
+
.TP
|
|
5369
|
+
.B \-\-deploy
|
|
5370
|
+
After creating, upload the simulation (and its mocks) to Postman cloud and deploy it to a live mock server (private by default).
|
|
5371
|
+
.TP
|
|
5372
|
+
.B \-\-public
|
|
5373
|
+
With \-\-deploy, let anyone with the link reach the server (default: callers need an API key)
|
|
5374
|
+
.TP
|
|
5375
|
+
.B \-s, \-\-slug <slug>
|
|
5376
|
+
With \-\-deploy, the short label used in the server's web address
|
|
5377
|
+
.TP
|
|
5378
|
+
.B \-\-json
|
|
5379
|
+
With \-\-deploy, print the live server details as machine\-readable data instead of a summary
|
|
5242
5380
|
.TP
|
|
5243
5381
|
.B \-\-api\-key <key>
|
|
5244
5382
|
Postman API key (defaults to your `postman login` session)
|
|
@@ -5249,8 +5387,10 @@ Eg. postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \
|
|
|
5249
5387
|
postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments=payments \-\-routing header
|
|
5250
5388
|
postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-o ./postman/simulations/checkout.sim.yaml
|
|
5251
5389
|
postman simulation create \-n "Checkout" \-w <workspace\-id> \-\-mock <mock\-id>=payments
|
|
5390
|
+
postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-\-deploy # live URL
|
|
5391
|
+
postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-\-deploy \-\-json
|
|
5252
5392
|
|
|
5253
|
-
Local mock paths build a simulation file you serve with `postman simulation run`. Postman mock ids create it in your cloud workspace instead. Use one kind or the other, not both.
|
|
5393
|
+
Local mock paths build a simulation file you serve with `postman simulation run`. Postman mock ids create it in your cloud workspace instead. Use one kind or the other, not both. Add \-\-deploy to upload it and get a live mock server.
|
|
5254
5394
|
|
|
5255
5395
|
|
|
5256
5396
|
.SS "simulation list"
|
|
@@ -5340,8 +5480,11 @@ Do not record this run in the simulation's start history
|
|
|
5340
5480
|
.B \-\-output <format>
|
|
5341
5481
|
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)
|
|
5342
5482
|
.TP
|
|
5483
|
+
.B \-\-verbose
|
|
5484
|
+
Show request and response headers and bodies for each request. By default each request prints one line, plus any applied scenario or error.
|
|
5485
|
+
.TP
|
|
5343
5486
|
.B \-\-proxy
|
|
5344
|
-
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.
|
|
5487
|
+
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. Each mock is reached on the hostnames its `origin:` declares; a request to any other host reaches the real host unchanged.
|
|
5345
5488
|
.TP
|
|
5346
5489
|
.B \-\-proxy\-port <n>
|
|
5347
5490
|
Port for the proxy server. Distinct from \-\-port, which is the one\-port run's own port. (default: 7001)
|
|
@@ -5372,10 +5515,10 @@ All member mocks share one address. With path routing (default) the first path s
|
|
|
5372
5515
|
|
|
5373
5516
|
Start history (source: cli): a simulation\-id run records automatically (the id and workspace are known), as does a .sim.yaml linked to a cloud simulation via `workspace push`. An unlinked file has only a name, so pass \-\-workspace and \-\-simulation to record it. Best\-effort and never blocks the servers; use \-\-no\-history to opt out.
|
|
5374
5517
|
|
|
5375
|
-
Eg. postman simulation run ./
|
|
5376
|
-
postman simulation run ./
|
|
5518
|
+
Eg. postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy
|
|
5519
|
+
postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy \-\-doctor
|
|
5377
5520
|
|
|
5378
|
-
\-\-proxy starts the mocks on throwaway ports behind the proxy and records no start history.
|
|
5521
|
+
\-\-proxy reads the same .sim.yaml, starts the mocks on throwaway ports behind the proxy, and records no start history. Declare the hostnames a member stands in for under its `origin:` (postman simulation create \-\-origin) — a member with none is never matched.
|
|
5379
5522
|
|
|
5380
5523
|
|
|
5381
5524
|
.SS "simulation push"
|
|
@@ -5419,21 +5562,27 @@ Name for the mock server (you are asked for one if you skip this)
|
|
|
5419
5562
|
.B \-s, \-\-slug <slug>
|
|
5420
5563
|
Short label used in the server's web address, e.g. "my\-sim" (you are asked for one if you skip this)
|
|
5421
5564
|
.TP
|
|
5565
|
+
.B \-\-public
|
|
5566
|
+
Let anyone with the link reach the server. Private by default (callers must send a Postman API key).
|
|
5567
|
+
.TP
|
|
5422
5568
|
.B \-\-private
|
|
5423
|
-
Require a Postman API key to reach the server
|
|
5569
|
+
Require a Postman API key to reach the server (the default; kept for compatibility).
|
|
5424
5570
|
.TP
|
|
5425
5571
|
.B \-y, \-\-yes
|
|
5426
|
-
Use the defaults and skip all questions (
|
|
5572
|
+
Use the defaults and skip all questions (private)
|
|
5427
5573
|
.TP
|
|
5428
5574
|
.B \-\-api\-key <key>
|
|
5429
5575
|
Postman API key (defaults to your `postman login` session)
|
|
5576
|
+
.TP
|
|
5577
|
+
.B \-\-json
|
|
5578
|
+
Print the live server details as machine\-readable data instead of a summary (asks no questions)
|
|
5430
5579
|
|
|
5431
5580
|
.TP Examples:
|
|
5432
5581
|
|
|
5433
5582
|
simulationId is the id of a simulation in Postman cloud (find it with `postman simulation list`).
|
|
5434
5583
|
|
|
5435
5584
|
Eg. postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef # asks a few questions
|
|
5436
|
-
postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-sim \-\-
|
|
5585
|
+
postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-sim \-\-public
|
|
5437
5586
|
postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-sim \-y # no questions asked
|
|
5438
5587
|
|
|
5439
5588
|
Don't have the simulation in Postman cloud yet? Upload it first with `postman simulation push`.
|
|
@@ -5828,9 +5977,6 @@ Output the ask record as JSON
|
|
|
5828
5977
|
.B \-\-no\-include\-answer
|
|
5829
5978
|
Do not ask the service to include the answer inline
|
|
5830
5979
|
.TP
|
|
5831
|
-
.B \-\-max\-steps <count>
|
|
5832
|
-
Cap the reasoning steps the service may take (its default applies when omitted)
|
|
5833
|
-
.TP
|
|
5834
5980
|
.B \-\-interval <seconds>
|
|
5835
5981
|
With \-\-wait, seconds between polls (default: 2)
|
|
5836
5982
|
.TP
|
|
@@ -5856,7 +6002,6 @@ Examples:
|
|
|
5856
6002
|
postman context\-graph ask "What does postman\-app do?" \-\-wait
|
|
5857
6003
|
postman context\-graph ask "What depends on billing\-api?" \-\-wait \-\-json
|
|
5858
6004
|
postman context\-graph ask "Which APIs are in the graph?" \-\-wait \-\-timeout 120
|
|
5859
|
-
postman context\-graph ask "Summarize the graph" \-\-max\-steps 5
|
|
5860
6005
|
|
|
5861
6006
|
|
|
5862
6007
|
|
|
@@ -6968,7 +7113,7 @@ Bind values to $1, $2, ... in order; pass multiple values after \-p or repeat \-
|
|
|
6968
7113
|
Postman API key (defaults to the `postman login` session)
|
|
6969
7114
|
.TP
|
|
6970
7115
|
.B \-\-json
|
|
6971
|
-
Output rows as JSON instead of a table
|
|
7116
|
+
Output rows as JSON instead of a table; a failure prints a JSON error on stdout
|
|
6972
7117
|
.TP
|
|
6973
7118
|
.B \-\-debug
|
|
6974
7119
|
Include safe classified dataset diagnostics
|
|
@@ -6982,6 +7127,15 @@ Examples:
|
|
|
6982
7127
|
\-q 'SELECT * FROM users WHERE id = $1 AND active = $2' \-p 42 true
|
|
6983
7128
|
postman dataset query 14e30f6c\-1234\-1234\-1234\-cafef00dc0de \-q "SELECT * FROM users LIMIT 5"
|
|
6984
7129
|
|
|
7130
|
+
JSON output (\-\-json):
|
|
7131
|
+
Success: the query result itself (unchanged; not wrapped in an envelope).
|
|
7132
|
+
Failure: {"ok":false,"error":{"code","message","remediation"?,...context}}, exit 1.
|
|
7133
|
+
With \-\-source, rows stream as they arrive; a failure after rows were written closes
|
|
7134
|
+
the result with the rows so far plus "ok":false and "error", exit 1.
|
|
7135
|
+
Either way stdout holds one JSON document, so `\-\-json 2>/dev/null | jq .` parses it.
|
|
7136
|
+
"code" is the dataset error code when one is known (e.g. SECRET_RESOLUTION_FAILED,
|
|
7137
|
+
SQL_SYNTAX, AUTH_FAILED, PLAN_RESTRICTED), else DATASET_COMMAND_FAILED.
|
|
7138
|
+
|
|
6985
7139
|
|
|
6986
7140
|
|
|
6987
7141
|
.SS "dataset create"
|
|
@@ -7144,13 +7298,16 @@ Label for this driver type (defaults to the JAR filename)
|
|
|
7144
7298
|
JDBC URL with {{placeholders}}, e.g. jdbc:postgresql://{{host}}:{{port}}/{{database}}
|
|
7145
7299
|
.TP
|
|
7146
7300
|
.B \-\-var <name=value...>
|
|
7147
|
-
Value for a {{placeholder}}. Repeatable.
|
|
7301
|
+
Value for a {{placeholder}}. Repeatable. Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below. 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).
|
|
7148
7302
|
.TP
|
|
7149
7303
|
.B \-\-prop <name=value...>
|
|
7150
|
-
Driver connection property. Repeatable. Same
|
|
7304
|
+
Driver connection property. Repeatable. Same secret syntax as \-\-var
|
|
7151
7305
|
.TP
|
|
7152
7306
|
.B \-\-vars\-file <path>
|
|
7153
|
-
JSON object of
|
|
7307
|
+
JSON object of values; "\-" reads stdin. Keys are host, port, user, password, database (mysql/postgresql/sqlserver), or \-\-var names for jdbc, with optional "vars"/"props" objects for template variables / connection properties. Values take the same secret syntax, or {"$vaultId":..,"$secretId":..} objects, and keep secrets out of argv entirely
|
|
7308
|
+
.TP
|
|
7309
|
+
.B \-w, \-\-workspace <workspaceId>
|
|
7310
|
+
Workspace whose Shared Vault resolves vault:<KEY> (falls back to .postman/resources.yaml in the current directory)
|
|
7154
7311
|
.TP
|
|
7155
7312
|
.B \-\-from\-source <name>
|
|
7156
7313
|
Reuse another source's driver JAR, class and URL template
|
|
@@ -7171,16 +7328,16 @@ Template variable holding the tunnelled port (inferred when omitted)
|
|
|
7171
7328
|
Emit the result as JSON instead of prose
|
|
7172
7329
|
.TP
|
|
7173
7330
|
.B \-\-host <host>
|
|
7174
|
-
DB host (mysql/postgresql/sqlserver)
|
|
7331
|
+
DB host (mysql/postgresql/sqlserver). Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below.
|
|
7175
7332
|
.TP
|
|
7176
7333
|
.B \-\-port <port>
|
|
7177
7334
|
DB port (defaults to 1433 for sqlserver)
|
|
7178
7335
|
.TP
|
|
7179
7336
|
.B \-\-user <user>
|
|
7180
|
-
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).
|
|
7337
|
+
DB user. Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below. 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).
|
|
7181
7338
|
.TP
|
|
7182
7339
|
.B \-\-password <password>
|
|
7183
|
-
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).
|
|
7340
|
+
DB password. Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below. 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).
|
|
7184
7341
|
.TP
|
|
7185
7342
|
.B \-\-database <db>
|
|
7186
7343
|
DB database name
|
|
@@ -7247,6 +7404,23 @@ Format selection:
|
|
|
7247
7404
|
Execution:
|
|
7248
7405
|
\-\-upload runs file\-backed queries in the cloud service. Without \-\-upload, the local engine reads the file.
|
|
7249
7406
|
|
|
7407
|
+
Database credentials from the Shared Vault:
|
|
7408
|
+
postman secret create PG_USER PG_PASSWORD \-\-json # values go in a browser form
|
|
7409
|
+
postman dataset source add \-d ./orders.dataset.yaml \-n orders \-\-type postgresql \e
|
|
7410
|
+
\-\-host db.internal \-\-port 5432 \-\-database shop \-\-table orders \e
|
|
7411
|
+
\-\-user vault:PG_USER \-\-password vault:PG_PASSWORD \-w <workspaceId>
|
|
7412
|
+
(\-w names the workspace holding the secrets; omit it in a folder bound with
|
|
7413
|
+
`postman init`.)
|
|
7414
|
+
|
|
7415
|
+
In CI, from the environment (reads POSTMAN_VAULT_PG_USER / POSTMAN_VAULT_PG_PASSWORD):
|
|
7416
|
+
postman dataset source add \-d ./orders.dataset.yaml \-n orders \-\-type postgresql \e
|
|
7417
|
+
\-\-database shop \-\-table orders \-\-vars\-file ./db.json
|
|
7418
|
+
# db.json — safe to commit, it holds no secret values:
|
|
7419
|
+
{"host":"db.internal","port":5432,"user":"env:PG_USER","password":"env:PG_PASSWORD"}
|
|
7420
|
+
env: replaces the Vault, not the Postman account: running a database dataset
|
|
7421
|
+
still needs credentials. `collection run` reads POSTMAN_API_KEY; other dataset
|
|
7422
|
+
commands need `postman login \-\-with\-api\-key "$POSTMAN_API_KEY"` or \-\-api\-key.
|
|
7423
|
+
|
|
7250
7424
|
JDBC:
|
|
7251
7425
|
Start with `postman dataset jdbc inspect <jar>`. Its output maps onto these
|
|
7252
7426
|
flags directly: suggestedUrlTemplate \-> \-\-url\-template, templateVariables \->
|
|
@@ -7257,28 +7431,45 @@ JDBC:
|
|
|
7257
7431
|
\-\-driver\-jar ./drivers/postgresql\-42.7.4.jar \e
|
|
7258
7432
|
\-\-url\-template 'jdbc:postgresql://{{host}}:{{port}}/{{database}}' \e
|
|
7259
7433
|
\-\-var host=db.internal \-\-var port=5432 \-\-var database=shop \e
|
|
7260
|
-
\-\-
|
|
7434
|
+
\-\-prop user=vault:PG_USER \-\-prop password=vault:PG_PASSWORD
|
|
7435
|
+
|
|
7436
|
+
\-\-var only fills {{placeholders}} in the URL template; credentials the
|
|
7437
|
+
template does not mention go in as driver properties (\-\-prop).
|
|
7261
7438
|
|
|
7262
7439
|
Reuse that driver for a second source, no rediscovery needed:
|
|
7263
7440
|
postman dataset source add \-d ./orders.dataset.yaml \-n refunds \-\-type jdbc \e
|
|
7264
|
-
\-\-from\-source orders \-\-var host=db.internal \-\-var port=5432 \-\-var database=refunds
|
|
7441
|
+
\-\-from\-source orders \-\-var host=db.internal \-\-var port=5432 \-\-var database=refunds \e
|
|
7442
|
+
\-\-prop user=vault:PG_USER \-\-prop password=vault:PG_PASSWORD
|
|
7443
|
+
(\-\-from\-source reuses the driver, class and template; credentials are per source.)
|
|
7265
7444
|
|
|
7266
7445
|
Secrets:
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7446
|
+
Flags that take a credential accept any of these as their value:
|
|
7447
|
+
vault:<KEY> Shared Vault secret, by key (or id), in \-\-workspace.
|
|
7448
|
+
Looked up once and stored as {$vaultId,$secretId},
|
|
7449
|
+
exactly as the Postman app stores it. Preferred.
|
|
7450
|
+
vault:<vaultId>/<secretId> Shared Vault secret, by explicit ids; no lookup.
|
|
7451
|
+
env:<NAME> Read from the environment variable POSTMAN_VAULT_<NAME>
|
|
7452
|
+
(not a Postman environment) when the dataset runs —
|
|
7453
|
+
the CI idiom. Local .dataset.yaml only; the Postman
|
|
7454
|
+
app cannot resolve it. Only POSTMAN_VAULT_* variables
|
|
7455
|
+
are readable, so a dataset file cannot pick up other
|
|
7456
|
+
secrets on the machine.
|
|
7457
|
+
<literal> Plaintext: in `ps` output, shell history and the
|
|
7458
|
+
stored dataset. Works, with a warning.
|
|
7459
|
+
\-\-vars\-file <path|\-> The same values as a JSON object; "\-" reads stdin,
|
|
7460
|
+
so even a literal stays out of argv. Also accepts
|
|
7461
|
+
{"$vaultId":..,"$secretId":..} objects.
|
|
7462
|
+
Create a secret with `postman secret create <KEY>`; list them with
|
|
7463
|
+
`postman secret list`. Local Vault secrets are not supported; use a Shared Vault.
|
|
7271
7464
|
A secret written directly into \-\-url\-template is rejected: a literal has no
|
|
7272
7465
|
{{name}} to route through \-\-var, so it can never be a Vault reference and
|
|
7273
7466
|
nothing masks it. Use a placeholder plus \-\-var instead.
|
|
7274
|
-
\-\-vars\-file <path|\-> JSON object; "\-" reads stdin, keeping
|
|
7275
|
-
secrets out of argv entirely. Accepts
|
|
7276
|
-
{"$vaultId":..,"$secretId":..} values.
|
|
7277
|
-
Local Vault secrets are not supported by Postman CLI; use a Shared Vault.
|
|
7278
7467
|
|
|
7279
|
-
Connection test:
|
|
7280
|
-
Runs before
|
|
7468
|
+
Connection test (JDBC sources):
|
|
7469
|
+
Runs before a JDBC source is written, so one that cannot connect is never
|
|
7281
7470
|
persisted. Needs a local JRE and a loadable driver. Pass \-\-no\-test to skip it.
|
|
7471
|
+
Database sources (mysql/postgresql/sqlserver) are written without a test; check
|
|
7472
|
+
one with `postman dataset source test \-d <dataset> \-n <name>`.
|
|
7282
7473
|
\-\-no\-test alone still needs Java to resolve the driver class; on a machine with
|
|
7283
7474
|
no Java at all, add \-\-driver\-class or \-\-from\-source so nothing has to load it.
|
|
7284
7475
|
|
|
@@ -7295,17 +7486,20 @@ JSON output (\-\-json):
|
|
|
7295
7486
|
Error codes: DRIVER_FILE_NOT_FOUND, DRIVER_CLASS_NOT_FOUND,
|
|
7296
7487
|
DRIVER_CLASS_AMBIGUOUS (with candidates[]), URL_TEMPLATE_INVALID,
|
|
7297
7488
|
CONFIG_VALUE_MISSING (with missing[]), URL_TEMPLATE_LITERAL_SECRET,
|
|
7298
|
-
VAULT_REFERENCE_INVALID,
|
|
7489
|
+
VAULT_REFERENCE_INVALID, ENV_REFERENCE_INVALID, ENV_REFERENCE_UNSUPPORTED,
|
|
7490
|
+
FILE_REFERENCE_UNSUPPORTED,
|
|
7491
|
+
SECRET_NOT_FOUND, SECRET_AMBIGUOUS (with candidates[]), WORKSPACE_REQUIRED,
|
|
7299
7492
|
VARS_FILE_UNREADABLE, VARS_FILE_INVALID, SOURCE_NOT_FOUND, SOURCE_NOT_JDBC,
|
|
7300
7493
|
JAVA_NOT_FOUND, JAVA_UNSUPPORTED, DRIVER_LOAD_FAILED, CONNECTION_FAILED,
|
|
7301
|
-
CONNECTION_TIMEOUT, SECRET_RESOLUTION_FAILED,
|
|
7494
|
+
CONNECTION_TIMEOUT, SECRET_RESOLUTION_FAILED, SECRET_RESOLUTION_TIMEOUT,
|
|
7495
|
+
SECRET_AUTHENTICATION_REQUIRED, SECRET_VAULT_UNAVAILABLE, INVALID_ARGUMENT,
|
|
7302
7496
|
SPREADSHEET_DESCRIBE_FAILED, SPREADSHEET_NO_WORKSHEETS,
|
|
7303
7497
|
SPREADSHEET_UNIT_NOT_PINNED, SOURCE_ID_AMBIGUOUS,
|
|
7304
7498
|
SPREADSHEET_CLOUD_UNSUPPORTED, WORKBOOK_FORMAT_UNSUPPORTED
|
|
7305
7499
|
Warning codes: PLAINTEXT_SECRET, CONNECTION_NOT_TESTED, NO_VARIABLES,
|
|
7306
7500
|
EMPTY_VARIABLE_VALUE, NAME_NOT_SQL_SAFE, NAME_UNUSED_FOR_SPREADSHEET,
|
|
7307
|
-
TRUST_SERVER_CERTIFICATE, SSH_VALUES_IN_ARGV, SSH_HOST_KEY_UNVERIFIED
|
|
7308
|
-
LOCAL_VAULT_UNSUPPORTED, SOURCE_NAME_CONFLICT, SOURCE_ID_CONFLICT and
|
|
7501
|
+
TRUST_SERVER_CERTIFICATE, SSH_VALUES_IN_ARGV, SSH_HOST_KEY_UNVERIFIED,
|
|
7502
|
+
UNUSED_VARIABLE. LOCAL_VAULT_UNSUPPORTED, SOURCE_NAME_CONFLICT, SOURCE_ID_CONFLICT and
|
|
7309
7503
|
DATASET_FILE_CHANGED are also possible; DATASET_COMMAND_FAILED is the
|
|
7310
7504
|
fallback for anything unclassified.
|
|
7311
7505
|
|
|
@@ -7373,10 +7567,10 @@ Rename the JDBC driver type label
|
|
|
7373
7567
|
Replace the JDBC URL template
|
|
7374
7568
|
.TP
|
|
7375
7569
|
.B \-\-var <name=value...>
|
|
7376
|
-
Set a JDBC template variable. Merges onto the existing values.
|
|
7570
|
+
Set a JDBC template variable. Merges onto the existing values. Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below. 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).
|
|
7377
7571
|
.TP
|
|
7378
7572
|
.B \-\-prop <name=value...>
|
|
7379
|
-
Set a JDBC connection property. Merges, same
|
|
7573
|
+
Set a JDBC connection property. Merges, same secret syntax
|
|
7380
7574
|
.TP
|
|
7381
7575
|
.B \-\-unset\-var <name...>
|
|
7382
7576
|
Remove a JDBC template variable. Merging alone can never remove a key
|
|
@@ -7385,7 +7579,10 @@ Remove a JDBC template variable. Merging alone can never remove a key
|
|
|
7385
7579
|
Remove a JDBC connection property
|
|
7386
7580
|
.TP
|
|
7387
7581
|
.B \-\-vars\-file <path>
|
|
7388
|
-
JSON object of
|
|
7582
|
+
JSON object of values to merge; "\-" reads stdin. Keys are host, port, user, password, database (mysql/postgresql/sqlserver), or \-\-var names for jdbc, with optional "vars"/"props" objects. Values take the same secret syntax
|
|
7583
|
+
.TP
|
|
7584
|
+
.B \-w, \-\-workspace <workspaceId>
|
|
7585
|
+
Workspace whose Shared Vault resolves vault:<KEY> (falls back to .postman/resources.yaml in the current directory)
|
|
7389
7586
|
.TP
|
|
7390
7587
|
.B \-\-ssh\-target\-host\-variable <name>
|
|
7391
7588
|
Template variable holding the tunnelled host (JDBC)
|
|
@@ -7397,16 +7594,16 @@ Template variable holding the tunnelled port (JDBC)
|
|
|
7397
7594
|
Java runtime for JDBC operations. Machine\-local only
|
|
7398
7595
|
.TP
|
|
7399
7596
|
.B \-\-host <host>
|
|
7400
|
-
Update DB host (mysql/postgresql/sqlserver)
|
|
7597
|
+
Update DB host (mysql/postgresql/sqlserver). Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below.
|
|
7401
7598
|
.TP
|
|
7402
7599
|
.B \-\-port <port>
|
|
7403
7600
|
Update DB port
|
|
7404
7601
|
.TP
|
|
7405
7602
|
.B \-\-user <user>
|
|
7406
|
-
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).
|
|
7603
|
+
Update DB user. Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below. 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).
|
|
7407
7604
|
.TP
|
|
7408
7605
|
.B \-\-password <password>
|
|
7409
|
-
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).
|
|
7606
|
+
Update DB password. Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below. 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).
|
|
7410
7607
|
.TP
|
|
7411
7608
|
.B \-\-database <db>
|
|
7412
7609
|
Update DB database name
|
|
@@ -7470,10 +7667,15 @@ Examples:
|
|
|
7470
7667
|
postman dataset source update orders\-db \e
|
|
7471
7668
|
\-d 14e30f6c\-1234\-1234\-1234\-cafef00dc0de \-\-host db.internal.example
|
|
7472
7669
|
|
|
7670
|
+
Rotate a database password onto a Shared Vault secret (\-w names the workspace
|
|
7671
|
+
holding PG_PASSWORD; omit it in a folder bound with `postman init`):
|
|
7672
|
+
postman dataset source update orders\-db \-d ./orders.dataset.yaml \e
|
|
7673
|
+
\-\-password vault:PG_PASSWORD \-w <workspaceId>
|
|
7674
|
+
|
|
7473
7675
|
JDBC:
|
|
7474
7676
|
Rotate one credential, leaving everything else alone:
|
|
7475
7677
|
postman dataset source update orders \-d ./orders.dataset.yaml \e
|
|
7476
|
-
\-\-
|
|
7678
|
+
\-\-prop password=vault:PG_PASSWORD_2024_11
|
|
7477
7679
|
|
|
7478
7680
|
Remove a variable the template no longer uses:
|
|
7479
7681
|
postman dataset source update orders \-d ./orders.dataset.yaml \e
|
|
@@ -7488,6 +7690,26 @@ JDBC:
|
|
|
7488
7690
|
Run `postman dataset source test \-d <dataset> \-n <name>` afterwards to check
|
|
7489
7691
|
the change actually connects.
|
|
7490
7692
|
|
|
7693
|
+
Secrets:
|
|
7694
|
+
Flags that take a credential accept any of these as their value:
|
|
7695
|
+
vault:<KEY> Shared Vault secret, by key (or id), in \-\-workspace.
|
|
7696
|
+
Looked up once and stored as {$vaultId,$secretId},
|
|
7697
|
+
exactly as the Postman app stores it. Preferred.
|
|
7698
|
+
vault:<vaultId>/<secretId> Shared Vault secret, by explicit ids; no lookup.
|
|
7699
|
+
env:<NAME> Read from the environment variable POSTMAN_VAULT_<NAME>
|
|
7700
|
+
(not a Postman environment) when the dataset runs —
|
|
7701
|
+
the CI idiom. Local .dataset.yaml only; the Postman
|
|
7702
|
+
app cannot resolve it. Only POSTMAN_VAULT_* variables
|
|
7703
|
+
are readable, so a dataset file cannot pick up other
|
|
7704
|
+
secrets on the machine.
|
|
7705
|
+
<literal> Plaintext: in `ps` output, shell history and the
|
|
7706
|
+
stored dataset. Works, with a warning.
|
|
7707
|
+
\-\-vars\-file <path|\-> The same values as a JSON object; "\-" reads stdin,
|
|
7708
|
+
so even a literal stays out of argv. Also accepts
|
|
7709
|
+
{"$vaultId":..,"$secretId":..} objects.
|
|
7710
|
+
Create a secret with `postman secret create <KEY>`; list them with
|
|
7711
|
+
`postman secret list`. Local Vault secrets are not supported; use a Shared Vault.
|
|
7712
|
+
|
|
7491
7713
|
|
|
7492
7714
|
|
|
7493
7715
|
.SS "dataset source test"
|
|
@@ -7535,7 +7757,12 @@ JSON output (\-\-json):
|
|
|
7535
7757
|
Error codes: SOURCE_NOT_FOUND (with available[]), SOURCE_NOT_TESTABLE,
|
|
7536
7758
|
SOURCE_NOT_JDBC, SOURCE_CONFIG_UNAVAILABLE, CONNECTION_FAILED,
|
|
7537
7759
|
CONN_AUTH_FAILED, CONNECTION_TIMEOUT, JAVA_NOT_FOUND, DRIVER_LOAD_FAILED,
|
|
7538
|
-
HOST_PROTOCOL_ERROR, SECRET_RESOLUTION_FAILED,
|
|
7760
|
+
HOST_PROTOCOL_ERROR, SECRET_RESOLUTION_FAILED, SECRET_RESOLUTION_TIMEOUT,
|
|
7761
|
+
SECRET_AUTHENTICATION_REQUIRED (no Postman login to resolve a vault: reference),
|
|
7762
|
+
SECRET_VAULT_UNAVAILABLE (Vault is down; retry),
|
|
7763
|
+
ENV_REFERENCE_UNSUPPORTED (an env: reference on a cloud source),
|
|
7764
|
+
FILE_REFERENCE_UNSUPPORTED (a file reference outside ssh_tunnel.private_key),
|
|
7765
|
+
DATASET_COMMAND_FAILED
|
|
7539
7766
|
|
|
7540
7767
|
|
|
7541
7768
|
|
|
@@ -8014,6 +8241,9 @@ Read the secret value from stdin instead of prompting; implies \-\-terminal
|
|
|
8014
8241
|
.TP
|
|
8015
8242
|
.B \-\-timeout <seconds>
|
|
8016
8243
|
Seconds to wait for the browser form (default 300)
|
|
8244
|
+
.TP
|
|
8245
|
+
.B \-\-json
|
|
8246
|
+
Print the created secrets as machine\-readable JSON (never the values)
|
|
8017
8247
|
|
|
8018
8248
|
.TP Examples:
|
|
8019
8249
|
|
|
@@ -8029,6 +8259,23 @@ Examples:
|
|
|
8029
8259
|
postman secret create MY_SECRET \-\-team\-id 451 \-\-workspace 00000000\-0000\-0000\-0000\-000000000000
|
|
8030
8260
|
printf '%s' 's3cr3t' | postman secret create MY_SECRET \-\-team\-id 451 \-\-value\-stdin
|
|
8031
8261
|
|
|
8262
|
+
Use it from a dataset source without copying ids (the key is looked up in the workspace):
|
|
8263
|
+
postman secret create PG_USER PG_PASSWORD \-\-json
|
|
8264
|
+
postman dataset source add \-d ./orders.dataset.yaml \-n orders \-\-type postgresql \e
|
|
8265
|
+
\-\-host db.internal \-\-port 5432 \-\-database shop \-\-table orders \e
|
|
8266
|
+
\-\-user vault:PG_USER \-\-password vault:PG_PASSWORD
|
|
8267
|
+
|
|
8268
|
+
JSON output (\-\-json), all on stdout; prompts, the browser link and the match code
|
|
8269
|
+
go to stderr. Secrets carry the same fields as `secret list \-\-json`; vaultId is null,
|
|
8270
|
+
with "warnings", if it could not be looked up after the secret was created.
|
|
8271
|
+
Success: {"ok":true,"secrets":[{"key":"PG_USER","secretId":"9f3c2a1e","vaultId":"v\-81d2"}]}
|
|
8272
|
+
Partial (exit 4):
|
|
8273
|
+
{"ok":false,"secrets":[{"key":"PG_USER","secretId":"9f3c2a1e","vaultId":"v\-81d2"}],
|
|
8274
|
+
"errors":[{"key":"PG_PASSWORD","message":"Request failed with status 500"}]}
|
|
8275
|
+
Failure: {"ok":false,"error":{"code":"AUTH_FAILED","message":"Invalid API key"}}
|
|
8276
|
+
error.code is INVALID_ARGUMENT (usage), AUTH_FAILED, NETWORK_ERROR,
|
|
8277
|
+
VAULT_REQUEST_FAILED, or SECRET_CREATE_FAILED.
|
|
8278
|
+
|
|
8032
8279
|
|
|
8033
8280
|
|
|
8034
8281
|
.SS "secret list"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postman-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.76.0",
|
|
4
4
|
"description": "Official Postman CLI - Command-line companion for API development, testing, and automation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postman",
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"scripts/"
|
|
63
63
|
],
|
|
64
64
|
"optionalDependencies": {
|
|
65
|
-
"@postman/pm-bin-macos-arm64": "1.
|
|
66
|
-
"@postman/pm-bin-macos-x64": "1.
|
|
67
|
-
"@postman/pm-bin-linux-x64": "1.
|
|
68
|
-
"@postman/pm-bin-linux-arm64": "1.
|
|
69
|
-
"@postman/pm-bin-windows-x64": "1.
|
|
65
|
+
"@postman/pm-bin-macos-arm64": "1.76.0",
|
|
66
|
+
"@postman/pm-bin-macos-x64": "1.76.0",
|
|
67
|
+
"@postman/pm-bin-linux-x64": "1.76.0",
|
|
68
|
+
"@postman/pm-bin-linux-arm64": "1.76.0",
|
|
69
|
+
"@postman/pm-bin-windows-x64": "1.76.0"
|
|
70
70
|
}
|
|
71
71
|
}
|