postman-cli 1.75.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 +237 -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
|
|
|
@@ -3173,8 +3201,9 @@ Print the created workspace as machine\-readable JSON.
|
|
|
3173
3201
|
|
|
3174
3202
|
.TP Examples:
|
|
3175
3203
|
|
|
3176
|
-
Requires a login (`postman login`) or
|
|
3177
|
-
|
|
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.
|
|
3178
3207
|
Refuses to run on CI: create once locally and commit the binding.
|
|
3179
3208
|
|
|
3180
3209
|
Examples:
|
|
@@ -3541,9 +3570,9 @@ Load segments:
|
|
|
3541
3570
|
ramp\-up — 2 segments
|
|
3542
3571
|
|
|
3543
3572
|
peak ┤ _________ at peak __________
|
|
3544
|
-
│ ramp\-up _____
|
|
3545
|
-
│ ______
|
|
3546
|
-
base ┤__ warm\-up ___
|
|
3573
|
+
│ ramp\-up _____/
|
|
3574
|
+
│ ______/
|
|
3575
|
+
base ┤__ warm\-up ___/
|
|
3547
3576
|
└┬─────────────┬─────────────┬───────────────────────────┤ \-\-duration
|
|
3548
3577
|
1 2 (3)
|
|
3549
3578
|
|
|
@@ -3555,10 +3584,10 @@ Load segments:
|
|
|
3555
3584
|
|
|
3556
3585
|
spike — 3 segments · no time at the peak; use \-\-load\-profile peak to hold
|
|
3557
3586
|
|
|
3558
|
-
peak ┤
|
|
3559
|
-
│ ramp\-up _
|
|
3560
|
-
│ _
|
|
3561
|
-
base ┤______ warm\-up _______
|
|
3587
|
+
peak ┤ /\e
|
|
3588
|
+
│ ramp\-up _/ \e_ ramp\-down
|
|
3589
|
+
│ _/ \e_
|
|
3590
|
+
base ┤______ warm\-up _______/ \e______ at base _______
|
|
3562
3591
|
└┬─────────────────────┬─────┬─────┬─────────────────────┤ \-\-duration
|
|
3563
3592
|
1 2 3 (4)
|
|
3564
3593
|
|
|
@@ -3571,9 +3600,9 @@ Load segments:
|
|
|
3571
3600
|
peak — 4 segments
|
|
3572
3601
|
|
|
3573
3602
|
peak ┤ __ hold ___
|
|
3574
|
-
│ ramp\-up ____
|
|
3575
|
-
│ ____
|
|
3576
|
-
base ┤_ warm\-up _
|
|
3603
|
+
│ ramp\-up ____/ \e____ ramp\-down
|
|
3604
|
+
│ ____/ \e____
|
|
3605
|
+
base ┤_ warm\-up _/ \e_ at base __
|
|
3577
3606
|
└┬──────────┬──────────┬──────────┬──────────┬───────────┤ \-\-duration
|
|
3578
3607
|
1 2 3 4 (5)
|
|
3579
3608
|
|
|
@@ -4759,7 +4788,7 @@ Create, run, and manage Postman mocks — in your repository or in Postman cloud
|
|
|
4759
4788
|
.B Subcommands:
|
|
4760
4789
|
.TP
|
|
4761
4790
|
.B mock generate
|
|
4762
|
-
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.
|
|
4763
4792
|
.TP
|
|
4764
4793
|
.B mock run
|
|
4765
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).
|
|
@@ -4783,7 +4812,7 @@ Show the requests a live mock server has received and the responses it sent, usi
|
|
|
4783
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.
|
|
4784
4813
|
|
|
4785
4814
|
.SS "mock generate"
|
|
4786
|
-
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.
|
|
4787
4816
|
|
|
4788
4817
|
.B Usage:
|
|
4789
4818
|
[sourcePath] [options]
|
|
@@ -4809,10 +4838,22 @@ Overwrite the mock's files if the target folder already has one
|
|
|
4809
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.
|
|
4810
4839
|
.TP
|
|
4811
4840
|
.B \-w, \-\-workspace <id>
|
|
4812
|
-
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
|
|
4813
4854
|
.TP
|
|
4814
4855
|
.B \-\-api\-key <key>
|
|
4815
|
-
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)
|
|
4816
4857
|
.TP
|
|
4817
4858
|
.B \-x, \-\-suppress\-exit\-code
|
|
4818
4859
|
Always exit with code 0, even on failure
|
|
@@ -4823,6 +4864,8 @@ Eg. postman mock generate ./my\-collection.json
|
|
|
4823
4864
|
postman mock generate \-\-name "My Mock" # sample shopping\-cart mock
|
|
4824
4865
|
postman mock generate \-\-name "My Mock" \-\-port 4010 # sample mock, custom port
|
|
4825
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
|
|
4826
4869
|
postman mock generate ./openapi.yaml \-\-stateful # CRUD handlers backed by pm.state
|
|
4827
4870
|
postman mock generate ./my\-collection.json \-\-update ./postman/mocks/orders
|
|
4828
4871
|
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # save to Postman cloud
|
|
@@ -4938,6 +4981,9 @@ Use the defaults and skip all questions (private, no auto\-deploy)
|
|
|
4938
4981
|
.TP
|
|
4939
4982
|
.B \-\-api\-key <key>
|
|
4940
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)
|
|
4941
4987
|
|
|
4942
4988
|
.TP Examples:
|
|
4943
4989
|
|
|
@@ -5268,7 +5314,7 @@ Create, run and manage simulations — serve several mocks behind one address.
|
|
|
5268
5314
|
.B Subcommands:
|
|
5269
5315
|
.TP
|
|
5270
5316
|
.B simulation create
|
|
5271
|
-
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.
|
|
5272
5318
|
.TP
|
|
5273
5319
|
.B simulation list
|
|
5274
5320
|
List the simulations in your repository or Postman cloud workspace
|
|
@@ -5295,7 +5341,7 @@ Show the requests a deployed simulation has received and the responses it sent,
|
|
|
5295
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.
|
|
5296
5342
|
|
|
5297
5343
|
.SS "simulation create"
|
|
5298
|
-
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.
|
|
5299
5345
|
|
|
5300
5346
|
.B Usage:
|
|
5301
5347
|
[options]
|
|
@@ -5318,7 +5364,19 @@ Where to save the simulation file in your repository, a file or folder (defaults
|
|
|
5318
5364
|
Overwrite the simulation file if it already exists
|
|
5319
5365
|
.TP
|
|
5320
5366
|
.B \-w, \-\-workspace <id>
|
|
5321
|
-
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
|
|
5322
5380
|
.TP
|
|
5323
5381
|
.B \-\-api\-key <key>
|
|
5324
5382
|
Postman API key (defaults to your `postman login` session)
|
|
@@ -5329,8 +5387,10 @@ Eg. postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \
|
|
|
5329
5387
|
postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments=payments \-\-routing header
|
|
5330
5388
|
postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-o ./postman/simulations/checkout.sim.yaml
|
|
5331
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
|
|
5332
5392
|
|
|
5333
|
-
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.
|
|
5334
5394
|
|
|
5335
5395
|
|
|
5336
5396
|
.SS "simulation list"
|
|
@@ -5424,7 +5484,7 @@ Live output format: auto (default, human\-readable logs) or ndjson (one JSON eve
|
|
|
5424
5484
|
Show request and response headers and bodies for each request. By default each request prints one line, plus any applied scenario or error.
|
|
5425
5485
|
.TP
|
|
5426
5486
|
.B \-\-proxy
|
|
5427
|
-
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.
|
|
5428
5488
|
.TP
|
|
5429
5489
|
.B \-\-proxy\-port <n>
|
|
5430
5490
|
Port for the proxy server. Distinct from \-\-port, which is the one\-port run's own port. (default: 7001)
|
|
@@ -5455,10 +5515,10 @@ All member mocks share one address. With path routing (default) the first path s
|
|
|
5455
5515
|
|
|
5456
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.
|
|
5457
5517
|
|
|
5458
|
-
Eg. postman simulation run ./
|
|
5459
|
-
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
|
|
5460
5520
|
|
|
5461
|
-
\-\-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.
|
|
5462
5522
|
|
|
5463
5523
|
|
|
5464
5524
|
.SS "simulation push"
|
|
@@ -5502,21 +5562,27 @@ Name for the mock server (you are asked for one if you skip this)
|
|
|
5502
5562
|
.B \-s, \-\-slug <slug>
|
|
5503
5563
|
Short label used in the server's web address, e.g. "my\-sim" (you are asked for one if you skip this)
|
|
5504
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
|
|
5505
5568
|
.B \-\-private
|
|
5506
|
-
Require a Postman API key to reach the server
|
|
5569
|
+
Require a Postman API key to reach the server (the default; kept for compatibility).
|
|
5507
5570
|
.TP
|
|
5508
5571
|
.B \-y, \-\-yes
|
|
5509
|
-
Use the defaults and skip all questions (
|
|
5572
|
+
Use the defaults and skip all questions (private)
|
|
5510
5573
|
.TP
|
|
5511
5574
|
.B \-\-api\-key <key>
|
|
5512
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)
|
|
5513
5579
|
|
|
5514
5580
|
.TP Examples:
|
|
5515
5581
|
|
|
5516
5582
|
simulationId is the id of a simulation in Postman cloud (find it with `postman simulation list`).
|
|
5517
5583
|
|
|
5518
5584
|
Eg. postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef # asks a few questions
|
|
5519
|
-
postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-sim \-\-
|
|
5585
|
+
postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-sim \-\-public
|
|
5520
5586
|
postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-sim \-y # no questions asked
|
|
5521
5587
|
|
|
5522
5588
|
Don't have the simulation in Postman cloud yet? Upload it first with `postman simulation push`.
|
|
@@ -5911,9 +5977,6 @@ Output the ask record as JSON
|
|
|
5911
5977
|
.B \-\-no\-include\-answer
|
|
5912
5978
|
Do not ask the service to include the answer inline
|
|
5913
5979
|
.TP
|
|
5914
|
-
.B \-\-max\-steps <count>
|
|
5915
|
-
Cap the reasoning steps the service may take (its default applies when omitted)
|
|
5916
|
-
.TP
|
|
5917
5980
|
.B \-\-interval <seconds>
|
|
5918
5981
|
With \-\-wait, seconds between polls (default: 2)
|
|
5919
5982
|
.TP
|
|
@@ -5939,7 +6002,6 @@ Examples:
|
|
|
5939
6002
|
postman context\-graph ask "What does postman\-app do?" \-\-wait
|
|
5940
6003
|
postman context\-graph ask "What depends on billing\-api?" \-\-wait \-\-json
|
|
5941
6004
|
postman context\-graph ask "Which APIs are in the graph?" \-\-wait \-\-timeout 120
|
|
5942
|
-
postman context\-graph ask "Summarize the graph" \-\-max\-steps 5
|
|
5943
6005
|
|
|
5944
6006
|
|
|
5945
6007
|
|
|
@@ -7051,7 +7113,7 @@ Bind values to $1, $2, ... in order; pass multiple values after \-p or repeat \-
|
|
|
7051
7113
|
Postman API key (defaults to the `postman login` session)
|
|
7052
7114
|
.TP
|
|
7053
7115
|
.B \-\-json
|
|
7054
|
-
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
|
|
7055
7117
|
.TP
|
|
7056
7118
|
.B \-\-debug
|
|
7057
7119
|
Include safe classified dataset diagnostics
|
|
@@ -7065,6 +7127,15 @@ Examples:
|
|
|
7065
7127
|
\-q 'SELECT * FROM users WHERE id = $1 AND active = $2' \-p 42 true
|
|
7066
7128
|
postman dataset query 14e30f6c\-1234\-1234\-1234\-cafef00dc0de \-q "SELECT * FROM users LIMIT 5"
|
|
7067
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
|
+
|
|
7068
7139
|
|
|
7069
7140
|
|
|
7070
7141
|
.SS "dataset create"
|
|
@@ -7227,13 +7298,16 @@ Label for this driver type (defaults to the JAR filename)
|
|
|
7227
7298
|
JDBC URL with {{placeholders}}, e.g. jdbc:postgresql://{{host}}:{{port}}/{{database}}
|
|
7228
7299
|
.TP
|
|
7229
7300
|
.B \-\-var <name=value...>
|
|
7230
|
-
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).
|
|
7231
7302
|
.TP
|
|
7232
7303
|
.B \-\-prop <name=value...>
|
|
7233
|
-
Driver connection property. Repeatable. Same
|
|
7304
|
+
Driver connection property. Repeatable. Same secret syntax as \-\-var
|
|
7234
7305
|
.TP
|
|
7235
7306
|
.B \-\-vars\-file <path>
|
|
7236
|
-
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)
|
|
7237
7311
|
.TP
|
|
7238
7312
|
.B \-\-from\-source <name>
|
|
7239
7313
|
Reuse another source's driver JAR, class and URL template
|
|
@@ -7254,16 +7328,16 @@ Template variable holding the tunnelled port (inferred when omitted)
|
|
|
7254
7328
|
Emit the result as JSON instead of prose
|
|
7255
7329
|
.TP
|
|
7256
7330
|
.B \-\-host <host>
|
|
7257
|
-
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.
|
|
7258
7332
|
.TP
|
|
7259
7333
|
.B \-\-port <port>
|
|
7260
7334
|
DB port (defaults to 1433 for sqlserver)
|
|
7261
7335
|
.TP
|
|
7262
7336
|
.B \-\-user <user>
|
|
7263
|
-
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).
|
|
7264
7338
|
.TP
|
|
7265
7339
|
.B \-\-password <password>
|
|
7266
|
-
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).
|
|
7267
7341
|
.TP
|
|
7268
7342
|
.B \-\-database <db>
|
|
7269
7343
|
DB database name
|
|
@@ -7330,6 +7404,23 @@ Format selection:
|
|
|
7330
7404
|
Execution:
|
|
7331
7405
|
\-\-upload runs file\-backed queries in the cloud service. Without \-\-upload, the local engine reads the file.
|
|
7332
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
|
+
|
|
7333
7424
|
JDBC:
|
|
7334
7425
|
Start with `postman dataset jdbc inspect <jar>`. Its output maps onto these
|
|
7335
7426
|
flags directly: suggestedUrlTemplate \-> \-\-url\-template, templateVariables \->
|
|
@@ -7340,28 +7431,45 @@ JDBC:
|
|
|
7340
7431
|
\-\-driver\-jar ./drivers/postgresql\-42.7.4.jar \e
|
|
7341
7432
|
\-\-url\-template 'jdbc:postgresql://{{host}}:{{port}}/{{database}}' \e
|
|
7342
7433
|
\-\-var host=db.internal \-\-var port=5432 \-\-var database=shop \e
|
|
7343
|
-
\-\-
|
|
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).
|
|
7344
7438
|
|
|
7345
7439
|
Reuse that driver for a second source, no rediscovery needed:
|
|
7346
7440
|
postman dataset source add \-d ./orders.dataset.yaml \-n refunds \-\-type jdbc \e
|
|
7347
|
-
\-\-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.)
|
|
7348
7444
|
|
|
7349
7445
|
Secrets:
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
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.
|
|
7354
7464
|
A secret written directly into \-\-url\-template is rejected: a literal has no
|
|
7355
7465
|
{{name}} to route through \-\-var, so it can never be a Vault reference and
|
|
7356
7466
|
nothing masks it. Use a placeholder plus \-\-var instead.
|
|
7357
|
-
\-\-vars\-file <path|\-> JSON object; "\-" reads stdin, keeping
|
|
7358
|
-
secrets out of argv entirely. Accepts
|
|
7359
|
-
{"$vaultId":..,"$secretId":..} values.
|
|
7360
|
-
Local Vault secrets are not supported by Postman CLI; use a Shared Vault.
|
|
7361
7467
|
|
|
7362
|
-
Connection test:
|
|
7363
|
-
Runs before
|
|
7468
|
+
Connection test (JDBC sources):
|
|
7469
|
+
Runs before a JDBC source is written, so one that cannot connect is never
|
|
7364
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>`.
|
|
7365
7473
|
\-\-no\-test alone still needs Java to resolve the driver class; on a machine with
|
|
7366
7474
|
no Java at all, add \-\-driver\-class or \-\-from\-source so nothing has to load it.
|
|
7367
7475
|
|
|
@@ -7378,17 +7486,20 @@ JSON output (\-\-json):
|
|
|
7378
7486
|
Error codes: DRIVER_FILE_NOT_FOUND, DRIVER_CLASS_NOT_FOUND,
|
|
7379
7487
|
DRIVER_CLASS_AMBIGUOUS (with candidates[]), URL_TEMPLATE_INVALID,
|
|
7380
7488
|
CONFIG_VALUE_MISSING (with missing[]), URL_TEMPLATE_LITERAL_SECRET,
|
|
7381
|
-
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,
|
|
7382
7492
|
VARS_FILE_UNREADABLE, VARS_FILE_INVALID, SOURCE_NOT_FOUND, SOURCE_NOT_JDBC,
|
|
7383
7493
|
JAVA_NOT_FOUND, JAVA_UNSUPPORTED, DRIVER_LOAD_FAILED, CONNECTION_FAILED,
|
|
7384
|
-
CONNECTION_TIMEOUT, SECRET_RESOLUTION_FAILED,
|
|
7494
|
+
CONNECTION_TIMEOUT, SECRET_RESOLUTION_FAILED, SECRET_RESOLUTION_TIMEOUT,
|
|
7495
|
+
SECRET_AUTHENTICATION_REQUIRED, SECRET_VAULT_UNAVAILABLE, INVALID_ARGUMENT,
|
|
7385
7496
|
SPREADSHEET_DESCRIBE_FAILED, SPREADSHEET_NO_WORKSHEETS,
|
|
7386
7497
|
SPREADSHEET_UNIT_NOT_PINNED, SOURCE_ID_AMBIGUOUS,
|
|
7387
7498
|
SPREADSHEET_CLOUD_UNSUPPORTED, WORKBOOK_FORMAT_UNSUPPORTED
|
|
7388
7499
|
Warning codes: PLAINTEXT_SECRET, CONNECTION_NOT_TESTED, NO_VARIABLES,
|
|
7389
7500
|
EMPTY_VARIABLE_VALUE, NAME_NOT_SQL_SAFE, NAME_UNUSED_FOR_SPREADSHEET,
|
|
7390
|
-
TRUST_SERVER_CERTIFICATE, SSH_VALUES_IN_ARGV, SSH_HOST_KEY_UNVERIFIED
|
|
7391
|
-
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
|
|
7392
7503
|
DATASET_FILE_CHANGED are also possible; DATASET_COMMAND_FAILED is the
|
|
7393
7504
|
fallback for anything unclassified.
|
|
7394
7505
|
|
|
@@ -7456,10 +7567,10 @@ Rename the JDBC driver type label
|
|
|
7456
7567
|
Replace the JDBC URL template
|
|
7457
7568
|
.TP
|
|
7458
7569
|
.B \-\-var <name=value...>
|
|
7459
|
-
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).
|
|
7460
7571
|
.TP
|
|
7461
7572
|
.B \-\-prop <name=value...>
|
|
7462
|
-
Set a JDBC connection property. Merges, same
|
|
7573
|
+
Set a JDBC connection property. Merges, same secret syntax
|
|
7463
7574
|
.TP
|
|
7464
7575
|
.B \-\-unset\-var <name...>
|
|
7465
7576
|
Remove a JDBC template variable. Merging alone can never remove a key
|
|
@@ -7468,7 +7579,10 @@ Remove a JDBC template variable. Merging alone can never remove a key
|
|
|
7468
7579
|
Remove a JDBC connection property
|
|
7469
7580
|
.TP
|
|
7470
7581
|
.B \-\-vars\-file <path>
|
|
7471
|
-
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)
|
|
7472
7586
|
.TP
|
|
7473
7587
|
.B \-\-ssh\-target\-host\-variable <name>
|
|
7474
7588
|
Template variable holding the tunnelled host (JDBC)
|
|
@@ -7480,16 +7594,16 @@ Template variable holding the tunnelled port (JDBC)
|
|
|
7480
7594
|
Java runtime for JDBC operations. Machine\-local only
|
|
7481
7595
|
.TP
|
|
7482
7596
|
.B \-\-host <host>
|
|
7483
|
-
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.
|
|
7484
7598
|
.TP
|
|
7485
7599
|
.B \-\-port <port>
|
|
7486
7600
|
Update DB port
|
|
7487
7601
|
.TP
|
|
7488
7602
|
.B \-\-user <user>
|
|
7489
|
-
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).
|
|
7490
7604
|
.TP
|
|
7491
7605
|
.B \-\-password <password>
|
|
7492
|
-
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).
|
|
7493
7607
|
.TP
|
|
7494
7608
|
.B \-\-database <db>
|
|
7495
7609
|
Update DB database name
|
|
@@ -7553,10 +7667,15 @@ Examples:
|
|
|
7553
7667
|
postman dataset source update orders\-db \e
|
|
7554
7668
|
\-d 14e30f6c\-1234\-1234\-1234\-cafef00dc0de \-\-host db.internal.example
|
|
7555
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
|
+
|
|
7556
7675
|
JDBC:
|
|
7557
7676
|
Rotate one credential, leaving everything else alone:
|
|
7558
7677
|
postman dataset source update orders \-d ./orders.dataset.yaml \e
|
|
7559
|
-
\-\-
|
|
7678
|
+
\-\-prop password=vault:PG_PASSWORD_2024_11
|
|
7560
7679
|
|
|
7561
7680
|
Remove a variable the template no longer uses:
|
|
7562
7681
|
postman dataset source update orders \-d ./orders.dataset.yaml \e
|
|
@@ -7571,6 +7690,26 @@ JDBC:
|
|
|
7571
7690
|
Run `postman dataset source test \-d <dataset> \-n <name>` afterwards to check
|
|
7572
7691
|
the change actually connects.
|
|
7573
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
|
+
|
|
7574
7713
|
|
|
7575
7714
|
|
|
7576
7715
|
.SS "dataset source test"
|
|
@@ -7618,7 +7757,12 @@ JSON output (\-\-json):
|
|
|
7618
7757
|
Error codes: SOURCE_NOT_FOUND (with available[]), SOURCE_NOT_TESTABLE,
|
|
7619
7758
|
SOURCE_NOT_JDBC, SOURCE_CONFIG_UNAVAILABLE, CONNECTION_FAILED,
|
|
7620
7759
|
CONN_AUTH_FAILED, CONNECTION_TIMEOUT, JAVA_NOT_FOUND, DRIVER_LOAD_FAILED,
|
|
7621
|
-
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
|
|
7622
7766
|
|
|
7623
7767
|
|
|
7624
7768
|
|
|
@@ -8097,6 +8241,9 @@ Read the secret value from stdin instead of prompting; implies \-\-terminal
|
|
|
8097
8241
|
.TP
|
|
8098
8242
|
.B \-\-timeout <seconds>
|
|
8099
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)
|
|
8100
8247
|
|
|
8101
8248
|
.TP Examples:
|
|
8102
8249
|
|
|
@@ -8112,6 +8259,23 @@ Examples:
|
|
|
8112
8259
|
postman secret create MY_SECRET \-\-team\-id 451 \-\-workspace 00000000\-0000\-0000\-0000\-000000000000
|
|
8113
8260
|
printf '%s' 's3cr3t' | postman secret create MY_SECRET \-\-team\-id 451 \-\-value\-stdin
|
|
8114
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
|
+
|
|
8115
8279
|
|
|
8116
8280
|
|
|
8117
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
|
}
|