postman-cli 1.75.0 → 1.77.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 CHANGED
@@ -1,4 +1,4 @@
1
- .TH POSTMAN 1 "2026-10-16" "v1.75.0" "Postman CLI Manual"
1
+ .TH POSTMAN 1 "2026-10-26" "v1.77.0" "Postman CLI Manual"
2
2
  .SH NAME
3
3
  postman \- Command\-line companion utility for Postman
4
4
  .SH SYNOPSIS
@@ -9,9 +9,9 @@ The Postman CLI is a command\-line companion utility that brings the power of Po
9
9
  .br
10
10
  Note: All commands support the --help option for more information..
11
11
  .SH LOCAL AND CLOUD WORKFLOWS
12
- Postman CLI works locally by default for filesystem\-backed entities such as collections, environments, and API specifications. Commands that support cloud resources document the parameter that switches them to a Postman workspace, such as --workspace <id> or an equivalent. Use those workspace\-scoped options when you want the command to read from or write to cloud entities instead of local files.
12
+ Postman CLI treats the local postman/ folder as the working area for filesystem\-backed entities such as collections, environments, and API specifications. A Postman workspace on the cloud stores that context so it can be retrieved later or shared with other work. Commands that support workspace\-stored resources document the parameter that reads from or writes to a Postman workspace, such as --workspace <id> or an equivalent.
13
13
  .br
14
- The filesystem\-backed entities can be synced to and from the cloud, using `workspace <push|pull>`.
14
+ Use postman workspace pull to retrieve workspace context into the folder before work, and postman workspace push to store the folder's updated context back in the workspace.
15
15
  .br
16
16
  .SH POSTMAN PLUGIN FOR CODING AGENTS
17
17
  The Postman plugin provides Postman MCP setup, collection workflows, API discovery, testing, mocks, documentation, and API readiness guidance for supported coding agents.
@@ -95,9 +95,6 @@ Emit machine\-readable output for agents
95
95
  .B \-\-dry\-run
96
96
  Report what would happen without writing anything
97
97
  .TP
98
- .B \-\-no\-fetch
99
- Use the skills bundled with this CLI instead of fetching the latest
100
- .TP
101
98
  .B \-\-spec <path>
102
99
  Which spec is authoritative, when more than one could be
103
100
  .TP
@@ -114,7 +111,7 @@ Dispatch init events to the API Catalog and Application Inventory ingestion pipe
114
111
 
115
112
  No authentication, and safe in CI. Fetches the latest skills over HTTPS,
116
113
  falling back to the copy bundled with this CLI if that is unreachable \-
117
- so it still works offline. \-\-no\-fetch skips the attempt.
114
+ so it still works offline.
118
115
 
119
116
  Not the same as `postman app init`, which writes a postman.config.cjs
120
117
  for test\-traffic capture.
@@ -246,10 +243,8 @@ Exit codes:
246
243
  3 not current, and \-\-strict was passed
247
244
 
248
245
  States:
249
- current matches what is published
250
- behind a newer version exists \- run `postman skills update`
251
- modified edited locally; update needs \-\-force
252
- unknown written before init recorded hashes, so not comparable
246
+ current the skills match what is published
247
+ behind skills are missing or out of date \- run `postman skills update`
253
248
 
254
249
  Set POSTMAN_SKILLS_URL to check against a different origin.
255
250
 
@@ -319,6 +314,9 @@ Generate artifacts from a collection.
319
314
  .B collection sync
320
315
  Sync artifacts generated from a collection.
321
316
  .TP
317
+ .B collection share
318
+ Grant a role on a collection to one or more people.
319
+ .TP
322
320
  .B collection request
323
321
  Add, get, update, or remove requests in a local v3 collection.
324
322
  .TP
@@ -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
@@ -590,6 +594,36 @@ Examples:
590
594
 
591
595
 
592
596
 
597
+ .SS "collection share"
598
+ Grant a role on a collection to one or more people.
599
+
600
+ .B Usage:
601
+ [options] <id>
602
+
603
+ .B Options:
604
+ .TP
605
+ .B \-\-user <email|id>
606
+ Who to share with. Repeatable, and each value may be a comma\-separated list. A value containing @ is treated as an email address, anything else as a Postman user id.
607
+ .TP
608
+ .B \-\-role <viewer|editor>
609
+ The role to grant. (default: viewer)
610
+ .TP
611
+ .B \-\-json
612
+ Print the outcome as machine\-readable JSON.
613
+ .TP
614
+ .B \-\-timeout <ms>
615
+ Milliseconds to wait for Postman. Defaults to 30000.
616
+ .TP
617
+ .B \-\-api\-key <key>
618
+ Postman API key (defaults to your `postman login` session)
619
+
620
+ .TP Examples:
621
+
622
+ Eg. postman collection share 12345678\-0f9a3d1e\-4c2b\-4a77\-9c31\-6b1f2e8d4a05 \-\-user alice@corp.com
623
+ postman collection share 6984fed9bf61ff8f9e097d30 \-\-user alice@corp.com \-\-role editor
624
+ postman collection share 12345678\-0f9a3d1e\-... \-\-user alice@corp.com,bob@corp.com \-\-json
625
+
626
+
593
627
  .SS "collection request"
594
628
  Add, get, update, or remove requests in a local v3 collection.
595
629
 
@@ -630,6 +664,9 @@ Request type: http, graphql, grpc, websocket, socketio. (default: http)
630
664
  .B \-w, \-\-workspace <id>
631
665
  Target a Postman cloud workspace by id (cloud mode).
632
666
  .TP
667
+ .B \-m, \-\-message <text>
668
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
669
+ .TP
633
670
  .B \-\-json
634
671
  JSON output.
635
672
 
@@ -729,6 +766,9 @@ Target a Postman cloud workspace by id (cloud mode).
729
766
  .B \-\-type <type>
730
767
  Request type for cloud mode: http, graphql, grpc, websocket, socketio. (default: http)
731
768
  .TP
769
+ .B \-m, \-\-message <text>
770
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
771
+ .TP
732
772
  .B \-\-json
733
773
  JSON output.
734
774
 
@@ -766,6 +806,9 @@ Target a Postman cloud workspace by id (cloud mode).
766
806
  .B \-\-type <type>
767
807
  Request type for cloud mode: http, graphql, grpc, websocket, socketio. (default: http)
768
808
  .TP
809
+ .B \-m, \-\-message <text>
810
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
811
+ .TP
769
812
  .B \-\-json
770
813
  JSON output.
771
814
 
@@ -817,6 +860,9 @@ Parent folder within the collection, e.g. "Users/Admin". Defaults to the root.
817
860
  .B \-w, \-\-workspace <id>
818
861
  Target a Postman cloud workspace by id (cloud mode).
819
862
  .TP
863
+ .B \-m, \-\-message <text>
864
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
865
+ .TP
820
866
  .B \-\-json
821
867
  JSON output.
822
868
 
@@ -892,6 +938,9 @@ Replace folder scripts. event is prerequest or test; script is @file, \- for std
892
938
  .B \-w, \-\-workspace <id>
893
939
  Target a Postman cloud workspace by id (cloud mode).
894
940
  .TP
941
+ .B \-m, \-\-message <text>
942
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
943
+ .TP
895
944
  .B \-\-json
896
945
  JSON output.
897
946
 
@@ -927,6 +976,9 @@ Skip the confirmation prompt (required when stdout is not a TTY).
927
976
  .B \-w, \-\-workspace <id>
928
977
  Target a Postman cloud workspace by id (cloud mode).
929
978
  .TP
979
+ .B \-m, \-\-message <text>
980
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
981
+ .TP
930
982
  .B \-\-json
931
983
  JSON output.
932
984
 
@@ -987,6 +1039,9 @@ Example type: http (default). (default: http)
987
1039
  .B \-w, \-\-workspace <id>
988
1040
  Target a Postman cloud workspace by id (cloud mode).
989
1041
  .TP
1042
+ .B \-m, \-\-message <text>
1043
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
1044
+ .TP
990
1045
  .B \-\-json
991
1046
  JSON output.
992
1047
 
@@ -1063,6 +1118,9 @@ Target a Postman cloud workspace by id (cloud mode).
1063
1118
  .B \-\-type <type>
1064
1119
  Example type for cloud mode: http. (default: http)
1065
1120
  .TP
1121
+ .B \-m, \-\-message <text>
1122
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
1123
+ .TP
1066
1124
  .B \-\-json
1067
1125
  JSON output.
1068
1126
 
@@ -1089,6 +1147,9 @@ Target a Postman cloud workspace by id (cloud mode).
1089
1147
  .B \-\-type <type>
1090
1148
  Example type for cloud mode: http. (default: http)
1091
1149
  .TP
1150
+ .B \-m, \-\-message <text>
1151
+ Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Cloud mode only.
1152
+ .TP
1092
1153
  .B \-\-json
1093
1154
  JSON output.
1094
1155
 
@@ -1362,11 +1423,8 @@ Exports the cookie jar to a file after completing the run
1362
1423
  .B \-\-verbose
1363
1424
  Show detailed information of collection run and each request sent
1364
1425
  .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
1426
  .B \-\-port <port>
1369
- Port for the \-\-mock server or \-\-simulation (e.g. 4010), or "auto" for a free one. Defaults to the configured port. Only valid with \-\-mock or \-\-simulation.
1427
+ Port for the \-\-simulation server (e.g. 4010), or "auto" for a free one. Defaults to the configured port. Only valid with \-\-simulation.
1370
1428
  .TP
1371
1429
  .B \-\-use\-mock <mapping>
1372
1430
  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 +1443,8 @@ Do not dispatch run events (results, \-\-simulation start history, and analytics
1385
1443
 
1386
1444
  .TP Examples:
1387
1445
  Eg. postman collection run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab
1388
- postman collection run <id> \-\-mock ./postman/mocks/orders # a mock in your repository
1389
- postman collection run <id> \-\-mock 12345678\-90ab\-cdef\-1234\-567890abcdef # a mock in Postman cloud
1446
+ postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./postman/mocks/orders" # a mock in your repository
1447
+ postman collection run <id> \-\-use\-mock "{{baseurl}} mock:12345678\-90ab\-cdef\-1234\-567890abcdef" # a mock in Postman cloud
1390
1448
  postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./mock/config.yaml delay"
1391
1449
  postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./a.yaml" \-\-use\-mock "api.com mock\-server:9d8e7f6a"
1392
1450
 
@@ -1408,6 +1466,9 @@ List environments in a Postman workspace.
1408
1466
  .B environment get
1409
1467
  Read an environment by ID or local environment file path.
1410
1468
  .TP
1469
+ .B environment share
1470
+ Grant a role on a cloud environment to one or more people.
1471
+ .TP
1411
1472
  .B environment delete
1412
1473
  Delete an environment by ID or local environment file path. Prompts unless \-\-yes is passed.
1413
1474
  .TP
@@ -1504,6 +1565,39 @@ Examples:
1504
1565
 
1505
1566
 
1506
1567
 
1568
+ .SS "environment share"
1569
+ Grant a role on a cloud environment to one or more people.
1570
+
1571
+ .B Usage:
1572
+ [options] <environmentId>
1573
+
1574
+ .B Options:
1575
+ .TP
1576
+ .B \-\-user <email|id>
1577
+ Who to share with. Repeatable, and each value may be a comma\-separated list. A value containing @ is treated as an email address, anything else as a Postman user id.
1578
+ .TP
1579
+ .B \-\-role <viewer|editor>
1580
+ The role to grant. (default: viewer)
1581
+ .TP
1582
+ .B \-\-json
1583
+ Print the outcome as machine\-readable JSON.
1584
+ .TP
1585
+ .B \-\-timeout <ms>
1586
+ Milliseconds to wait for Postman. Defaults to 30000.
1587
+ .TP
1588
+ .B \-\-api\-key <key>
1589
+ Postman API key (defaults to your `postman login` session)
1590
+
1591
+ .TP Examples:
1592
+
1593
+ Eg. postman environment share 12345678\-7c1e9b44\-3a21\-4f6d\-9e84\-1d2c3b4a5f60 \-\-user alice@corp.com
1594
+ postman environment share 12345678\-7c1e9b44\-... \-\-user platform\-team@corp.com \-\-role editor
1595
+ postman environment share 12345678\-7c1e9b44\-... \-\-user 31415926,31415925 \-\-json
1596
+
1597
+ Only a cloud environment can be shared. `editor` grants read and rewrite of every
1598
+ variable value, secrets included.
1599
+
1600
+
1507
1601
  .SS "environment delete"
1508
1602
  Delete an environment by ID or local environment file path. Prompts unless \-\-yes is passed.
1509
1603
 
@@ -1942,7 +2036,7 @@ The ID of the runner to execute
1942
2036
  The secret key for the runner
1943
2037
  .TP
1944
2038
  .B \-\-region <region>
1945
- Region this runner reports to \-\- use "eu" for the EU region
2039
+ Data residency of the Postman account the runner belongs to: "us" (default) or "eu". This is not a monitor runner region
1946
2040
  .TP
1947
2041
  .B \-\-proxy <url>
1948
2042
  External proxy URL, for example http://proxy.com or http://proxy.com:8080
@@ -1983,10 +2077,23 @@ List the team's registered self\-hosted runners.
1983
2077
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
1984
2078
  .TP
1985
2079
  .B \-w, \-\-workspace <id>
1986
- Filter to runners in this workspace
2080
+ Only runners this workspace can use: runners scoped to it and runners shared with the whole team
1987
2081
  .TP
1988
2082
  .B \-\-json
1989
- Output the runner list as JSON instead of a table
2083
+ Print { runners } as JSON, every field present (null when unset)
2084
+
2085
+ .TP Examples:
2086
+
2087
+ Pass a runner's ID to `postman monitor create \-\-runner` or `postman runner start \-\-id`.
2088
+
2089
+ Examples:
2090
+ postman runner list
2091
+ postman runner list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
2092
+ postman runner list \-\-json
2093
+
2094
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
2095
+
2096
+
1990
2097
 
1991
2098
  .SS "runner regions"
1992
2099
  List the region and private\-runner values valid for monitor create/update \-\-runner, with the static IP Postman runs each one from, where your team has access to it.
@@ -2000,7 +2107,19 @@ List the region and private\-runner values valid for monitor create/update \-\-r
2000
2107
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
2001
2108
  .TP
2002
2109
  .B \-\-json
2003
- Output the region list as JSON instead of a table
2110
+ Print { regions } as JSON, every field present (null when unset)
2111
+
2112
+ .TP Examples:
2113
+
2114
+ Pass a region's ID to `postman monitor create \-\-runner`.
2115
+
2116
+ Examples:
2117
+ postman runner regions
2118
+ postman runner regions \-\-json
2119
+
2120
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
2121
+
2122
+
2004
2123
 
2005
2124
  .SS "spec"
2006
2125
  Lint and validate Specifications from the command line
@@ -2311,10 +2430,10 @@ Generate artifacts from a specification.
2311
2430
  .B Subcommands:
2312
2431
  .TP
2313
2432
  .B spec generate collection
2314
- Generate a Postman collection from a specification.
2433
+ Generate a Postman collection from an OpenAPI or AsyncAPI (Kafka) specification. Only Kafka AsyncAPI 2.x and 3.0 specs are supported: the spec must declare a kafka or kafka\-secure server.
2315
2434
 
2316
2435
  .SS "spec generate collection"
2317
- Generate a Postman collection from a specification.
2436
+ Generate a Postman collection from an OpenAPI or AsyncAPI (Kafka) specification. Only Kafka AsyncAPI 2.x and 3.0 specs are supported: the spec must declare a kafka or kafka\-secure server.
2318
2437
 
2319
2438
  .B Usage:
2320
2439
  [options] <spec>
@@ -2325,7 +2444,7 @@ Generate a Postman collection from a specification.
2325
2444
  Collection name
2326
2445
  .TP
2327
2446
  .B \-\-folder\-strategy <strategy>
2328
- Folder strategy: Paths or Tags (default: Paths) (default: Paths)
2447
+ Folder strategy: Paths or Tags (default: Paths). OpenAPI only (default: Paths)
2329
2448
  .TP
2330
2449
  .B \-w, \-\-workspace <id>
2331
2450
  Workspace ID (cloud mode)
@@ -2342,6 +2461,7 @@ Examples:
2342
2461
  postman spec generate collection ./openapi.yaml \-n "My API"
2343
2462
  postman spec generate collection ./openapi.yaml \-n "My API" \-\-folder\-strategy Tags
2344
2463
  postman spec generate collection ./openapi.yaml \-n "My API" \-\-force
2464
+ postman spec generate collection ./kafka\-asyncapi.yaml \-n "Order Events"
2345
2465
  postman spec generate collection 12345678\-abcd\-1234\-abcd\-1234567890ab \-n "My API"
2346
2466
 
2347
2467
 
@@ -2372,10 +2492,10 @@ Collection ID to sync (required for cloud mode)
2372
2492
  Postman API key
2373
2493
  .TP
2374
2494
  .B \-\-force
2375
- Overwrite hand\-written scripts, headers and descriptions that the spec would otherwise drop
2495
+ Overwrite hand\-written scripts, headers and descriptions that the spec would otherwise drop (OpenAPI), or collection files that could not be read (AsyncAPI)
2376
2496
  .TP
2377
2497
  .B \-\-dry\-run
2378
- Report what sync would change and remove without writing anything
2498
+ Report what sync would change and remove without writing anything (OpenAPI only)
2379
2499
 
2380
2500
  .TP Examples:
2381
2501
 
@@ -2418,7 +2538,7 @@ Run and manage Postman monitors.
2418
2538
  .B Subcommands:
2419
2539
  .TP
2420
2540
  .B monitor run
2421
- Invoke a monitor run and display results.
2541
+ Run a monitor now and report the result.
2422
2542
  .TP
2423
2543
  .B monitor create
2424
2544
  Create a collection\-based monitor.
@@ -2430,16 +2550,16 @@ Update a monitor's schedule, runner, notifications, request selection or run opt
2430
2550
  Permanently delete a monitor. Prompts for confirmation unless \-\-yes is passed.
2431
2551
  .TP
2432
2552
  .B monitor jobs
2433
- Inspect a monitor's jobs and their per\-region runs.
2553
+ Inspect a monitor's jobs (also called executions) and their per\-runner runs.
2434
2554
  .TP
2435
2555
  .B monitor runs
2436
- Inspect a monitor run's attempts.
2556
+ Inspect one run of a monitor job: its requests, assertions and attempts.
2437
2557
  .TP
2438
2558
  .B monitor list
2439
- List the monitors visible to you.
2559
+ List the monitors visible to you, one page at a time.
2440
2560
  .TP
2441
2561
  .B monitor get
2442
- Show a monitor's configuration.
2562
+ Show a monitor's configuration and its last run.
2443
2563
  .TP
2444
2564
  .B monitor metrics
2445
2565
  Show per\-request latency and outcome history for a monitor.
@@ -2449,9 +2569,12 @@ Pause a monitor, so it stops firing on schedule.
2449
2569
  .TP
2450
2570
  .B monitor resume
2451
2571
  Resume a paused monitor, so it fires on schedule again.
2572
+ .TP
2573
+ .B monitor share
2574
+ Grant a role on a monitor to one or more people.
2452
2575
 
2453
2576
  .SS "monitor run"
2454
- Invoke a monitor run and display results.
2577
+ Run a monitor now and report the result.
2455
2578
 
2456
2579
  .B Usage:
2457
2580
  [options] <monitorId>
@@ -2462,16 +2585,29 @@ Invoke a monitor run and display results.
2462
2585
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2463
2586
  .TP
2464
2587
  .B \-x, \-\-suppress\-exit\-code
2465
- Specify whether or not to override the default exit code for the current run
2588
+ Always exit 0, whatever the run's result or the failure
2466
2589
  .TP
2467
2590
  .B \-t, \-\-timeout <ms>
2468
- Maximum wait time for run completion in milliseconds (default: 15 minutes) (default: 900000)
2591
+ How long to wait for the run to finish, in milliseconds (default: 900000)
2469
2592
  .TP
2470
2593
  .B \-\-async
2471
- Submit the run and return immediately with its job id and Postman URL, without waiting for completion
2594
+ Submit the run and print its job id and Postman URL without waiting for it to finish
2472
2595
  .TP
2473
2596
  .B \-\-json
2474
- Output the run's verdict as JSON instead of a table, printing nothing else
2597
+ Print { state, monitorId, jobId, url, stats } as JSON, and nothing else
2598
+
2599
+ .TP Examples:
2600
+
2601
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
2602
+
2603
+ Examples:
2604
+ postman monitor run 12345678\-90ab\-cdef\-1234\-567890abcdef
2605
+ postman monitor run 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-timeout 300000 \-\-json
2606
+ postman monitor run 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-async
2607
+
2608
+ Exit codes: 0 the run succeeded, or was submitted with \-\-async; 1 the run failed, errored or aborted, or the command failed; 2 usage error; 3 authentication failure; 7 the run was submitted but its result is unknown.
2609
+
2610
+
2475
2611
 
2476
2612
  .SS "monitor create"
2477
2613
  Create a collection\-based monitor.
@@ -2482,19 +2618,19 @@ Create a collection\-based monitor.
2482
2618
  .B Options:
2483
2619
  .TP
2484
2620
  .B \-c, \-\-collection <id>
2485
- Collection to monitor \-\- accepts the id shown in the Postman app, prefixed or bare
2621
+ Collection to monitor: its id or uid, from the Postman app or `postman collection list`
2486
2622
  .TP
2487
2623
  .B \-\-name <name>
2488
2624
  Monitor name (defaults to the linked collection's own name)
2489
2625
  .TP
2490
2626
  .B \-e, \-\-environment <id>
2491
- Environment to run the monitored collection with
2627
+ Environment to run the collection with: its uid, from the Postman app or `postman environment list`
2492
2628
  .TP
2493
2629
  .B \-w, \-\-workspace <id>
2494
- Workspace to create the monitor in (defaults to the workspace named in the local .postman/resources.yaml manifest; required if neither is available)
2630
+ Workspace to create the monitor in, from `postman workspace list` (defaults to the workspace named in the local .postman/resources.yaml manifest; required if neither is available)
2495
2631
  .TP
2496
2632
  .B \-\-schedule <cron>
2497
- Cron expression for the monitor's schedule
2633
+ Cron expression for the monitor's schedule, five fields: minute hour day\-of\-month month day\-of\-week, for example "0 9 * * MON". Leave month as * unless the monitor should run only in certain months; then write the month as a name (jan\-dec)
2498
2634
  .TP
2499
2635
  .B \-\-timezone <tz>
2500
2636
  Time zone for \-\-schedule, for example America/New_York (defaults to the host machine's own zone)
@@ -2512,10 +2648,10 @@ Email to notify on a run failure or error (repeatable) (default: )
2512
2648
  Consecutive failure notifications to send before muting them
2513
2649
  .TP
2514
2650
  .B \-\-retry <n>
2515
- Times to retry a failed run
2651
+ Times to retry a failed run: \-\-retry 2 allows up to 3 attempts
2516
2652
  .TP
2517
2653
  .B \-\-timeout <ms>
2518
- Request timeout in milliseconds
2654
+ Per\-request timeout the monitor applies when it runs, in milliseconds (this command does not wait for a run; `postman monitor run \-\-timeout` sets how long that waits)
2519
2655
  .TP
2520
2656
  .B \-\-delay <ms>
2521
2657
  Delay between requests in milliseconds
@@ -2551,7 +2687,7 @@ Do not trigger an immediate run after creating the monitor
2551
2687
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2552
2688
  .TP
2553
2689
  .B \-\-json
2554
- Output as JSON instead of a table
2690
+ Print the outcome, the created monitor's id, uid, name and active state, and the job of its first run, as JSON
2555
2691
 
2556
2692
  .TP Examples:
2557
2693
 
@@ -2562,6 +2698,8 @@ Examples:
2562
2698
  postman monitor create \-\-collection <id> \-\-item <request\-id> \-\-item <folder\-id>
2563
2699
  postman monitor create \-\-collection <id> \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef
2564
2700
 
2701
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure, 7 failed after it was sent and may have applied.
2702
+
2565
2703
 
2566
2704
 
2567
2705
  .SS "monitor update"
@@ -2576,7 +2714,7 @@ Update a monitor's schedule, runner, notifications, request selection or run opt
2576
2714
  New monitor name
2577
2715
  .TP
2578
2716
  .B \-\-schedule <cron>
2579
- New cron expression for the monitor's schedule
2717
+ New cron expression for the monitor's schedule, five fields: minute hour day\-of\-month month day\-of\-week, for example "0 9 * * MON". Leave month as * unless the monitor should run only in certain months; then write the month as a name (jan\-dec)
2580
2718
  .TP
2581
2719
  .B \-\-timezone <tz>
2582
2720
  Time zone for \-\-schedule, for example America/New_York (defaults to the host machine's own zone)
@@ -2597,7 +2735,7 @@ Email to notify on a run failure or error (repeatable; replaces the current list
2597
2735
  Remove every notification recipient
2598
2736
  .TP
2599
2737
  .B \-e, \-\-environment <id>
2600
- Environment to run the monitored collection with (replaces the current one)
2738
+ Environment to run the collection with, replacing the current one: its uid, from `postman environment list`
2601
2739
  .TP
2602
2740
  .B \-\-clear\-environment
2603
2741
  Run the monitored collection with no environment
@@ -2606,10 +2744,10 @@ Run the monitored collection with no environment
2606
2744
  Consecutive failure notifications to send before muting them
2607
2745
  .TP
2608
2746
  .B \-\-retry <n>
2609
- Times to retry a failed run
2747
+ Times to retry a failed run: \-\-retry 2 allows up to 3 attempts
2610
2748
  .TP
2611
2749
  .B \-\-timeout <ms>
2612
- Request timeout in milliseconds
2750
+ Per\-request timeout the monitor applies when it runs, in milliseconds (this command does not wait for a run; `postman monitor run \-\-timeout` sets how long that waits)
2613
2751
  .TP
2614
2752
  .B \-\-delay <ms>
2615
2753
  Delay between requests in milliseconds
@@ -2642,20 +2780,24 @@ How iteration data is consumed, for example round_robin, repeat_last or stop_at_
2642
2780
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2643
2781
  .TP
2644
2782
  .B \-\-json
2645
- Output as JSON instead of a table
2783
+ Print the outcome and the monitor's id, uid, name and active state as JSON
2646
2784
 
2647
2785
  .TP Examples:
2648
2786
 
2787
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
2788
+ The linked collection is fixed when a monitor is created: create a new monitor to run another collection. Pause or resume a monitor with `postman monitor pause` and `postman monitor resume`.
2789
+
2649
2790
  Examples:
2650
- postman monitor update <id> \-\-schedule "0 */6 * * *" \-\-timezone UTC
2651
- postman monitor update <id> \-\-notify\-email a@example.com \-\-notify\-email b@example.com
2652
- postman monitor update <id> \-\-clear\-notifications
2653
- postman monitor update <id> \-\-runner us\-east \-\-runner <self\-hosted\-runner\-id>
2654
- postman monitor update <id> \-\-item <request\-id> \-\-item <folder\-id>
2655
- postman monitor update <id> \-\-clear\-items
2656
- postman monitor update <id> \-\-environment 12345678\-90ab\-cdef\-1234\-567890abcdef
2791
+ postman monitor update <monitorId> \-\-schedule "0 */6 * * *" \-\-timezone UTC
2792
+ postman monitor update <monitorId> \-\-notify\-email a@example.com \-\-notify\-email b@example.com
2793
+ postman monitor update <monitorId> \-\-clear\-notifications
2794
+ postman monitor update <monitorId> \-\-runner us\-east \-\-runner <self\-hosted\-runner\-id>
2795
+ postman monitor update <monitorId> \-\-item <request\-id> \-\-item <folder\-id>
2796
+ postman monitor update <monitorId> \-\-clear\-items
2797
+ postman monitor update <monitorId> \-\-environment 12345678\-90ab\-cdef\-1234\-567890abcdef
2798
+
2799
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure, 7 failed after it was sent and may have applied.
2657
2800
 
2658
- This command cannot change a monitor's linked collection \-\- that is fixed when the monitor is created, so run a different collection by creating a new monitor. It does not pause or resume a monitor either; use `monitor pause`/`monitor resume` for that.
2659
2801
 
2660
2802
 
2661
2803
  .SS "monitor delete"
@@ -2667,25 +2809,29 @@ Permanently delete a monitor. Prompts for confirmation unless \-\-yes is passed.
2667
2809
  .B Options:
2668
2810
  .TP
2669
2811
  .B \-y, \-\-yes
2670
- Skip the confirmation prompt
2812
+ Skip the confirmation prompt; required when there is no interactive terminal or with \-\-silent
2671
2813
  .TP
2672
2814
  .B \-\-api\-key <key>
2673
2815
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2674
2816
  .TP
2675
2817
  .B \-\-json
2676
- Output the outcome, including any failure, as JSON instead of a plain message
2818
+ Print the outcome (deleted or aborted) and the monitor id as JSON
2677
2819
 
2678
2820
  .TP Examples:
2679
2821
 
2822
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
2823
+
2680
2824
  Examples:
2681
2825
  postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef
2682
2826
  postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-yes
2683
2827
  postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-yes \-\-json
2684
2828
 
2829
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure, 7 failed after it was sent and may have applied, 5 the prompt was declined, 8 refused with no terminal (or with \-\-silent) and no \-\-yes.
2830
+
2685
2831
 
2686
2832
 
2687
2833
  .SS "monitor jobs"
2688
- Inspect a monitor's jobs and their per\-region runs.
2834
+ Inspect a monitor's jobs (also called executions) and their per\-runner runs.
2689
2835
 
2690
2836
  .B Usage:
2691
2837
  [options] [command]
@@ -2693,13 +2839,13 @@ Inspect a monitor's jobs and their per\-region runs.
2693
2839
  .B Subcommands:
2694
2840
  .TP
2695
2841
  .B monitor jobs list
2696
- List a monitor's recent jobs.
2842
+ List a monitor's recent jobs, newest first. A job (also called an execution) is one firing of the monitor, with one run per runner.
2697
2843
  .TP
2698
2844
  .B monitor jobs get
2699
- Report one job's terminal state and its per\-region run outcomes.
2845
+ Show one job (also called an execution) and the state, runner and duration of each of its runs. A run's duration covers every attempt, including retries.
2700
2846
 
2701
2847
  .SS "monitor jobs list"
2702
- List a monitor's recent jobs.
2848
+ List a monitor's recent jobs, newest first. A job (also called an execution) is one firing of the monitor, with one run per runner.
2703
2849
 
2704
2850
  .B Usage:
2705
2851
  [options] <monitorId>
@@ -2707,28 +2853,41 @@ List a monitor's recent jobs.
2707
2853
  .B Options:
2708
2854
  .TP
2709
2855
  .B \-\-api\-key <key>
2710
- Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
2856
+ Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2711
2857
  .TP
2712
- .B \-\-result <value>
2713
- Filter by outcome, for example success, failure, error or abort
2858
+ .B \-\-result <state>
2859
+ Only jobs that finished in this state: success, failure, error or abort; any other value is rejected before any request
2714
2860
  .TP
2715
2861
  .B \-\-trigger <value>
2716
- Filter by trigger, for example api, schedule, webhook or postman\-cli
2862
+ Only jobs started by this trigger: api, schedule, webhook or postman\-cli; any other value is rejected before any request
2717
2863
  .TP
2718
2864
  .B \-\-since <dateTime>
2719
2865
  Only jobs that finished at or after this ISO 8601 date\-time
2720
2866
  .TP
2721
2867
  .B \-\-limit <n>
2722
- Maximum number of jobs to return
2868
+ Jobs per page, 1\-25 (default: 25)
2723
2869
  .TP
2724
- .B \-\-cursor <token>
2725
- Opaque pagination cursor
2870
+ .B \-\-cursor <page>
2871
+ Page number to read, from the "Next page" line or `nextCursor` under \-\-json of a previous listing; pass the same \-\-limit and filters
2726
2872
  .TP
2727
2873
  .B \-\-json
2728
- Output as JSON instead of a table
2874
+ Print { monitorId, jobs, nextCursor } as JSON, each job with its runs
2875
+
2876
+ .TP Examples:
2877
+
2878
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
2879
+
2880
+ Examples:
2881
+ postman monitor jobs list 12345678\-90ab\-cdef\-1234\-567890abcdef
2882
+ postman monitor jobs list 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-result failure \-\-limit 10
2883
+ postman monitor jobs list 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-limit 10 \-\-cursor 2 \-\-json
2884
+
2885
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
2886
+
2887
+
2729
2888
 
2730
2889
  .SS "monitor jobs get"
2731
- Report one job's terminal state and its per\-region run outcomes.
2890
+ Show one job (also called an execution) and the state, runner and duration of each of its runs. A run's duration covers every attempt, including retries.
2732
2891
 
2733
2892
  .B Usage:
2734
2893
  [options] <jobId>
@@ -2736,13 +2895,25 @@ Report one job's terminal state and its per\-region run outcomes.
2736
2895
  .B Options:
2737
2896
  .TP
2738
2897
  .B \-\-api\-key <key>
2739
- Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
2898
+ Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2740
2899
  .TP
2741
2900
  .B \-\-json
2742
- Output as JSON instead of a table
2901
+ Print the job as JSON, with each run's state, runner, counts, duration and attempts
2902
+
2903
+ .TP Examples:
2904
+
2905
+ <jobId> comes from `postman monitor jobs list`, `postman monitor run \-\-async` or `postman monitor create`.
2906
+
2907
+ Examples:
2908
+ postman monitor jobs get 1f1c0a7b\-9311\-48b0\-94f0\-ce07ac77a104
2909
+ postman monitor jobs get 1f1c0a7b\-9311\-48b0\-94f0\-ce07ac77a104 \-\-json
2910
+
2911
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
2912
+
2913
+
2743
2914
 
2744
2915
  .SS "monitor runs"
2745
- Inspect a monitor run's attempts.
2916
+ Inspect one run of a monitor job: its requests, assertions and attempts.
2746
2917
 
2747
2918
  .B Usage:
2748
2919
  [options] [command]
@@ -2750,10 +2921,12 @@ Inspect a monitor run's attempts.
2750
2921
  .B Subcommands:
2751
2922
  .TP
2752
2923
  .B monitor runs get
2753
- Report which test assertions ran during one attempt of a run, which failed, and why.
2924
+ Show one attempt of a run: each request with its response or error, and its assertions, console lines and exceptions. A retried run has several attempts, numbered from 0; the latest is shown unless \-\-attempt names another.
2925
+ Console, assertion and exception messages are the collection's own output, printed as the run recorded them.
2754
2926
 
2755
2927
  .SS "monitor runs get"
2756
- Report which test assertions ran during one attempt of a run, which failed, and why.
2928
+ Show one attempt of a run: each request with its response or error, and its assertions, console lines and exceptions. A retried run has several attempts, numbered from 0; the latest is shown unless \-\-attempt names another.
2929
+ Console, assertion and exception messages are the collection's own output, printed as the run recorded them.
2757
2930
 
2758
2931
  .B Usage:
2759
2932
  [options] <runId>
@@ -2761,19 +2934,32 @@ Report which test assertions ran during one attempt of a run, which failed, and
2761
2934
  .B Options:
2762
2935
  .TP
2763
2936
  .B \-\-api\-key <key>
2764
- Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
2937
+ Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2765
2938
  .TP
2766
2939
  .B \-\-attempt <n>
2767
- Which attempt of the run to show, where 0 is the first (default: the most recent)
2940
+ Which attempt to show, from 0 for the first (default: the latest)
2768
2941
  .TP
2769
2942
  .B \-\-failed\-only
2770
- Show only failed assertions
2943
+ Show only requests with a failed assertion, an exception or a network error
2771
2944
  .TP
2772
2945
  .B \-\-json
2773
- Output as JSON instead of a table
2946
+ Print the run as JSON: its state, attempt, assertion counts and every request with its entries
2947
+
2948
+ .TP Examples:
2949
+
2950
+ <runId> comes from `postman monitor jobs get <jobId>`.
2951
+
2952
+ Examples:
2953
+ postman monitor runs get 1f1c0a7b\-9c8f\-4610\-bfce\-e1a02ff245ff
2954
+ postman monitor runs get 1f1c0a7b\-9c8f\-4610\-bfce\-e1a02ff245ff \-\-attempt 0 \-\-failed\-only
2955
+ postman monitor runs get 1f1c0a7b\-9c8f\-4610\-bfce\-e1a02ff245ff \-\-json
2956
+
2957
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
2958
+
2959
+
2774
2960
 
2775
2961
  .SS "monitor list"
2776
- List the monitors visible to you.
2962
+ List the monitors visible to you, one page at a time.
2777
2963
 
2778
2964
  .B Usage:
2779
2965
  [options]
@@ -2784,59 +2970,63 @@ List the monitors visible to you.
2784
2970
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2785
2971
  .TP
2786
2972
  .B \-w, \-\-workspace <id>
2787
- Filter to monitors in this workspace
2973
+ Only monitors in this workspace (ids from `postman workspace list`)
2788
2974
  .TP
2789
2975
  .B \-c, \-\-collection <id>
2790
- Filter to monitors on this collection
2976
+ Only monitors on this collection: its id or uid
2791
2977
  .TP
2792
2978
  .B \-e, \-\-environment <id>
2793
- Filter to monitors on this environment
2979
+ Only monitors on this environment: its uid
2794
2980
  .TP
2795
2981
  .B \-\-runner <id>
2796
- Filter to a self\-hosted runner id, not a Postman region. Cannot be combined with \-\-workspace, \-\-collection, \-\-environment, \-\-owner, \-\-team or \-\-active
2982
+ Only monitors on this self\-hosted runner id, from `postman runner list` (not a Postman region). Cannot be combined with \-\-workspace, \-\-collection, \-\-environment, \-\-owner or \-\-active
2797
2983
  .TP
2798
2984
  .B \-\-owner <id>
2799
- Filter to monitors created by this user id (shown in the Owner column)
2985
+ Only monitors created by this user id: the `owner` field under \-\-json
2800
2986
  .TP
2801
2987
  .B \-\-team
2802
- Filter to monitors owned by your own team
2988
+ Accepted and ignored: every listing is limited to your team
2803
2989
  .TP
2804
2990
  .B \-\-active <true|false>
2805
- Filter by active state
2991
+ Only active (true) or paused (false) monitors
2806
2992
  .TP
2807
2993
  .B \-\-limit <n>
2808
- Maximum number of monitors to return (Postman caps the page size and rejects a larger value)
2994
+ Monitors per page, 1\-25
2809
2995
  .TP
2810
2996
  .B \-\-cursor <token>
2811
- Pagination cursor from a previous page's response
2997
+ Page to read: the cursor from the "Next page" line of a previous listing, or `nextCursor` under \-\-json; pass the same filters and \-\-limit
2812
2998
  .TP
2813
2999
  .B \-\-columns <names>
2814
- Comma\-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available: State, Notifications, Environment, Runners
3000
+ Comma\-separated columns to show. Defaults to Name, ID, State, Health, Schedule, Owner, Collection, dropping Collection, Owner, Schedule in that order when the table is wider than the terminal. Also available: Environment, Runners, Notifications
2815
3001
  .TP
2816
3002
  .B \-\-no\-headers
2817
- Omit the header row
3003
+ Omit the header row and its rule
2818
3004
  .TP
2819
3005
  .B \-f, \-\-filter <text>
2820
- Show only monitors whose name contains this text (applies to the returned page, case\-insensitive)
3006
+ Only monitors whose name contains this text, case\-insensitive (applies to the returned page)
2821
3007
  .TP
2822
3008
  .B \-\-sort <field>
2823
3009
  Sort the returned page by "name" or "active"
2824
3010
  .TP
2825
3011
  .B \-\-json
2826
- Output as JSON instead of a table
3012
+ Print { monitors, nextCursor } as JSON, every monitor field except lastRun present (null when unset); monitor get carries lastRun
2827
3013
 
2828
3014
  .TP Examples:
2829
3015
 
2830
- Eg. postman monitor list
2831
- postman monitor list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
2832
- postman monitor list \-\-active true \-\-sort name
2833
- postman monitor list \-\-runner 12345678\-90ab\-cdef\-1234\-567890abcdef
2834
- postman monitor list \-\-columns Name,State \-\-no\-headers
2835
- postman monitor list \-\-json
3016
+ Examples:
3017
+ postman monitor list
3018
+ postman monitor list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
3019
+ postman monitor list \-\-active true \-\-sort name
3020
+ postman monitor list \-\-runner 12345678\-90ab\-cdef\-1234\-567890abcdef
3021
+ postman monitor list \-\-columns Name,State \-\-no\-headers
3022
+ postman monitor list \-\-limit 10 \-\-cursor <nextCursor> \-\-json
3023
+
3024
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
3025
+
2836
3026
 
2837
3027
 
2838
3028
  .SS "monitor get"
2839
- Show a monitor's configuration.
3029
+ Show a monitor's configuration and its last run.
2840
3030
 
2841
3031
  .B Usage:
2842
3032
  [options] <monitorId>
@@ -2847,12 +3037,26 @@ Show a monitor's configuration.
2847
3037
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2848
3038
  .TP
2849
3039
  .B \-\-json
2850
- Output as JSON instead of a table
3040
+ Print the monitor as JSON, every field present (null when unset)
2851
3041
 
2852
3042
  .TP Examples:
2853
3043
 
2854
- Eg. postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef
2855
- postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
3044
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
3045
+
3046
+ The Requests row lists the ids of the requests the monitor runs, in the
3047
+ order it runs them, which can differ from the collection's own order. Under
3048
+ \-\-json they are options.requestSelection, in the same order. A folder id is
3049
+ marked (folder).
3050
+ "All requests" means the monitor runs every request in the collection, in the
3051
+ collection's own order. To see which request an id is, run
3052
+ `postman collection get <collection\-id> \-\-json`.
3053
+
3054
+ Examples:
3055
+ postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef
3056
+ postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
3057
+
3058
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
3059
+
2856
3060
 
2857
3061
 
2858
3062
  .SS "monitor metrics"
@@ -2876,17 +3080,23 @@ Only executions at or before this ISO 8601 date\-time (defaults to now)
2876
3080
  Show only requests whose name contains this text (case\-insensitive)
2877
3081
  .TP
2878
3082
  .B \-\-limit <n>
2879
- Maximum number of rows to show: executions, newest first, under \-\-json, or requests, worst\-behaving first, in the table. Applied to the results after they are fetched, so it does not make the command faster
3083
+ Rows to show, any positive whole number: the worst\-behaving requests in the table, or the newest executions under \-\-json. Applied after the results are fetched
2880
3084
  .TP
2881
3085
  .B \-\-json
2882
- Output as JSON instead of a table
3086
+ Print { monitorId, window, metricsAvailable, executions } as JSON, one entry per request per job per runner
2883
3087
 
2884
3088
  .TP Examples:
2885
3089
 
2886
- Eg. postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef
2887
- postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-since 2026\-09\-01T00:00:00Z
2888
- postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-filter "GET /health"
2889
- postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
3090
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
3091
+
3092
+ Examples:
3093
+ postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef
3094
+ postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-since 2026\-09\-01T00:00:00Z
3095
+ postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-filter "GET /health"
3096
+ postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
3097
+
3098
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure.
3099
+
2890
3100
 
2891
3101
 
2892
3102
  .SS "monitor pause"
@@ -2901,7 +3111,19 @@ Pause a monitor, so it stops firing on schedule.
2901
3111
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2902
3112
  .TP
2903
3113
  .B \-\-json
2904
- Output as JSON instead of a table
3114
+ Print the outcome and the monitor's id, uid, name and active state as JSON
3115
+
3116
+ .TP Examples:
3117
+
3118
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
3119
+
3120
+ Examples:
3121
+ postman monitor pause 12345678\-90ab\-cdef\-1234\-567890abcdef
3122
+ postman monitor pause 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
3123
+
3124
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure, 7 failed after it was sent and may have applied.
3125
+
3126
+
2905
3127
 
2906
3128
  .SS "monitor resume"
2907
3129
  Resume a paused monitor, so it fires on schedule again.
@@ -2915,7 +3137,51 @@ Resume a paused monitor, so it fires on schedule again.
2915
3137
  Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session, then a guest session)
2916
3138
  .TP
2917
3139
  .B \-\-json
2918
- Output as JSON instead of a table
3140
+ Print the outcome and the monitor's id, uid, name and active state as JSON
3141
+
3142
+ .TP Examples:
3143
+
3144
+ <monitorId> is the ID column of `postman monitor list`, or the monitor's uid.
3145
+
3146
+ Examples:
3147
+ postman monitor resume 12345678\-90ab\-cdef\-1234\-567890abcdef
3148
+ postman monitor resume 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
3149
+
3150
+ Exit codes: 0 success, 1 failed, 2 usage error, 3 authentication failure, 7 failed after it was sent and may have applied.
3151
+
3152
+
3153
+
3154
+ .SS "monitor share"
3155
+ Grant a role on a monitor to one or more people.
3156
+
3157
+ .B Usage:
3158
+ [options] <monitorId>
3159
+
3160
+ .B Options:
3161
+ .TP
3162
+ .B \-\-user <email|id>
3163
+ Who to share with. Repeatable, and each value may be a comma\-separated list. A value containing @ is treated as an email address, anything else as a Postman user id.
3164
+ .TP
3165
+ .B \-\-role <viewer|editor>
3166
+ The role to grant. (default: viewer)
3167
+ .TP
3168
+ .B \-\-json
3169
+ Print the outcome as machine\-readable JSON.
3170
+ .TP
3171
+ .B \-\-timeout <ms>
3172
+ Milliseconds to wait for Postman. Defaults to 30000.
3173
+ .TP
3174
+ .B \-\-api\-key <key>
3175
+ Postman API key (defaults to your `postman login` session)
3176
+
3177
+ .TP Examples:
3178
+
3179
+ Eg. postman monitor share 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-user alice@corp.com
3180
+ postman monitor share 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-user alice@corp.com,bob@corp.com \-\-role editor
3181
+ postman monitor share 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-user alice@corp.com \-\-json
3182
+
3183
+ `editor` is what allows pausing, resuming and rescheduling the monitor.
3184
+
2919
3185
 
2920
3186
  .SS "workspace"
2921
3187
  Manage workspace resources.
@@ -2949,8 +3215,11 @@ Create a Postman workspace and bind it to this git repository.
2949
3215
  .B workspace delete
2950
3216
  Permanently delete a workspace and everything in it. Prompts for confirmation unless \-\-yes is passed.
2951
3217
  .TP
3218
+ .B workspace share
3219
+ Grant a role on a workspace to one or more people.
3220
+ .TP
2952
3221
  .B workspace pull
2953
- Pull workspace entities from a Postman workspace into the local git\-native folder.
3222
+ Pull workspace entities from a Postman workspace into the local folder.
2954
3223
  .TP
2955
3224
  .B workspace connect-git
2956
3225
  Connect a Postman workspace to a local git repository.
@@ -3173,8 +3442,9 @@ Print the created workspace as machine\-readable JSON.
3173
3442
 
3174
3443
  .TP Examples:
3175
3444
 
3176
- Requires a login (`postman login`) or POSTMAN_API_KEY. A guest session
3177
- has no account to own a workspace: run `postman signup` first.
3445
+ Requires a login (`postman login`), POSTMAN_API_KEY, or the guest session
3446
+ `postman init` starts. A guest owns the team it was given, so it can create
3447
+ workspaces in it; `postman signup` claims the account and keeps them.
3178
3448
  Refuses to run on CI: create once locally and commit the binding.
3179
3449
 
3180
3450
  Examples:
@@ -3217,8 +3487,38 @@ Examples:
3217
3487
 
3218
3488
 
3219
3489
 
3490
+ .SS "workspace share"
3491
+ Grant a role on a workspace to one or more people.
3492
+
3493
+ .B Usage:
3494
+ [options] <workspaceId>
3495
+
3496
+ .B Options:
3497
+ .TP
3498
+ .B \-\-user <email|id>
3499
+ Who to share with. Repeatable, and each value may be a comma\-separated list. A value containing @ is treated as an email address, anything else as a Postman user id.
3500
+ .TP
3501
+ .B \-\-role <viewer|editor>
3502
+ The role to grant. (default: viewer)
3503
+ .TP
3504
+ .B \-\-json
3505
+ Print the outcome as machine\-readable JSON.
3506
+ .TP
3507
+ .B \-\-timeout <ms>
3508
+ Milliseconds to wait for Postman. Defaults to 30000.
3509
+ .TP
3510
+ .B \-\-api\-key <key>
3511
+ Postman API key (defaults to your `postman login` session)
3512
+
3513
+ .TP Examples:
3514
+
3515
+ Eg. postman workspace share 0f9a3d1e\-4c2b\-4a77\-9c31\-6b1f2e8d4a05 \-\-user alice@corp.com
3516
+ postman workspace share 0f9a3d1e\-... \-\-user alice@corp.com,bob@corp.com \-\-role editor
3517
+ postman workspace share 0f9a3d1e\-... \-\-user 31415926 \-\-json
3518
+
3519
+
3220
3520
  .SS "workspace pull"
3221
- Pull workspace entities from a Postman workspace into the local git\-native folder.
3521
+ Pull workspace entities from a Postman workspace into the local folder.
3222
3522
 
3223
3523
  .B Usage:
3224
3524
  [options] [workspaceId]
@@ -3241,10 +3541,9 @@ Show detailed logging
3241
3541
 
3242
3542
  Examples:
3243
3543
  postman workspace pull
3244
- Pull from the workspace connected to the current directory's git remote
3544
+ Pull from the workspace configured for the current directory
3245
3545
  postman workspace pull <workspaceId>
3246
- Connect the workspace to the current directory's git remote and pull
3247
- from the workspace.
3546
+ Pull from the workspace; connect Git first when an origin remote exists.
3248
3547
  postman workspace pull \-\-source\-workspace <workspaceId>
3249
3548
  Pull from another workspace
3250
3549
 
@@ -3541,9 +3840,9 @@ Load segments:
3541
3840
  ramp\-up — 2 segments
3542
3841
 
3543
3842
  peak ┤ _________ at peak __________
3544
- │ ramp\-up _____╱
3545
- │ ______╱
3546
- base ┤__ warm\-up ___╱
3843
+ │ ramp\-up _____/
3844
+ │ ______/
3845
+ base ┤__ warm\-up ___/
3547
3846
  └┬─────────────┬─────────────┬───────────────────────────┤ \-\-duration
3548
3847
  1 2 (3)
3549
3848
 
@@ -3555,10 +3854,10 @@ Load segments:
3555
3854
 
3556
3855
  spike — 3 segments · no time at the peak; use \-\-load\-profile peak to hold
3557
3856
 
3558
- peak ┤ ╱╲
3559
- │ ramp\-up _╱ ╲_ ramp\-down
3560
- │ _╱ ╲_
3561
- base ┤______ warm\-up _______╱ ╲______ at base _______
3857
+ peak ┤ /\e
3858
+ │ ramp\-up _/ \e_ ramp\-down
3859
+ │ _/ \e_
3860
+ base ┤______ warm\-up _______/ \e______ at base _______
3562
3861
  └┬─────────────────────┬─────┬─────┬─────────────────────┤ \-\-duration
3563
3862
  1 2 3 (4)
3564
3863
 
@@ -3571,9 +3870,9 @@ Load segments:
3571
3870
  peak — 4 segments
3572
3871
 
3573
3872
  peak ┤ __ hold ___
3574
- │ ramp\-up ____╱ ╲____ ramp\-down
3575
- │ ____╱ ╲____
3576
- base ┤_ warm\-up _╱ ╲_ at base __
3873
+ │ ramp\-up ____/ \e____ ramp\-down
3874
+ │ ____/ \e____
3875
+ base ┤_ warm\-up _/ \e_ at base __
3577
3876
  └┬──────────┬──────────┬──────────┬──────────┬───────────┤ \-\-duration
3578
3877
  1 2 3 4 (5)
3579
3878
 
@@ -4759,7 +5058,7 @@ Create, run, and manage Postman mocks — in your repository or in Postman cloud
4759
5058
  .B Subcommands:
4760
5059
  .TP
4761
5060
  .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.
5061
+ 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
5062
  .TP
4764
5063
  .B mock run
4765
5064
  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 +5082,7 @@ Show the requests a live mock server has received and the responses it sent, usi
4783
5082
  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
5083
 
4785
5084
  .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.
5085
+ 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
5086
 
4788
5087
  .B Usage:
4789
5088
  [sourcePath] [options]
@@ -4809,10 +5108,22 @@ Overwrite the mock's files if the target folder already has one
4809
5108
  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
5109
  .TP
4811
5110
  .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.
5111
+ 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.
5112
+ .TP
5113
+ .B \-\-deploy
5114
+ 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.
5115
+ .TP
5116
+ .B \-\-public
5117
+ With \-\-deploy, let anyone with the link reach the server (default: callers need an API key)
5118
+ .TP
5119
+ .B \-s, \-\-slug <slug>
5120
+ With \-\-deploy, the short label used in the server's web address
5121
+ .TP
5122
+ .B \-\-json
5123
+ Print the result (with \-\-deploy, the live server details) as machine\-readable data instead of a summary
4813
5124
  .TP
4814
5125
  .B \-\-api\-key <key>
4815
- Postman API key to use with \-\-workspace (defaults to your `postman login` session)
5126
+ Postman API key to use with \-\-workspace or \-\-deploy (defaults to your `postman login` session)
4816
5127
  .TP
4817
5128
  .B \-x, \-\-suppress\-exit\-code
4818
5129
  Always exit with code 0, even on failure
@@ -4823,6 +5134,8 @@ Eg. postman mock generate ./my\-collection.json
4823
5134
  postman mock generate \-\-name "My Mock" # sample shopping\-cart mock
4824
5135
  postman mock generate \-\-name "My Mock" \-\-port 4010 # sample mock, custom port
4825
5136
  postman mock generate ./openapi.yaml \-\-output ./postman/mocks/api \-\-port 4010
5137
+ postman mock generate ./openapi.yaml \-n orders \-\-deploy # generate and get a live URL
5138
+ postman mock generate ./openapi.yaml \-n orders \-\-deploy \-\-json # same, machine\-readable
4826
5139
  postman mock generate ./openapi.yaml \-\-stateful # CRUD handlers backed by pm.state
4827
5140
  postman mock generate ./my\-collection.json \-\-update ./postman/mocks/orders
4828
5141
  postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # save to Postman cloud
@@ -4899,6 +5212,9 @@ Postman cloud workspace to upload to, by id (defaults to the workspace already l
4899
5212
  .TP
4900
5213
  .B \-\-api\-key <key>
4901
5214
  Postman API key (defaults to your `postman login` session)
5215
+ .TP
5216
+ .B \-\-json
5217
+ Print the result as machine\-readable data
4902
5218
 
4903
5219
  .TP Examples:
4904
5220
 
@@ -4938,6 +5254,9 @@ Use the defaults and skip all questions (private, no auto\-deploy)
4938
5254
  .TP
4939
5255
  .B \-\-api\-key <key>
4940
5256
  Postman API key (defaults to your `postman login` session)
5257
+ .TP
5258
+ .B \-\-json
5259
+ Print the live server details as machine\-readable data instead of a summary (asks no questions)
4941
5260
 
4942
5261
  .TP Examples:
4943
5262
 
@@ -4963,7 +5282,7 @@ Show a mock's details using its path if it lives in your repository, or its id i
4963
5282
  Postman API key (defaults to your `postman login` session)
4964
5283
  .TP
4965
5284
  .B \-\-json
4966
- Print the details as machine\-readable data instead of a table
5285
+ Print the details as machine\-readable data instead of a summary
4967
5286
 
4968
5287
  .TP Examples:
4969
5288
 
@@ -5059,6 +5378,9 @@ Delete without asking for confirmation first
5059
5378
  .TP
5060
5379
  .B \-\-api\-key <key>
5061
5380
  Postman API key, used with a Postman cloud id (defaults to your `postman login` session)
5381
+ .TP
5382
+ .B \-\-json
5383
+ Print the result as machine\-readable data (requires \-\-yes)
5062
5384
 
5063
5385
  .TP Examples:
5064
5386
 
@@ -5268,7 +5590,7 @@ Create, run and manage simulations — serve several mocks behind one address.
5268
5590
  .B Subcommands:
5269
5591
  .TP
5270
5592
  .B simulation create
5271
- Create a simulation that serves several mocks behind one address
5593
+ Create a simulation that serves several mocks behind one address. Add \-\-deploy to also make it a live mock server.
5272
5594
  .TP
5273
5595
  .B simulation list
5274
5596
  List the simulations in your repository or Postman cloud workspace
@@ -5295,7 +5617,7 @@ Show the requests a deployed simulation has received and the responses it sent,
5295
5617
  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
5618
 
5297
5619
  .SS "simulation create"
5298
- Create a simulation that serves several mocks behind one address
5620
+ Create a simulation that serves several mocks behind one address. Add \-\-deploy to also make it a live mock server.
5299
5621
 
5300
5622
  .B Usage:
5301
5623
  [options]
@@ -5318,7 +5640,19 @@ Where to save the simulation file in your repository, a file or folder (defaults
5318
5640
  Overwrite the simulation file if it already exists
5319
5641
  .TP
5320
5642
  .B \-w, \-\-workspace <id>
5321
- Postman cloud workspace to create the simulation in, by id (defaults to the workspace already linked to this project)
5643
+ 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)
5644
+ .TP
5645
+ .B \-\-deploy
5646
+ After creating, upload the simulation (and its mocks) to Postman cloud and deploy it to a live mock server (private by default).
5647
+ .TP
5648
+ .B \-\-public
5649
+ With \-\-deploy, let anyone with the link reach the server (default: callers need an API key)
5650
+ .TP
5651
+ .B \-s, \-\-slug <slug>
5652
+ With \-\-deploy, the short label used in the server's web address
5653
+ .TP
5654
+ .B \-\-json
5655
+ Print the result (with \-\-deploy, the live server details) as machine\-readable data instead of a summary
5322
5656
  .TP
5323
5657
  .B \-\-api\-key <key>
5324
5658
  Postman API key (defaults to your `postman login` session)
@@ -5329,8 +5663,10 @@ Eg. postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \
5329
5663
  postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments=payments \-\-routing header
5330
5664
  postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-o ./postman/simulations/checkout.sim.yaml
5331
5665
  postman simulation create \-n "Checkout" \-w <workspace\-id> \-\-mock <mock\-id>=payments
5666
+ postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-\-deploy # live URL
5667
+ postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \-\-deploy \-\-json
5332
5668
 
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.
5669
+ 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
5670
 
5335
5671
 
5336
5672
  .SS "simulation list"
@@ -5374,7 +5710,7 @@ Show a simulation's details using its .sim.yaml path if it lives in your reposit
5374
5710
  Postman API key (defaults to your `postman login` session)
5375
5711
  .TP
5376
5712
  .B \-\-json
5377
- Print the details as machine\-readable data instead of a table
5713
+ Print the details as machine\-readable data instead of a summary
5378
5714
 
5379
5715
  .TP Examples:
5380
5716
 
@@ -5424,7 +5760,7 @@ Live output format: auto (default, human\-readable logs) or ndjson (one JSON eve
5424
5760
  Show request and response headers and bodies for each request. By default each request prints one line, plus any applied scenario or error.
5425
5761
  .TP
5426
5762
  .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. Requires a simulation.yaml (routing config), not a .sim.yaml.
5763
+ 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
5764
  .TP
5429
5765
  .B \-\-proxy\-port <n>
5430
5766
  Port for the proxy server. Distinct from \-\-port, which is the one\-port run's own port. (default: 7001)
@@ -5455,10 +5791,10 @@ All member mocks share one address. With path routing (default) the first path s
5455
5791
 
5456
5792
  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
5793
 
5458
- Eg. postman simulation run ./simulation.yaml \-\-proxy # mocks + intercepting proxy
5459
- postman simulation run ./simulation.yaml \-\-proxy \-\-doctor # check your client honors it
5794
+ Eg. postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy
5795
+ postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy \-\-doctor
5460
5796
 
5461
- \-\-proxy starts the mocks on throwaway ports behind the proxy and records no start history.
5797
+ \-\-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
5798
 
5463
5799
 
5464
5800
  .SS "simulation push"
@@ -5474,6 +5810,9 @@ Postman cloud workspace to upload to, by id (defaults to the workspace already l
5474
5810
  .TP
5475
5811
  .B \-\-api\-key <key>
5476
5812
  Postman API key (defaults to your `postman login` session)
5813
+ .TP
5814
+ .B \-\-json
5815
+ Print the result as machine\-readable data
5477
5816
 
5478
5817
  .TP Examples:
5479
5818
 
@@ -5502,21 +5841,27 @@ Name for the mock server (you are asked for one if you skip this)
5502
5841
  .B \-s, \-\-slug <slug>
5503
5842
  Short label used in the server's web address, e.g. "my\-sim" (you are asked for one if you skip this)
5504
5843
  .TP
5844
+ .B \-\-public
5845
+ Let anyone with the link reach the server. Private by default (callers must send a Postman API key).
5846
+ .TP
5505
5847
  .B \-\-private
5506
- Require a Postman API key to reach the server. Public by default.
5848
+ Require a Postman API key to reach the server (the default; kept for compatibility).
5507
5849
  .TP
5508
5850
  .B \-y, \-\-yes
5509
- Use the defaults and skip all questions (public)
5851
+ Use the defaults and skip all questions (private)
5510
5852
  .TP
5511
5853
  .B \-\-api\-key <key>
5512
5854
  Postman API key (defaults to your `postman login` session)
5855
+ .TP
5856
+ .B \-\-json
5857
+ Print the live server details as machine\-readable data instead of a summary (asks no questions)
5513
5858
 
5514
5859
  .TP Examples:
5515
5860
 
5516
5861
  simulationId is the id of a simulation in Postman cloud (find it with `postman simulation list`).
5517
5862
 
5518
5863
  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 \-\-private
5864
+ postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-sim \-\-public
5520
5865
  postman simulation deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-sim \-y # no questions asked
5521
5866
 
5522
5867
  Don't have the simulation in Postman cloud yet? Upload it first with `postman simulation push`.
@@ -5620,6 +5965,9 @@ Delete without asking for confirmation first
5620
5965
  .TP
5621
5966
  .B \-\-api\-key <key>
5622
5967
  Postman API key, used with a Postman cloud id (defaults to your `postman login` session)
5968
+ .TP
5969
+ .B \-\-json
5970
+ Print the result as machine\-readable data (requires \-\-yes)
5623
5971
 
5624
5972
  .TP Examples:
5625
5973
 
@@ -5911,9 +6259,6 @@ Output the ask record as JSON
5911
6259
  .B \-\-no\-include\-answer
5912
6260
  Do not ask the service to include the answer inline
5913
6261
  .TP
5914
- .B \-\-max\-steps <count>
5915
- Cap the reasoning steps the service may take (its default applies when omitted)
5916
- .TP
5917
6262
  .B \-\-interval <seconds>
5918
6263
  With \-\-wait, seconds between polls (default: 2)
5919
6264
  .TP
@@ -5939,7 +6284,6 @@ Examples:
5939
6284
  postman context\-graph ask "What does postman\-app do?" \-\-wait
5940
6285
  postman context\-graph ask "What depends on billing\-api?" \-\-wait \-\-json
5941
6286
  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
6287
 
5944
6288
 
5945
6289
 
@@ -7051,7 +7395,7 @@ Bind values to $1, $2, ... in order; pass multiple values after \-p or repeat \-
7051
7395
  Postman API key (defaults to the `postman login` session)
7052
7396
  .TP
7053
7397
  .B \-\-json
7054
- Output rows as JSON instead of a table
7398
+ Output rows as JSON instead of a table; a failure prints a JSON error on stdout
7055
7399
  .TP
7056
7400
  .B \-\-debug
7057
7401
  Include safe classified dataset diagnostics
@@ -7065,6 +7409,15 @@ Examples:
7065
7409
  \-q 'SELECT * FROM users WHERE id = $1 AND active = $2' \-p 42 true
7066
7410
  postman dataset query 14e30f6c\-1234\-1234\-1234\-cafef00dc0de \-q "SELECT * FROM users LIMIT 5"
7067
7411
 
7412
+ JSON output (\-\-json):
7413
+ Success: the query result itself (unchanged; not wrapped in an envelope).
7414
+ Failure: {"ok":false,"error":{"code","message","remediation"?,...context}}, exit 1.
7415
+ With \-\-source, rows stream as they arrive; a failure after rows were written closes
7416
+ the result with the rows so far plus "ok":false and "error", exit 1.
7417
+ Either way stdout holds one JSON document, so `\-\-json 2>/dev/null | jq .` parses it.
7418
+ "code" is the dataset error code when one is known (e.g. SECRET_RESOLUTION_FAILED,
7419
+ SQL_SYNTAX, AUTH_FAILED, PLAN_RESTRICTED), else DATASET_COMMAND_FAILED.
7420
+
7068
7421
 
7069
7422
 
7070
7423
  .SS "dataset create"
@@ -7227,13 +7580,16 @@ Label for this driver type (defaults to the JAR filename)
7227
7580
  JDBC URL with {{placeholders}}, e.g. jdbc:postgresql://{{host}}:{{port}}/{{database}}
7228
7581
  .TP
7229
7582
  .B \-\-var <name=value...>
7230
- Value for a {{placeholder}}. Repeatable. Use vault:<vaultId>/<secretId> for a secret. WARNING: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.
7583
+ 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
7584
  .TP
7232
7585
  .B \-\-prop <name=value...>
7233
- Driver connection property. Repeatable. Same vault: syntax as \-\-var
7586
+ Driver connection property. Repeatable. Same secret syntax as \-\-var
7234
7587
  .TP
7235
7588
  .B \-\-vars\-file <path>
7236
- JSON object of \-\-var values; "\-" reads stdin. Supports {"$vaultId":..,"$secretId":..} objects, and keeps secrets out of argv entirely
7589
+ 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
7590
+ .TP
7591
+ .B \-w, \-\-workspace <workspaceId>
7592
+ Workspace whose Shared Vault resolves vault:<KEY> (falls back to .postman/resources.yaml in the current directory)
7237
7593
  .TP
7238
7594
  .B \-\-from\-source <name>
7239
7595
  Reuse another source's driver JAR, class and URL template
@@ -7254,16 +7610,16 @@ Template variable holding the tunnelled port (inferred when omitted)
7254
7610
  Emit the result as JSON instead of prose
7255
7611
  .TP
7256
7612
  .B \-\-host <host>
7257
- DB host (mysql/postgresql/sqlserver)
7613
+ DB host (mysql/postgresql/sqlserver). Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below.
7258
7614
  .TP
7259
7615
  .B \-\-port <port>
7260
7616
  DB port (defaults to 1433 for sqlserver)
7261
7617
  .TP
7262
7618
  .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). Prefer a Shared Vault reference.
7619
+ 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
7620
  .TP
7265
7621
  .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). Prefer a Shared Vault reference.
7622
+ 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
7623
  .TP
7268
7624
  .B \-\-database <db>
7269
7625
  DB database name
@@ -7330,6 +7686,23 @@ Format selection:
7330
7686
  Execution:
7331
7687
  \-\-upload runs file\-backed queries in the cloud service. Without \-\-upload, the local engine reads the file.
7332
7688
 
7689
+ Database credentials from the Shared Vault:
7690
+ postman secret create PG_USER PG_PASSWORD \-\-json # values go in a browser form
7691
+ postman dataset source add \-d ./orders.dataset.yaml \-n orders \-\-type postgresql \e
7692
+ \-\-host db.internal \-\-port 5432 \-\-database shop \-\-table orders \e
7693
+ \-\-user vault:PG_USER \-\-password vault:PG_PASSWORD \-w <workspaceId>
7694
+ (\-w names the workspace holding the secrets; omit it in a folder bound with
7695
+ `postman init`.)
7696
+
7697
+ In CI, from the environment (reads POSTMAN_VAULT_PG_USER / POSTMAN_VAULT_PG_PASSWORD):
7698
+ postman dataset source add \-d ./orders.dataset.yaml \-n orders \-\-type postgresql \e
7699
+ \-\-database shop \-\-table orders \-\-vars\-file ./db.json
7700
+ # db.json — safe to commit, it holds no secret values:
7701
+ {"host":"db.internal","port":5432,"user":"env:PG_USER","password":"env:PG_PASSWORD"}
7702
+ env: replaces the Vault, not the Postman account: running a database dataset
7703
+ still needs credentials. `collection run` reads POSTMAN_API_KEY; other dataset
7704
+ commands need `postman login \-\-with\-api\-key "$POSTMAN_API_KEY"` or \-\-api\-key.
7705
+
7333
7706
  JDBC:
7334
7707
  Start with `postman dataset jdbc inspect <jar>`. Its output maps onto these
7335
7708
  flags directly: suggestedUrlTemplate \-> \-\-url\-template, templateVariables \->
@@ -7340,28 +7713,45 @@ JDBC:
7340
7713
  \-\-driver\-jar ./drivers/postgresql\-42.7.4.jar \e
7341
7714
  \-\-url\-template 'jdbc:postgresql://{{host}}:{{port}}/{{database}}' \e
7342
7715
  \-\-var host=db.internal \-\-var port=5432 \-\-var database=shop \e
7343
- \-\-var user=vault:acme/pg\-user \-\-var password=vault:acme/pg\-pass
7716
+ \-\-prop user=vault:PG_USER \-\-prop password=vault:PG_PASSWORD
7717
+
7718
+ \-\-var only fills {{placeholders}} in the URL template; credentials the
7719
+ template does not mention go in as driver properties (\-\-prop).
7344
7720
 
7345
7721
  Reuse that driver for a second source, no rediscovery needed:
7346
7722
  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
7723
+ \-\-from\-source orders \-\-var host=db.internal \-\-var port=5432 \-\-var database=refunds \e
7724
+ \-\-prop user=vault:PG_USER \-\-prop password=vault:PG_PASSWORD
7725
+ (\-\-from\-source reuses the driver, class and template; credentials are per source.)
7348
7726
 
7349
7727
  Secrets:
7350
- \-\-var <k>=vault:<vaultId>/<secretId> reference a Shared Vault secret (preferred)
7351
- \-\-var <k>=<literal> plaintext: visible in `ps` output and shell
7352
- history, and stored in clear text in the
7353
- dataset YAML. Warned about at run time.
7728
+ Flags that take a credential accept any of these as their value:
7729
+ vault:<KEY> Shared Vault secret, by key (or id), in \-\-workspace.
7730
+ Looked up once and stored as {$vaultId,$secretId},
7731
+ exactly as the Postman app stores it. Preferred.
7732
+ vault:<vaultId>/<secretId> Shared Vault secret, by explicit ids; no lookup.
7733
+ env:<NAME> Read from the environment variable POSTMAN_VAULT_<NAME>
7734
+ (not a Postman environment) when the dataset runs —
7735
+ the CI idiom. Local .dataset.yaml only; the Postman
7736
+ app cannot resolve it. Only POSTMAN_VAULT_* variables
7737
+ are readable, so a dataset file cannot pick up other
7738
+ secrets on the machine.
7739
+ <literal> Plaintext: in `ps` output, shell history and the
7740
+ stored dataset. Works, with a warning.
7741
+ \-\-vars\-file <path|\-> The same values as a JSON object; "\-" reads stdin,
7742
+ so even a literal stays out of argv. Also accepts
7743
+ {"$vaultId":..,"$secretId":..} objects.
7744
+ Create a secret with `postman secret create <KEY>`; list them with
7745
+ `postman secret list`. Local Vault secrets are not supported; use a Shared Vault.
7354
7746
  A secret written directly into \-\-url\-template is rejected: a literal has no
7355
7747
  {{name}} to route through \-\-var, so it can never be a Vault reference and
7356
7748
  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
7749
 
7362
- Connection test:
7363
- Runs before the source is written, so a source that cannot connect is never
7750
+ Connection test (JDBC sources):
7751
+ Runs before a JDBC source is written, so one that cannot connect is never
7364
7752
  persisted. Needs a local JRE and a loadable driver. Pass \-\-no\-test to skip it.
7753
+ Database sources (mysql/postgresql/sqlserver) are written without a test; check
7754
+ one with `postman dataset source test \-d <dataset> \-n <name>`.
7365
7755
  \-\-no\-test alone still needs Java to resolve the driver class; on a machine with
7366
7756
  no Java at all, add \-\-driver\-class or \-\-from\-source so nothing has to load it.
7367
7757
 
@@ -7378,17 +7768,20 @@ JSON output (\-\-json):
7378
7768
  Error codes: DRIVER_FILE_NOT_FOUND, DRIVER_CLASS_NOT_FOUND,
7379
7769
  DRIVER_CLASS_AMBIGUOUS (with candidates[]), URL_TEMPLATE_INVALID,
7380
7770
  CONFIG_VALUE_MISSING (with missing[]), URL_TEMPLATE_LITERAL_SECRET,
7381
- VAULT_REFERENCE_INVALID,
7771
+ VAULT_REFERENCE_INVALID, ENV_REFERENCE_INVALID, ENV_REFERENCE_UNSUPPORTED,
7772
+ FILE_REFERENCE_UNSUPPORTED,
7773
+ SECRET_NOT_FOUND, SECRET_AMBIGUOUS (with candidates[]), WORKSPACE_REQUIRED,
7382
7774
  VARS_FILE_UNREADABLE, VARS_FILE_INVALID, SOURCE_NOT_FOUND, SOURCE_NOT_JDBC,
7383
7775
  JAVA_NOT_FOUND, JAVA_UNSUPPORTED, DRIVER_LOAD_FAILED, CONNECTION_FAILED,
7384
- CONNECTION_TIMEOUT, SECRET_RESOLUTION_FAILED, INVALID_ARGUMENT,
7776
+ CONNECTION_TIMEOUT, SECRET_RESOLUTION_FAILED, SECRET_RESOLUTION_TIMEOUT,
7777
+ SECRET_AUTHENTICATION_REQUIRED, SECRET_VAULT_UNAVAILABLE, INVALID_ARGUMENT,
7385
7778
  SPREADSHEET_DESCRIBE_FAILED, SPREADSHEET_NO_WORKSHEETS,
7386
7779
  SPREADSHEET_UNIT_NOT_PINNED, SOURCE_ID_AMBIGUOUS,
7387
7780
  SPREADSHEET_CLOUD_UNSUPPORTED, WORKBOOK_FORMAT_UNSUPPORTED
7388
7781
  Warning codes: PLAINTEXT_SECRET, CONNECTION_NOT_TESTED, NO_VARIABLES,
7389
7782
  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
7783
+ TRUST_SERVER_CERTIFICATE, SSH_VALUES_IN_ARGV, SSH_HOST_KEY_UNVERIFIED,
7784
+ UNUSED_VARIABLE. LOCAL_VAULT_UNSUPPORTED, SOURCE_NAME_CONFLICT, SOURCE_ID_CONFLICT and
7392
7785
  DATASET_FILE_CHANGED are also possible; DATASET_COMMAND_FAILED is the
7393
7786
  fallback for anything unclassified.
7394
7787
 
@@ -7456,10 +7849,10 @@ Rename the JDBC driver type label
7456
7849
  Replace the JDBC URL template
7457
7850
  .TP
7458
7851
  .B \-\-var <name=value...>
7459
- Set a JDBC template variable. Merges onto the existing values. Use vault:<vaultId>/<secretId> for a secret. WARNING: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.
7852
+ 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
7853
  .TP
7461
7854
  .B \-\-prop <name=value...>
7462
- Set a JDBC connection property. Merges, same vault: syntax
7855
+ Set a JDBC connection property. Merges, same secret syntax
7463
7856
  .TP
7464
7857
  .B \-\-unset\-var <name...>
7465
7858
  Remove a JDBC template variable. Merging alone can never remove a key
@@ -7468,7 +7861,10 @@ Remove a JDBC template variable. Merging alone can never remove a key
7468
7861
  Remove a JDBC connection property
7469
7862
  .TP
7470
7863
  .B \-\-vars\-file <path>
7471
- JSON object of \-\-var values; "\-" reads stdin
7864
+ 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
7865
+ .TP
7866
+ .B \-w, \-\-workspace <workspaceId>
7867
+ Workspace whose Shared Vault resolves vault:<KEY> (falls back to .postman/resources.yaml in the current directory)
7472
7868
  .TP
7473
7869
  .B \-\-ssh\-target\-host\-variable <name>
7474
7870
  Template variable holding the tunnelled host (JDBC)
@@ -7480,16 +7876,16 @@ Template variable holding the tunnelled port (JDBC)
7480
7876
  Java runtime for JDBC operations. Machine\-local only
7481
7877
  .TP
7482
7878
  .B \-\-host <host>
7483
- Update DB host (mysql/postgresql/sqlserver)
7879
+ Update DB host (mysql/postgresql/sqlserver). Accepts a secret reference: vault:<KEY> (preferred), vault:<vaultId>/<secretId>, or env:<NAME> — see "Secrets" below.
7484
7880
  .TP
7485
7881
  .B \-\-port <port>
7486
7882
  Update DB port
7487
7883
  .TP
7488
7884
  .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). Prefer a Shared Vault reference.
7885
+ 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
7886
  .TP
7491
7887
  .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). Prefer a Shared Vault reference.
7888
+ 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
7889
  .TP
7494
7890
  .B \-\-database <db>
7495
7891
  Update DB database name
@@ -7553,10 +7949,15 @@ Examples:
7553
7949
  postman dataset source update orders\-db \e
7554
7950
  \-d 14e30f6c\-1234\-1234\-1234\-cafef00dc0de \-\-host db.internal.example
7555
7951
 
7952
+ Rotate a database password onto a Shared Vault secret (\-w names the workspace
7953
+ holding PG_PASSWORD; omit it in a folder bound with `postman init`):
7954
+ postman dataset source update orders\-db \-d ./orders.dataset.yaml \e
7955
+ \-\-password vault:PG_PASSWORD \-w <workspaceId>
7956
+
7556
7957
  JDBC:
7557
7958
  Rotate one credential, leaving everything else alone:
7558
7959
  postman dataset source update orders \-d ./orders.dataset.yaml \e
7559
- \-\-var password=vault:acme/pg\-pass\-2024\-11
7960
+ \-\-prop password=vault:PG_PASSWORD_2024_11
7560
7961
 
7561
7962
  Remove a variable the template no longer uses:
7562
7963
  postman dataset source update orders \-d ./orders.dataset.yaml \e
@@ -7571,6 +7972,26 @@ JDBC:
7571
7972
  Run `postman dataset source test \-d <dataset> \-n <name>` afterwards to check
7572
7973
  the change actually connects.
7573
7974
 
7975
+ Secrets:
7976
+ Flags that take a credential accept any of these as their value:
7977
+ vault:<KEY> Shared Vault secret, by key (or id), in \-\-workspace.
7978
+ Looked up once and stored as {$vaultId,$secretId},
7979
+ exactly as the Postman app stores it. Preferred.
7980
+ vault:<vaultId>/<secretId> Shared Vault secret, by explicit ids; no lookup.
7981
+ env:<NAME> Read from the environment variable POSTMAN_VAULT_<NAME>
7982
+ (not a Postman environment) when the dataset runs —
7983
+ the CI idiom. Local .dataset.yaml only; the Postman
7984
+ app cannot resolve it. Only POSTMAN_VAULT_* variables
7985
+ are readable, so a dataset file cannot pick up other
7986
+ secrets on the machine.
7987
+ <literal> Plaintext: in `ps` output, shell history and the
7988
+ stored dataset. Works, with a warning.
7989
+ \-\-vars\-file <path|\-> The same values as a JSON object; "\-" reads stdin,
7990
+ so even a literal stays out of argv. Also accepts
7991
+ {"$vaultId":..,"$secretId":..} objects.
7992
+ Create a secret with `postman secret create <KEY>`; list them with
7993
+ `postman secret list`. Local Vault secrets are not supported; use a Shared Vault.
7994
+
7574
7995
 
7575
7996
 
7576
7997
  .SS "dataset source test"
@@ -7618,7 +8039,12 @@ JSON output (\-\-json):
7618
8039
  Error codes: SOURCE_NOT_FOUND (with available[]), SOURCE_NOT_TESTABLE,
7619
8040
  SOURCE_NOT_JDBC, SOURCE_CONFIG_UNAVAILABLE, CONNECTION_FAILED,
7620
8041
  CONN_AUTH_FAILED, CONNECTION_TIMEOUT, JAVA_NOT_FOUND, DRIVER_LOAD_FAILED,
7621
- HOST_PROTOCOL_ERROR, SECRET_RESOLUTION_FAILED, DATASET_COMMAND_FAILED
8042
+ HOST_PROTOCOL_ERROR, SECRET_RESOLUTION_FAILED, SECRET_RESOLUTION_TIMEOUT,
8043
+ SECRET_AUTHENTICATION_REQUIRED (no Postman login to resolve a vault: reference),
8044
+ SECRET_VAULT_UNAVAILABLE (Vault is down; retry),
8045
+ ENV_REFERENCE_UNSUPPORTED (an env: reference on a cloud source),
8046
+ FILE_REFERENCE_UNSUPPORTED (a file reference outside ssh_tunnel.private_key),
8047
+ DATASET_COMMAND_FAILED
7622
8048
 
7623
8049
 
7624
8050
 
@@ -8097,6 +8523,9 @@ Read the secret value from stdin instead of prompting; implies \-\-terminal
8097
8523
  .TP
8098
8524
  .B \-\-timeout <seconds>
8099
8525
  Seconds to wait for the browser form (default 300)
8526
+ .TP
8527
+ .B \-\-json
8528
+ Print the created secrets as machine\-readable JSON (never the values)
8100
8529
 
8101
8530
  .TP Examples:
8102
8531
 
@@ -8112,6 +8541,23 @@ Examples:
8112
8541
  postman secret create MY_SECRET \-\-team\-id 451 \-\-workspace 00000000\-0000\-0000\-0000\-000000000000
8113
8542
  printf '%s' 's3cr3t' | postman secret create MY_SECRET \-\-team\-id 451 \-\-value\-stdin
8114
8543
 
8544
+ Use it from a dataset source without copying ids (the key is looked up in the workspace):
8545
+ postman secret create PG_USER PG_PASSWORD \-\-json
8546
+ postman dataset source add \-d ./orders.dataset.yaml \-n orders \-\-type postgresql \e
8547
+ \-\-host db.internal \-\-port 5432 \-\-database shop \-\-table orders \e
8548
+ \-\-user vault:PG_USER \-\-password vault:PG_PASSWORD
8549
+
8550
+ JSON output (\-\-json), all on stdout; prompts, the browser link and the match code
8551
+ go to stderr. Secrets carry the same fields as `secret list \-\-json`; vaultId is null,
8552
+ with "warnings", if it could not be looked up after the secret was created.
8553
+ Success: {"ok":true,"secrets":[{"key":"PG_USER","secretId":"9f3c2a1e","vaultId":"v\-81d2"}]}
8554
+ Partial (exit 4):
8555
+ {"ok":false,"secrets":[{"key":"PG_USER","secretId":"9f3c2a1e","vaultId":"v\-81d2"}],
8556
+ "errors":[{"key":"PG_PASSWORD","message":"Request failed with status 500"}]}
8557
+ Failure: {"ok":false,"error":{"code":"AUTH_FAILED","message":"Invalid API key"}}
8558
+ error.code is INVALID_ARGUMENT (usage), AUTH_FAILED, NETWORK_ERROR,
8559
+ VAULT_REQUEST_FAILED, or SECRET_CREATE_FAILED.
8560
+
8115
8561
 
8116
8562
 
8117
8563
  .SS "secret list"