postman-cli 1.57.0 → 1.59.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 +1206 -158
- package/package.json +6 -6
package/man/postman.1
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.TH POSTMAN 1 "2026-09-
|
|
1
|
+
.TH POSTMAN 1 "2026-09-18" "v1.59.0" "Postman CLI Manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
postman \- Command\-line companion utility for Postman
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -41,7 +41,7 @@ Specify the region for authentication. Use "eu" for EU region.
|
|
|
41
41
|
Show detailed error information
|
|
42
42
|
|
|
43
43
|
.SS "signup"
|
|
44
|
-
Sign up to keep the work you created as a guest (claims your guest workspace).
|
|
44
|
+
Sign up to keep the work you created as a guest (claims your guest workspace). Waits and signs this CLI in once the sign\-up is completed in a browser — opening that browser here on a terminal, or printing the URL to hand over when output is piped.
|
|
45
45
|
|
|
46
46
|
.B Usage:
|
|
47
47
|
[options]
|
|
@@ -49,7 +49,13 @@ Sign up to keep the work you created as a guest (claims your guest workspace). B
|
|
|
49
49
|
.B Options:
|
|
50
50
|
.TP
|
|
51
51
|
.B \-\-browser
|
|
52
|
-
|
|
52
|
+
Always open the sign\-up URL in a browser here, rather than printing it.
|
|
53
|
+
.TP
|
|
54
|
+
.B \-\-wait
|
|
55
|
+
Wait for the sign\-up to complete even if no local browser is detected.
|
|
56
|
+
.TP
|
|
57
|
+
.B \-\-no\-wait
|
|
58
|
+
Print the sign\-up URL and exit without waiting. Leaves this CLI a guest.
|
|
53
59
|
.TP
|
|
54
60
|
.B \-\-json
|
|
55
61
|
Print the sign\-up details as machine\-readable JSON.
|
|
@@ -127,6 +133,23 @@ Examples:
|
|
|
127
133
|
$ postman init \-\-visibility personal
|
|
128
134
|
|
|
129
135
|
|
|
136
|
+
.SS "whoami"
|
|
137
|
+
Show the Postman account or guest session this CLI session is using.
|
|
138
|
+
|
|
139
|
+
.B Usage:
|
|
140
|
+
[options]
|
|
141
|
+
|
|
142
|
+
.B Options:
|
|
143
|
+
.TP
|
|
144
|
+
.B \-\-json
|
|
145
|
+
Print current identity as machine\-readable JSON.
|
|
146
|
+
|
|
147
|
+
.SS "update"
|
|
148
|
+
Update Postman CLI using the original installation method.
|
|
149
|
+
|
|
150
|
+
.B Usage:
|
|
151
|
+
[options]
|
|
152
|
+
|
|
130
153
|
.SS "skills"
|
|
131
154
|
Check and update the agent skills in this repository.
|
|
132
155
|
|
|
@@ -222,6 +245,9 @@ Run and test your Postman collections directly from the command line.
|
|
|
222
245
|
|
|
223
246
|
.B Subcommands:
|
|
224
247
|
.TP
|
|
248
|
+
.B collection new
|
|
249
|
+
Scaffold a v3 collection on disk, or create one in a cloud Postman workspace with \-\-workspace.
|
|
250
|
+
.TP
|
|
225
251
|
.B collection migrate
|
|
226
252
|
Migrate a v2.1 collection to the v3 format
|
|
227
253
|
.TP
|
|
@@ -231,9 +257,50 @@ Run linting on a local v3 collection at the given file or directory path.
|
|
|
231
257
|
.B collection ai-readiness
|
|
232
258
|
Score a Postman collection for AI readiness by ID, local file path, or local\-mode directory.
|
|
233
259
|
.TP
|
|
260
|
+
.B collection get
|
|
261
|
+
Fetch a Postman collection in the V3 format and print it.
|
|
262
|
+
.TP
|
|
263
|
+
.B collection list
|
|
264
|
+
List collections: your local project's collections by default, or a Postman cloud workspace's collections with \-\-workspace.
|
|
265
|
+
.TP
|
|
234
266
|
.B collection run
|
|
235
267
|
Initiate a Postman collection run from a given ID or path.
|
|
236
268
|
|
|
269
|
+
.SS "collection new"
|
|
270
|
+
Scaffold a v3 collection on disk, or create one in a cloud Postman workspace with \-\-workspace.
|
|
271
|
+
|
|
272
|
+
.B Usage:
|
|
273
|
+
<name> [options]
|
|
274
|
+
|
|
275
|
+
.B Options:
|
|
276
|
+
.TP
|
|
277
|
+
.B \-w, \-\-workspace <workspaceId>
|
|
278
|
+
Create the collection in a cloud Postman workspace instead of scaffolding it locally. Required when the current directory is not a local Postman workspace.
|
|
279
|
+
.TP
|
|
280
|
+
.B \-\-force
|
|
281
|
+
Rewrite the definition of an existing local collection. Existing request files are left alone.
|
|
282
|
+
.TP
|
|
283
|
+
.B \-\-verbose
|
|
284
|
+
Verbose output
|
|
285
|
+
.TP
|
|
286
|
+
.B \-\-json
|
|
287
|
+
JSON output
|
|
288
|
+
|
|
289
|
+
.TP Examples:
|
|
290
|
+
|
|
291
|
+
Examples:
|
|
292
|
+
postman collection new "Orders API"
|
|
293
|
+
postman collection new "Orders API" \-\-json
|
|
294
|
+
postman collection new "Orders API" \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
295
|
+
|
|
296
|
+
Without \-\-workspace this writes postman/collections/<name>/.resources/definition.yaml
|
|
297
|
+
in the current directory, which must be a local Postman workspace (a directory holding
|
|
298
|
+
\&.postman/ or postman/). Add requests as <request\-name>.request.yaml files beside it, then
|
|
299
|
+
publish with `postman workspace push`. Creating a collection in a workspace requires
|
|
300
|
+
authentication.
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
237
304
|
.SS "collection migrate"
|
|
238
305
|
Migrate a v2.1 collection to the v3 format
|
|
239
306
|
|
|
@@ -284,6 +351,59 @@ Examples:
|
|
|
284
351
|
Resolving a collection by ID requires authentication. Use `postman login` before running this command with a UID.
|
|
285
352
|
|
|
286
353
|
|
|
354
|
+
.SS "collection get"
|
|
355
|
+
Fetch a Postman collection in the V3 format and print it.
|
|
356
|
+
|
|
357
|
+
.B Usage:
|
|
358
|
+
[options] <id>
|
|
359
|
+
|
|
360
|
+
.B Options:
|
|
361
|
+
.TP
|
|
362
|
+
.B \-\-api\-key <key>
|
|
363
|
+
Postman API key (defaults to your `postman login` session)
|
|
364
|
+
.TP
|
|
365
|
+
.B \-\-json
|
|
366
|
+
Print the collection as machine\-readable V3 JSON instead of a table
|
|
367
|
+
|
|
368
|
+
.TP Examples:
|
|
369
|
+
|
|
370
|
+
Eg. postman collection get 12345\-33823532ab9e41c9b6fd12d0fd459b8b
|
|
371
|
+
postman collection get 0123456789abcdef01234567 \-\-json
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
.SS "collection list"
|
|
375
|
+
List collections: your local project's collections by default, or a Postman cloud workspace's collections with \-\-workspace.
|
|
376
|
+
|
|
377
|
+
.B Usage:
|
|
378
|
+
[options]
|
|
379
|
+
|
|
380
|
+
.B Options:
|
|
381
|
+
.TP
|
|
382
|
+
.B \-w, \-\-workspace <workspaceId>
|
|
383
|
+
List a Postman cloud workspace's collections by id. Omit to list the local project's collections.
|
|
384
|
+
.TP
|
|
385
|
+
.B \-f, \-\-filter <name>
|
|
386
|
+
Filter collections by name.
|
|
387
|
+
.TP
|
|
388
|
+
.B \-\-verbose
|
|
389
|
+
Verbose output
|
|
390
|
+
.TP
|
|
391
|
+
.B \-\-debug
|
|
392
|
+
Debug output
|
|
393
|
+
.TP
|
|
394
|
+
.B \-\-json
|
|
395
|
+
JSON output
|
|
396
|
+
|
|
397
|
+
.TP Examples:
|
|
398
|
+
|
|
399
|
+
Examples:
|
|
400
|
+
postman collection list # local project collections
|
|
401
|
+
postman collection list \-\-json # local, as JSON
|
|
402
|
+
postman collection list \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef # a cloud workspace
|
|
403
|
+
postman collection list \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-filter "payments"
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
287
407
|
.SS "collection run"
|
|
288
408
|
Initiate a Postman collection run from a given ID or path.
|
|
289
409
|
|
|
@@ -425,14 +545,14 @@ Exports the cookie jar to a file after completing the run
|
|
|
425
545
|
.B \-\-verbose
|
|
426
546
|
Show detailed information of collection run and each request sent
|
|
427
547
|
.TP
|
|
428
|
-
.B \-\-mock <
|
|
429
|
-
Start a mock server
|
|
548
|
+
.B \-\-mock <pathOrId>
|
|
549
|
+
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).
|
|
430
550
|
.TP
|
|
431
551
|
.B \-\-port <port>
|
|
432
|
-
Port for the \-\-mock server
|
|
552
|
+
Port for the \-\-mock server (e.g. 4010), or "auto" for a free one. Defaults to the mock's configured port. Only valid with \-\-mock.
|
|
433
553
|
.TP
|
|
434
554
|
.B \-\-use\-mock <mapping>
|
|
435
|
-
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
|
|
555
|
+
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: )
|
|
436
556
|
.TP
|
|
437
557
|
.B \-\-simulate <path>
|
|
438
558
|
Start mock servers with fault\-injection scenarios from a .sim.yaml file
|
|
@@ -445,6 +565,8 @@ Do not send analytics to Postman
|
|
|
445
565
|
|
|
446
566
|
.TP Examples:
|
|
447
567
|
Eg. postman collection run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab
|
|
568
|
+
postman collection run <id> \-\-mock ./postman/mocks/orders # a mock in your repository
|
|
569
|
+
postman collection run <id> \-\-mock 12345678\-90ab\-cdef\-1234\-567890abcdef # a mock in Postman cloud
|
|
448
570
|
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./mock/config.yaml delay"
|
|
449
571
|
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./a.yaml" \-\-use\-mock "api.com mock\-server:9d8e7f6a"
|
|
450
572
|
|
|
@@ -457,6 +579,9 @@ Work with local Postman environments from the command line. Also read cloud envi
|
|
|
457
579
|
|
|
458
580
|
.B Subcommands:
|
|
459
581
|
.TP
|
|
582
|
+
.B environment new
|
|
583
|
+
Scaffold a local environment file, or create one in a Postman workspace with \-\-workspace.
|
|
584
|
+
.TP
|
|
460
585
|
.B environment list
|
|
461
586
|
List environments in a Postman workspace.
|
|
462
587
|
.TP
|
|
@@ -469,6 +594,40 @@ Read and update environment variables.
|
|
|
469
594
|
.B environment lint
|
|
470
595
|
Run linting on a local Postman environment at the given file or directory path.
|
|
471
596
|
|
|
597
|
+
.SS "environment new"
|
|
598
|
+
Scaffold a local environment file, or create one in a Postman workspace with \-\-workspace.
|
|
599
|
+
|
|
600
|
+
.B Usage:
|
|
601
|
+
<name> [options]
|
|
602
|
+
|
|
603
|
+
.B Options:
|
|
604
|
+
.TP
|
|
605
|
+
.B \-w, \-\-workspace <workspaceId>
|
|
606
|
+
Create the environment in a cloud Postman workspace instead of scaffolding it locally. Required when the current directory is not a local Postman workspace.
|
|
607
|
+
.TP
|
|
608
|
+
.B \-\-force
|
|
609
|
+
Overwrite an existing local environment file.
|
|
610
|
+
.TP
|
|
611
|
+
.B \-\-verbose
|
|
612
|
+
Verbose output
|
|
613
|
+
.TP
|
|
614
|
+
.B \-\-json
|
|
615
|
+
JSON output
|
|
616
|
+
|
|
617
|
+
.TP Examples:
|
|
618
|
+
|
|
619
|
+
Examples:
|
|
620
|
+
postman environment new Dev
|
|
621
|
+
postman environment new "Staging EU" \-\-json
|
|
622
|
+
postman environment new Dev \-\-force
|
|
623
|
+
postman environment new Dev \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
624
|
+
|
|
625
|
+
Without \-\-workspace this writes postman/environments/<name>.environment.yaml in the
|
|
626
|
+
current directory, which must be a local Postman workspace (a directory holding
|
|
627
|
+
\&.postman/ or postman/). Creating an environment in a workspace requires authentication.
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
472
631
|
.SS "environment list"
|
|
473
632
|
List environments in a Postman workspace.
|
|
474
633
|
|
|
@@ -585,12 +744,15 @@ Verbose output
|
|
|
585
744
|
.TP
|
|
586
745
|
.B \-\-json
|
|
587
746
|
JSON output
|
|
747
|
+
.TP
|
|
748
|
+
.B \-\-show\-secrets
|
|
749
|
+
Show secret variable values in output
|
|
588
750
|
|
|
589
751
|
.TP Examples:
|
|
590
752
|
|
|
591
753
|
Examples:
|
|
592
754
|
postman environment var get baseUrl \-\-environment ./postman/environments/dev.environment.yaml
|
|
593
|
-
postman environment var get token \-\-environment 123456\-11111111\-2222\-3333\-4444\-
|
|
755
|
+
postman environment var get token \-\-environment 123456\-11111111\-2222\-3333\-4444\-5555555 \-\-show\-secrets
|
|
594
756
|
|
|
595
757
|
|
|
596
758
|
|
|
@@ -752,7 +914,7 @@ Eg. postman api publish <apiId> \-\-name v1\e
|
|
|
752
914
|
|
|
753
915
|
|
|
754
916
|
.SS "runner"
|
|
755
|
-
|
|
917
|
+
Where your monitors execute: run and inspect your own self\-hosted runners, and list the Postman\-operated regions available to your team
|
|
756
918
|
|
|
757
919
|
.B Usage:
|
|
758
920
|
[options] [command]
|
|
@@ -761,6 +923,12 @@ Run runners on your own environments for monitoring your APIs
|
|
|
761
923
|
.TP
|
|
762
924
|
.B runner start
|
|
763
925
|
Start a runner
|
|
926
|
+
.TP
|
|
927
|
+
.B runner list
|
|
928
|
+
List the team's registered self\-hosted runners
|
|
929
|
+
.TP
|
|
930
|
+
.B runner regions
|
|
931
|
+
List the region and private\-runner values valid for monitor create/update \-\-runner, including a static IP where configured
|
|
764
932
|
|
|
765
933
|
.SS "runner start"
|
|
766
934
|
Start a runner
|
|
@@ -800,153 +968,828 @@ Port for the metrics server (default: 9090)
|
|
|
800
968
|
.B \-\-report\-events
|
|
801
969
|
Accepted for compatibility; analytics are sent by default
|
|
802
970
|
.TP
|
|
803
|
-
.B \-\-no\-report\-events
|
|
804
|
-
Do not send analytics to Postman
|
|
971
|
+
.B \-\-no\-report\-events
|
|
972
|
+
Do not send analytics to Postman
|
|
973
|
+
|
|
974
|
+
.SS "runner list"
|
|
975
|
+
List the team's registered self\-hosted runners
|
|
976
|
+
|
|
977
|
+
.B Usage:
|
|
978
|
+
[options]
|
|
979
|
+
|
|
980
|
+
.B Options:
|
|
981
|
+
.TP
|
|
982
|
+
.B \-\-api\-key <key>
|
|
983
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
984
|
+
.TP
|
|
985
|
+
.B \-w, \-\-workspace <id>
|
|
986
|
+
Filter to runners in this workspace
|
|
987
|
+
.TP
|
|
988
|
+
.B \-\-json
|
|
989
|
+
Output the runner list as JSON instead of a table
|
|
990
|
+
|
|
991
|
+
.SS "runner regions"
|
|
992
|
+
List the region and private\-runner values valid for monitor create/update \-\-runner, including a static IP where configured
|
|
993
|
+
|
|
994
|
+
.B Usage:
|
|
995
|
+
[options]
|
|
996
|
+
|
|
997
|
+
.B Options:
|
|
998
|
+
.TP
|
|
999
|
+
.B \-\-api\-key <key>
|
|
1000
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1001
|
+
.TP
|
|
1002
|
+
.B \-\-json
|
|
1003
|
+
Output the region list as JSON instead of a table
|
|
1004
|
+
|
|
1005
|
+
.SS "spec"
|
|
1006
|
+
Lint and validate Specifications from the command line
|
|
1007
|
+
|
|
1008
|
+
.B Usage:
|
|
1009
|
+
[options] [command]
|
|
1010
|
+
|
|
1011
|
+
.B Subcommands:
|
|
1012
|
+
.TP
|
|
1013
|
+
.B spec lint
|
|
1014
|
+
Run linting on the given specification by ID or local file path.
|
|
1015
|
+
|
|
1016
|
+
.TP
|
|
1017
|
+
.B spec ai-readiness
|
|
1018
|
+
Score an OpenAPI specification for AI readiness by ID or local file path.
|
|
1019
|
+
|
|
1020
|
+
.TP
|
|
1021
|
+
.B spec list
|
|
1022
|
+
List local spec files under a path, or (no path) a workspace's cloud specs.
|
|
1023
|
+
.TP
|
|
1024
|
+
.B spec get
|
|
1025
|
+
Read a spec definition, including every file of a multi\-file spec.
|
|
1026
|
+
.TP
|
|
1027
|
+
.B spec file
|
|
1028
|
+
Add, update, or remove files in a spec (cloud ID or local directory).
|
|
1029
|
+
.TP
|
|
1030
|
+
.B spec create
|
|
1031
|
+
Create a new spec in a workspace, or (with path) scaffold a local spec file.
|
|
1032
|
+
.TP
|
|
1033
|
+
.B spec generate
|
|
1034
|
+
Generate artifacts from a specification.
|
|
1035
|
+
|
|
1036
|
+
.SS "spec lint"
|
|
1037
|
+
Run linting on the given specification by ID or local file path.
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
.B Usage:
|
|
1041
|
+
<spec> [options]
|
|
1042
|
+
|
|
1043
|
+
.B Options:
|
|
1044
|
+
.TP
|
|
1045
|
+
.B \-f, \-\-fail\-severity <value>
|
|
1046
|
+
Results of this level or above will trigger a failure exit code. [choices: "error", "warning", "info", "hint"] (default: ERROR)
|
|
1047
|
+
.TP
|
|
1048
|
+
.B \-o, \-\-output <value>
|
|
1049
|
+
Output format for the results. [choices: "json", "csv"]
|
|
1050
|
+
.TP
|
|
1051
|
+
.B \-\-workspace\-id <value>
|
|
1052
|
+
The workspace ID to use for fetching governance rulesets.
|
|
1053
|
+
.TP
|
|
1054
|
+
.B \-\-report\-events
|
|
1055
|
+
Accepted for compatibility; analytics are sent by default
|
|
1056
|
+
.TP
|
|
1057
|
+
.B \-\-no\-report\-events
|
|
1058
|
+
Do not send analytics to Postman
|
|
1059
|
+
|
|
1060
|
+
.SS "spec ai\-readiness"
|
|
1061
|
+
Score an OpenAPI specification for AI readiness by ID or local file path.
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
.B Usage:
|
|
1065
|
+
<spec> [options]
|
|
1066
|
+
|
|
1067
|
+
.B Options:
|
|
1068
|
+
.TP
|
|
1069
|
+
.B \-o, \-\-output <value>
|
|
1070
|
+
Output format for the results. [choices: "cli", "json", "html"]
|
|
1071
|
+
.TP
|
|
1072
|
+
.B \-\-min\-score <n>
|
|
1073
|
+
Exit with a non\-zero code if the overall score is below this threshold (0\-100).
|
|
1074
|
+
|
|
1075
|
+
.TP Examples:
|
|
1076
|
+
|
|
1077
|
+
Examples:
|
|
1078
|
+
$ postman spec ai\-readiness ./openapi.yaml
|
|
1079
|
+
$ postman spec ai\-readiness 6e2e5b3e\-... \-\-output json
|
|
1080
|
+
$ postman spec ai\-readiness ./openapi.yaml \-\-min\-score 70
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
.SS "spec list"
|
|
1084
|
+
List local spec files under a path, or (no path) a workspace's cloud specs.
|
|
1085
|
+
|
|
1086
|
+
.B Usage:
|
|
1087
|
+
[options] [pathOrDir]
|
|
1088
|
+
|
|
1089
|
+
.B Options:
|
|
1090
|
+
.TP
|
|
1091
|
+
.B \-w, \-\-workspace <id>
|
|
1092
|
+
Workspace ID (defaults to .postman/resources.yaml binding)
|
|
1093
|
+
.TP
|
|
1094
|
+
.B \-\-api\-key <key>
|
|
1095
|
+
Postman API key
|
|
1096
|
+
.TP
|
|
1097
|
+
.B \-\-json
|
|
1098
|
+
Output as JSON
|
|
1099
|
+
|
|
1100
|
+
.TP Examples:
|
|
1101
|
+
|
|
1102
|
+
Examples:
|
|
1103
|
+
postman spec list ./postman/specs
|
|
1104
|
+
postman spec list ./openapi.yaml
|
|
1105
|
+
postman spec list
|
|
1106
|
+
postman spec list \-w 12345\-abcde \-\-json
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
.SS "spec get"
|
|
1111
|
+
Read a spec definition, including every file of a multi\-file spec.
|
|
1112
|
+
|
|
1113
|
+
.B Usage:
|
|
1114
|
+
[options] <spec...>
|
|
1115
|
+
|
|
1116
|
+
.B Options:
|
|
1117
|
+
.TP
|
|
1118
|
+
.B \-\-api\-key <key>
|
|
1119
|
+
Postman API key
|
|
1120
|
+
.TP
|
|
1121
|
+
.B \-\-json
|
|
1122
|
+
Output as JSON (full spec definition)
|
|
1123
|
+
|
|
1124
|
+
.TP Examples:
|
|
1125
|
+
|
|
1126
|
+
Examples:
|
|
1127
|
+
postman spec get ./openapi.yaml
|
|
1128
|
+
postman spec get "postman/specs/My API/index.yaml"
|
|
1129
|
+
postman spec get 12345678\-abcd\-1234\-efgh\-567890abcdef
|
|
1130
|
+
postman spec get 12345678\-abcd\-1234\-efgh\-567890abcdef \-\-json
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
.SS "spec file"
|
|
1135
|
+
Add, update, or remove files in a spec (cloud ID or local directory).
|
|
1136
|
+
|
|
1137
|
+
.B Usage:
|
|
1138
|
+
[options] [command]
|
|
1139
|
+
|
|
1140
|
+
.B Subcommands:
|
|
1141
|
+
.TP
|
|
1142
|
+
.B spec file add
|
|
1143
|
+
Add a new file to a spec.
|
|
1144
|
+
.TP
|
|
1145
|
+
.B spec file update
|
|
1146
|
+
Update an existing file in a spec.
|
|
1147
|
+
.TP
|
|
1148
|
+
.B spec file rm
|
|
1149
|
+
Remove a file from a spec.
|
|
1150
|
+
|
|
1151
|
+
.SS "spec file add"
|
|
1152
|
+
Add a new file to a spec.
|
|
1153
|
+
|
|
1154
|
+
.B Usage:
|
|
1155
|
+
[options] <spec> <filePath>
|
|
1156
|
+
|
|
1157
|
+
.B Options:
|
|
1158
|
+
.TP
|
|
1159
|
+
.B \-c, \-\-content <content>
|
|
1160
|
+
File content (reads from stdin if omitted)
|
|
1161
|
+
.TP
|
|
1162
|
+
.B \-\-api\-key <key>
|
|
1163
|
+
Postman API key
|
|
1164
|
+
|
|
1165
|
+
.TP Examples:
|
|
1166
|
+
|
|
1167
|
+
Examples:
|
|
1168
|
+
postman spec file add 12345678\-abcd\-1234\-abcd\-1234567890ab schemas/user.yaml \-c "type: object"
|
|
1169
|
+
postman spec file add ./postman/specs/api schemas/user.yaml \-c "type: object"
|
|
1170
|
+
cat schema.yaml | postman spec file add ./postman/specs/api schemas/user.yaml
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
.SS "spec file update"
|
|
1175
|
+
Update an existing file in a spec.
|
|
1176
|
+
|
|
1177
|
+
.B Usage:
|
|
1178
|
+
[options] <spec> <filePath>
|
|
1179
|
+
|
|
1180
|
+
.B Options:
|
|
1181
|
+
.TP
|
|
1182
|
+
.B \-c, \-\-content <content>
|
|
1183
|
+
New file content (reads from stdin if omitted)
|
|
1184
|
+
.TP
|
|
1185
|
+
.B \-\-api\-key <key>
|
|
1186
|
+
Postman API key
|
|
1187
|
+
|
|
1188
|
+
.TP Examples:
|
|
1189
|
+
|
|
1190
|
+
Examples:
|
|
1191
|
+
postman spec file update 12345678\-abcd\-1234\-abcd\-1234567890ab index.yaml \-c "openapi: 3.1.0"
|
|
1192
|
+
postman spec file update ./postman/specs/api schemas/user.yaml \-c "type: object"
|
|
1193
|
+
cat schema.yaml | postman spec file update ./postman/specs/api schemas/user.yaml
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
.SS "spec file rm"
|
|
1198
|
+
Remove a file from a spec.
|
|
1199
|
+
|
|
1200
|
+
.B Usage:
|
|
1201
|
+
[options] <spec> <filePath>
|
|
1202
|
+
|
|
1203
|
+
.B Options:
|
|
1204
|
+
.TP
|
|
1205
|
+
.B \-y, \-\-yes
|
|
1206
|
+
Skip confirmation prompt
|
|
1207
|
+
.TP
|
|
1208
|
+
.B \-\-api\-key <key>
|
|
1209
|
+
Postman API key
|
|
1210
|
+
|
|
1211
|
+
.TP Examples:
|
|
1212
|
+
|
|
1213
|
+
Examples:
|
|
1214
|
+
postman spec file rm 12345678\-abcd\-1234\-abcd\-1234567890ab schemas/user.yaml \-\-yes
|
|
1215
|
+
postman spec file rm ./postman/specs/api schemas/user.yaml \-\-yes
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
.SS "spec create"
|
|
1220
|
+
Create a new spec in a workspace, or (with path) scaffold a local spec file.
|
|
1221
|
+
|
|
1222
|
+
.B Usage:
|
|
1223
|
+
[options] [path]
|
|
1224
|
+
|
|
1225
|
+
.B Options:
|
|
1226
|
+
.TP
|
|
1227
|
+
.B \-n, \-\-name <name>
|
|
1228
|
+
Specification name / title
|
|
1229
|
+
.TP
|
|
1230
|
+
.B \-t, \-\-type <type>
|
|
1231
|
+
Spec type: openapi, asyncapi, graphql, protobuf, smithy (default: openapi) (default: openapi)
|
|
1232
|
+
.TP
|
|
1233
|
+
.B \-\-spec\-version <ver>
|
|
1234
|
+
Spec version (e.g. 3.1 for openapi, 3 for protobuf)
|
|
1235
|
+
.TP
|
|
1236
|
+
.B \-f, \-\-format <fmt>
|
|
1237
|
+
File format: yaml or json (openapi/asyncapi only, default: yaml) (default: yaml)
|
|
1238
|
+
.TP
|
|
1239
|
+
.B \-w, \-\-workspace <id>
|
|
1240
|
+
Workspace ID (cloud create, defaults to .postman/resources.yaml)
|
|
1241
|
+
.TP
|
|
1242
|
+
.B \-\-force
|
|
1243
|
+
Overwrite an existing local file
|
|
1244
|
+
.TP
|
|
1245
|
+
.B \-\-api\-key <key>
|
|
1246
|
+
Postman API key
|
|
1247
|
+
|
|
1248
|
+
.TP Examples:
|
|
1249
|
+
|
|
1250
|
+
Examples:
|
|
1251
|
+
postman spec create \-n "Pet Store"
|
|
1252
|
+
postman spec create \-n "Pet Store" \-w 12345678\-abcd\-1234\-abcd\-1234567890ab
|
|
1253
|
+
postman spec create ./postman/specs/pet\-store/index.yaml \-n "Pet Store"
|
|
1254
|
+
postman spec create ./api.yaml \-n "Events" \-t asyncapi \-f yaml
|
|
1255
|
+
postman spec create ./swagger.yaml \-n "Legacy" \-t openapi \-\-spec\-version 2.0
|
|
1256
|
+
postman spec create ./schema.graphql \-n "My GraphQL API" \-t graphql
|
|
1257
|
+
postman spec create ./service.proto \-n "My Service" \-t protobuf \-\-spec\-version 3
|
|
1258
|
+
postman spec create ./model.smithy \-n "My Model" \-t smithy
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
.SS "spec generate"
|
|
1263
|
+
Generate artifacts from a specification.
|
|
1264
|
+
|
|
1265
|
+
.B Usage:
|
|
1266
|
+
[options] [command]
|
|
1267
|
+
|
|
1268
|
+
.B Subcommands:
|
|
1269
|
+
.TP
|
|
1270
|
+
.B spec generate collection
|
|
1271
|
+
Generate a Postman collection from a specification.
|
|
1272
|
+
|
|
1273
|
+
.SS "spec generate collection"
|
|
1274
|
+
Generate a Postman collection from a specification.
|
|
1275
|
+
|
|
1276
|
+
.B Usage:
|
|
1277
|
+
[options] <spec>
|
|
1278
|
+
|
|
1279
|
+
.B Options:
|
|
1280
|
+
.TP
|
|
1281
|
+
.B \-n, \-\-name <name>
|
|
1282
|
+
Collection name
|
|
1283
|
+
.TP
|
|
1284
|
+
.B \-\-folder\-strategy <strategy>
|
|
1285
|
+
Folder strategy: Paths or Tags (default: Paths) (default: Paths)
|
|
1286
|
+
.TP
|
|
1287
|
+
.B \-w, \-\-workspace <id>
|
|
1288
|
+
Workspace ID (cloud mode)
|
|
1289
|
+
.TP
|
|
1290
|
+
.B \-\-api\-key <key>
|
|
1291
|
+
Postman API key
|
|
1292
|
+
|
|
1293
|
+
.TP Examples:
|
|
1294
|
+
|
|
1295
|
+
Examples:
|
|
1296
|
+
postman spec generate collection ./openapi.yaml \-n "My API"
|
|
1297
|
+
postman spec generate collection ./openapi.yaml \-n "My API" \-\-folder\-strategy Tags
|
|
1298
|
+
postman spec generate collection 12345678\-abcd\-1234\-abcd\-1234567890ab \-n "My API"
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
.SS "monitor"
|
|
1303
|
+
Run and manage Postman monitors.
|
|
1304
|
+
|
|
1305
|
+
.B Usage:
|
|
1306
|
+
[options] [command]
|
|
1307
|
+
|
|
1308
|
+
.B Subcommands:
|
|
1309
|
+
.TP
|
|
1310
|
+
.B monitor run
|
|
1311
|
+
Invoke a monitor run and display results.
|
|
1312
|
+
.TP
|
|
1313
|
+
.B monitor create
|
|
1314
|
+
Create a collection\-based monitor.
|
|
1315
|
+
.TP
|
|
1316
|
+
.B monitor update
|
|
1317
|
+
Update a monitor's schedule, runner, notifications or run options.
|
|
1318
|
+
.TP
|
|
1319
|
+
.B monitor delete
|
|
1320
|
+
Permanently delete a monitor. Prompts for confirmation unless \-\-yes is passed.
|
|
1321
|
+
.TP
|
|
1322
|
+
.B monitor jobs
|
|
1323
|
+
Inspect a monitor's jobs and their per\-region runs.
|
|
1324
|
+
.TP
|
|
1325
|
+
.B monitor runs
|
|
1326
|
+
Inspect a monitor run's attempts.
|
|
1327
|
+
.TP
|
|
1328
|
+
.B monitor list
|
|
1329
|
+
List the monitors visible to you.
|
|
1330
|
+
.TP
|
|
1331
|
+
.B monitor get
|
|
1332
|
+
Show a monitor's configuration.
|
|
1333
|
+
.TP
|
|
1334
|
+
.B monitor metrics
|
|
1335
|
+
Show per\-request latency and outcome history for a monitor.
|
|
1336
|
+
.TP
|
|
1337
|
+
.B monitor pause
|
|
1338
|
+
Pause a monitor, so it stops firing on schedule.
|
|
1339
|
+
.TP
|
|
1340
|
+
.B monitor resume
|
|
1341
|
+
Resume a paused monitor, so it fires on schedule again.
|
|
1342
|
+
|
|
1343
|
+
.SS "monitor run"
|
|
1344
|
+
Invoke a monitor run and display results.
|
|
1345
|
+
|
|
1346
|
+
.B Usage:
|
|
1347
|
+
[options] <monitorId>
|
|
1348
|
+
|
|
1349
|
+
.B Options:
|
|
1350
|
+
.TP
|
|
1351
|
+
.B \-\-api\-key <key>
|
|
1352
|
+
Postman API key (defaults to the `postman login` session)
|
|
1353
|
+
.TP
|
|
1354
|
+
.B \-x, \-\-suppress\-exit\-code
|
|
1355
|
+
Specify whether or not to override the default exit code for the current run
|
|
1356
|
+
.TP
|
|
1357
|
+
.B \-t, \-\-timeout <ms>
|
|
1358
|
+
Maximum wait time for run completion in milliseconds (default: 15 minutes) (default: 900000)
|
|
1359
|
+
.TP
|
|
1360
|
+
.B \-\-async
|
|
1361
|
+
Submit the run and return immediately with its job id and Postman URL, without waiting for completion
|
|
1362
|
+
.TP
|
|
1363
|
+
.B \-\-json
|
|
1364
|
+
Output the run's verdict as JSON instead of a table, printing nothing else
|
|
1365
|
+
|
|
1366
|
+
.SS "monitor create"
|
|
1367
|
+
Create a collection\-based monitor.
|
|
1368
|
+
|
|
1369
|
+
.B Usage:
|
|
1370
|
+
[options]
|
|
1371
|
+
|
|
1372
|
+
.B Options:
|
|
1373
|
+
.TP
|
|
1374
|
+
.B \-c, \-\-collection <id>
|
|
1375
|
+
Collection to monitor \-\- accepts the id shown in the Postman app, prefixed or bare
|
|
1376
|
+
.TP
|
|
1377
|
+
.B \-\-name <name>
|
|
1378
|
+
Monitor name (defaults to the linked collection's own name)
|
|
1379
|
+
.TP
|
|
1380
|
+
.B \-\-environment <id>
|
|
1381
|
+
Environment to run the monitored collection with
|
|
1382
|
+
.TP
|
|
1383
|
+
.B \-w, \-\-workspace <id>
|
|
1384
|
+
Workspace to create the monitor in (defaults to the workspace named in the local .postman/resources.yaml manifest; required if neither is available)
|
|
1385
|
+
.TP
|
|
1386
|
+
.B \-\-schedule <cron>
|
|
1387
|
+
Cron expression for the monitor's schedule
|
|
1388
|
+
.TP
|
|
1389
|
+
.B \-\-timezone <tz>
|
|
1390
|
+
Time zone for \-\-schedule, e.g. America/New_York (defaults to the host machine's own zone)
|
|
1391
|
+
.TP
|
|
1392
|
+
.B \-\-runner <value>
|
|
1393
|
+
A Postman region name (see `postman runner regions`) or the id of a self\-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable) (default: )
|
|
1394
|
+
.TP
|
|
1395
|
+
.B \-\-notify\-email <email>
|
|
1396
|
+
Email to notify on a run failure or error (repeatable) (default: )
|
|
1397
|
+
.TP
|
|
1398
|
+
.B \-\-notification\-limit <n>
|
|
1399
|
+
Cap consecutive notifications before they are muted (service range: 1\-99)
|
|
1400
|
+
.TP
|
|
1401
|
+
.B \-\-retry <n>
|
|
1402
|
+
Retries on a failed run (service caps this at 2)
|
|
1403
|
+
.TP
|
|
1404
|
+
.B \-\-timeout <ms>
|
|
1405
|
+
Request timeout in milliseconds
|
|
1406
|
+
.TP
|
|
1407
|
+
.B \-\-delay <ms>
|
|
1408
|
+
Delay between requests in milliseconds
|
|
1409
|
+
.TP
|
|
1410
|
+
.B \-\-strict\-ssl
|
|
1411
|
+
Fail the run when the target's TLS certificate cannot be verified
|
|
1412
|
+
.TP
|
|
1413
|
+
.B \-\-insecure
|
|
1414
|
+
Skip TLS certificate verification for the monitored target
|
|
1415
|
+
.TP
|
|
1416
|
+
.B \-\-follow\-redirects
|
|
1417
|
+
Follow HTTP redirects during the run
|
|
1418
|
+
.TP
|
|
1419
|
+
.B \-\-block\-redirects
|
|
1420
|
+
Do not follow HTTP redirects during the run
|
|
1421
|
+
.TP
|
|
1422
|
+
.B \-\-dataset\-id <id>
|
|
1423
|
+
Dataset to use as iteration data (used together with \-\-dataset\-view\-id)
|
|
1424
|
+
.TP
|
|
1425
|
+
.B \-\-dataset\-view\-id <id>
|
|
1426
|
+
Dataset view to iterate (used together with \-\-dataset\-id)
|
|
1427
|
+
.TP
|
|
1428
|
+
.B \-\-iteration\-count <n>
|
|
1429
|
+
Number of iterations to run
|
|
1430
|
+
.TP
|
|
1431
|
+
.B \-\-iteration\-strategy <strategy>
|
|
1432
|
+
How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires \-\-iteration\-count, \-\-dataset\-id and \-\-dataset\-view\-id)
|
|
1433
|
+
.TP
|
|
1434
|
+
.B \-\-no\-run\-now
|
|
1435
|
+
Do not trigger an immediate run after creating the monitor
|
|
1436
|
+
.TP
|
|
1437
|
+
.B \-\-api\-key <key>
|
|
1438
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1439
|
+
.TP
|
|
1440
|
+
.B \-\-json
|
|
1441
|
+
Output as JSON instead of a table
|
|
1442
|
+
|
|
1443
|
+
.TP Examples:
|
|
1444
|
+
|
|
1445
|
+
Examples:
|
|
1446
|
+
postman monitor create \-\-collection 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1447
|
+
postman monitor create \-\-collection <id> \-\-schedule "0 9 * * MON" \-\-timezone America/New_York
|
|
1448
|
+
postman monitor create \-\-collection <id> \-\-runner us\-east \-\-runner <self\-hosted\-runner\-id>
|
|
1449
|
+
postman monitor create \-\-collection <id> \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
.SS "monitor update"
|
|
1454
|
+
Update a monitor's schedule, runner, notifications or run options.
|
|
1455
|
+
|
|
1456
|
+
.B Usage:
|
|
1457
|
+
[options] <monitorId>
|
|
1458
|
+
|
|
1459
|
+
.B Options:
|
|
1460
|
+
.TP
|
|
1461
|
+
.B \-\-name <name>
|
|
1462
|
+
New monitor name
|
|
1463
|
+
.TP
|
|
1464
|
+
.B \-\-schedule <cron>
|
|
1465
|
+
New cron expression for the monitor's schedule
|
|
1466
|
+
.TP
|
|
1467
|
+
.B \-\-timezone <tz>
|
|
1468
|
+
Time zone for \-\-schedule, e.g. America/New_York (defaults to the host machine's own zone)
|
|
1469
|
+
.TP
|
|
1470
|
+
.B \-\-runner <value>
|
|
1471
|
+
A Postman region name (see `postman runner regions`) or the id of a self\-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable; replaces the current set) (default: )
|
|
1472
|
+
.TP
|
|
1473
|
+
.B \-\-notify\-email <email>
|
|
1474
|
+
Email to notify on a run failure or error (repeatable; replaces the current list) (default: )
|
|
1475
|
+
.TP
|
|
1476
|
+
.B \-\-clear\-notifications
|
|
1477
|
+
Remove every notification recipient
|
|
1478
|
+
.TP
|
|
1479
|
+
.B \-\-notification\-limit <n>
|
|
1480
|
+
Cap consecutive notifications before they are muted (service range: 1\-99)
|
|
1481
|
+
.TP
|
|
1482
|
+
.B \-\-retry <n>
|
|
1483
|
+
Retries on a failed run (service caps this at 2)
|
|
1484
|
+
.TP
|
|
1485
|
+
.B \-\-timeout <ms>
|
|
1486
|
+
Request timeout in milliseconds
|
|
1487
|
+
.TP
|
|
1488
|
+
.B \-\-delay <ms>
|
|
1489
|
+
Delay between requests in milliseconds
|
|
1490
|
+
.TP
|
|
1491
|
+
.B \-\-strict\-ssl
|
|
1492
|
+
Fail the run when the target's TLS certificate cannot be verified
|
|
1493
|
+
.TP
|
|
1494
|
+
.B \-\-insecure
|
|
1495
|
+
Skip TLS certificate verification for the monitored target
|
|
1496
|
+
.TP
|
|
1497
|
+
.B \-\-follow\-redirects
|
|
1498
|
+
Follow HTTP redirects during the run
|
|
1499
|
+
.TP
|
|
1500
|
+
.B \-\-block\-redirects
|
|
1501
|
+
Do not follow HTTP redirects during the run
|
|
1502
|
+
.TP
|
|
1503
|
+
.B \-\-dataset\-id <id>
|
|
1504
|
+
Dataset to use as iteration data (used together with \-\-dataset\-view\-id)
|
|
1505
|
+
.TP
|
|
1506
|
+
.B \-\-dataset\-view\-id <id>
|
|
1507
|
+
Dataset view to iterate (used together with \-\-dataset\-id)
|
|
1508
|
+
.TP
|
|
1509
|
+
.B \-\-iteration\-count <n>
|
|
1510
|
+
Number of iterations to run
|
|
1511
|
+
.TP
|
|
1512
|
+
.B \-\-iteration\-strategy <strategy>
|
|
1513
|
+
How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires \-\-iteration\-count, \-\-dataset\-id and \-\-dataset\-view\-id)
|
|
1514
|
+
.TP
|
|
1515
|
+
.B \-\-api\-key <key>
|
|
1516
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1517
|
+
.TP
|
|
1518
|
+
.B \-\-json
|
|
1519
|
+
Output as JSON instead of a table
|
|
1520
|
+
|
|
1521
|
+
.TP Examples:
|
|
1522
|
+
|
|
1523
|
+
Examples:
|
|
1524
|
+
postman monitor update <id> \-\-schedule "0 */6 * * *" \-\-timezone UTC
|
|
1525
|
+
postman monitor update <id> \-\-notify\-email a@example.com \-\-notify\-email b@example.com
|
|
1526
|
+
postman monitor update <id> \-\-clear\-notifications
|
|
1527
|
+
postman monitor update <id> \-\-runner us\-east \-\-runner <self\-hosted\-runner\-id>
|
|
1528
|
+
|
|
1529
|
+
This command cannot change a monitor's linked collection or environment \-\- delete and recreate the monitor instead \-\- and does not pause or resume it; use `monitor pause`/`monitor resume` for that.
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
.SS "monitor delete"
|
|
1533
|
+
Permanently delete a monitor. Prompts for confirmation unless \-\-yes is passed.
|
|
1534
|
+
|
|
1535
|
+
.B Usage:
|
|
1536
|
+
[options] <monitorId>
|
|
1537
|
+
|
|
1538
|
+
.B Options:
|
|
1539
|
+
.TP
|
|
1540
|
+
.B \-y, \-\-yes
|
|
1541
|
+
Skip the confirmation prompt
|
|
1542
|
+
.TP
|
|
1543
|
+
.B \-\-api\-key <key>
|
|
1544
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1545
|
+
.TP
|
|
1546
|
+
.B \-\-json
|
|
1547
|
+
Output the outcome, including any failure, as JSON instead of a plain message
|
|
1548
|
+
|
|
1549
|
+
.TP Examples:
|
|
1550
|
+
|
|
1551
|
+
Examples:
|
|
1552
|
+
postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1553
|
+
postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-yes
|
|
1554
|
+
postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-yes \-\-json
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
.SS "monitor jobs"
|
|
1559
|
+
Inspect a monitor's jobs and their per\-region runs.
|
|
1560
|
+
|
|
1561
|
+
.B Usage:
|
|
1562
|
+
[options] [command]
|
|
1563
|
+
|
|
1564
|
+
.B Subcommands:
|
|
1565
|
+
.TP
|
|
1566
|
+
.B monitor jobs list
|
|
1567
|
+
List a monitor's recent jobs.
|
|
1568
|
+
.TP
|
|
1569
|
+
.B monitor jobs get
|
|
1570
|
+
Report one job's terminal state and its per\-region run outcomes.
|
|
1571
|
+
|
|
1572
|
+
.SS "monitor jobs list"
|
|
1573
|
+
List a monitor's recent jobs.
|
|
1574
|
+
|
|
1575
|
+
.B Usage:
|
|
1576
|
+
[options] <monitorId>
|
|
1577
|
+
|
|
1578
|
+
.B Options:
|
|
1579
|
+
.TP
|
|
1580
|
+
.B \-\-api\-key <key>
|
|
1581
|
+
Postman API key (defaults to the `postman login` session)
|
|
1582
|
+
.TP
|
|
1583
|
+
.B \-\-result <value>
|
|
1584
|
+
Filter by outcome, e.g. success, failure, error, abort (server\-validated, not a fixed list)
|
|
1585
|
+
.TP
|
|
1586
|
+
.B \-\-trigger <value>
|
|
1587
|
+
Filter by trigger, e.g. api, schedule, webhook, postman\-cli (server\-validated, not a fixed list)
|
|
1588
|
+
.TP
|
|
1589
|
+
.B \-\-since <dateTime>
|
|
1590
|
+
Only jobs that finished at or after this ISO 8601 date\-time
|
|
1591
|
+
.TP
|
|
1592
|
+
.B \-\-limit <n>
|
|
1593
|
+
Maximum number of jobs to return
|
|
1594
|
+
.TP
|
|
1595
|
+
.B \-\-cursor <token>
|
|
1596
|
+
Opaque pagination cursor
|
|
1597
|
+
.TP
|
|
1598
|
+
.B \-\-json
|
|
1599
|
+
Output as JSON instead of a table
|
|
805
1600
|
|
|
806
|
-
.SS "
|
|
807
|
-
|
|
1601
|
+
.SS "monitor jobs get"
|
|
1602
|
+
Report one job's terminal state and its per\-region run outcomes.
|
|
808
1603
|
|
|
809
1604
|
.B Usage:
|
|
810
|
-
[options]
|
|
1605
|
+
[options] <jobId>
|
|
811
1606
|
|
|
812
|
-
.B
|
|
1607
|
+
.B Options:
|
|
813
1608
|
.TP
|
|
814
|
-
.B
|
|
815
|
-
|
|
816
|
-
|
|
1609
|
+
.B \-\-api\-key <key>
|
|
1610
|
+
Postman API key (defaults to the `postman login` session)
|
|
817
1611
|
.TP
|
|
818
|
-
.B
|
|
819
|
-
|
|
1612
|
+
.B \-\-json
|
|
1613
|
+
Output as JSON instead of a table
|
|
820
1614
|
|
|
821
|
-
.
|
|
822
|
-
|
|
823
|
-
List local spec files under a path, or (no path) a workspace's cloud specs.
|
|
824
|
-
.TP
|
|
825
|
-
.B spec get
|
|
826
|
-
Read a spec definition, including every file of a multi\-file spec.
|
|
1615
|
+
.SS "monitor runs"
|
|
1616
|
+
Inspect a monitor run's attempts.
|
|
827
1617
|
|
|
828
|
-
.
|
|
829
|
-
|
|
1618
|
+
.B Usage:
|
|
1619
|
+
[options] [command]
|
|
830
1620
|
|
|
1621
|
+
.B Subcommands:
|
|
1622
|
+
.TP
|
|
1623
|
+
.B monitor runs get
|
|
1624
|
+
Report which test assertions ran during one attempt of a run, which failed, and why.
|
|
1625
|
+
|
|
1626
|
+
.SS "monitor runs get"
|
|
1627
|
+
Report which test assertions ran during one attempt of a run, which failed, and why.
|
|
831
1628
|
|
|
832
1629
|
.B Usage:
|
|
833
|
-
|
|
1630
|
+
[options] <runId>
|
|
834
1631
|
|
|
835
1632
|
.B Options:
|
|
836
1633
|
.TP
|
|
837
|
-
.B
|
|
838
|
-
|
|
839
|
-
.TP
|
|
840
|
-
.B \-o, \-\-output <value>
|
|
841
|
-
Output format for the results. [choices: "json", "csv"]
|
|
1634
|
+
.B \-\-api\-key <key>
|
|
1635
|
+
Postman API key (defaults to the `postman login` session)
|
|
842
1636
|
.TP
|
|
843
|
-
.B \-\-
|
|
844
|
-
|
|
1637
|
+
.B \-\-attempt <n>
|
|
1638
|
+
Which attempt of the run to show, counting from 0 (default: the latest)
|
|
845
1639
|
.TP
|
|
846
|
-
.B \-\-
|
|
847
|
-
|
|
1640
|
+
.B \-\-failed\-only
|
|
1641
|
+
Show only failed assertions
|
|
848
1642
|
.TP
|
|
849
|
-
.B \-\-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
.SS "spec ai\-readiness"
|
|
853
|
-
Score an OpenAPI specification for AI readiness by ID or local file path.
|
|
1643
|
+
.B \-\-json
|
|
1644
|
+
Output as JSON instead of a table
|
|
854
1645
|
|
|
1646
|
+
.SS "monitor list"
|
|
1647
|
+
List the monitors visible to you.
|
|
855
1648
|
|
|
856
1649
|
.B Usage:
|
|
857
|
-
|
|
1650
|
+
[options]
|
|
858
1651
|
|
|
859
1652
|
.B Options:
|
|
860
1653
|
.TP
|
|
861
|
-
.B \-
|
|
862
|
-
|
|
1654
|
+
.B \-\-api\-key <key>
|
|
1655
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
863
1656
|
.TP
|
|
864
|
-
.B
|
|
865
|
-
|
|
1657
|
+
.B \-w, \-\-workspace <id>
|
|
1658
|
+
Filter to monitors in this workspace
|
|
1659
|
+
.TP
|
|
1660
|
+
.B \-c, \-\-collection <id>
|
|
1661
|
+
Filter to monitors on this collection
|
|
1662
|
+
.TP
|
|
1663
|
+
.B \-\-environment <id>
|
|
1664
|
+
Filter to monitors on this environment
|
|
1665
|
+
.TP
|
|
1666
|
+
.B \-\-runner <id>
|
|
1667
|
+
Filter to a Self\-Hosted Runner ID (not a Postman Region). Cannot be combined with \-\-workspace, \-\-collection, \-\-environment, \-\-owner, \-\-team or \-\-active.
|
|
1668
|
+
.TP
|
|
1669
|
+
.B \-\-owner <id>
|
|
1670
|
+
Filter to monitors created by this user id (shown in the Owner column)
|
|
1671
|
+
.TP
|
|
1672
|
+
.B \-\-team
|
|
1673
|
+
Filter to monitors owned by your own team
|
|
1674
|
+
.TP
|
|
1675
|
+
.B \-\-active <true|false>
|
|
1676
|
+
Filter by active state
|
|
1677
|
+
.TP
|
|
1678
|
+
.B \-\-limit <n>
|
|
1679
|
+
Max monitors to return. The service caps page size and rejects a value above it with its own error.
|
|
1680
|
+
.TP
|
|
1681
|
+
.B \-\-offset <n>
|
|
1682
|
+
Not supported: the service accepts this parameter and silently ignores it. Refused locally. Use \-\-cursor instead.
|
|
1683
|
+
.TP
|
|
1684
|
+
.B \-\-cursor <token>
|
|
1685
|
+
Pagination cursor from a previous page's response.
|
|
1686
|
+
.TP
|
|
1687
|
+
.B \-\-columns <names>
|
|
1688
|
+
Comma\-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available: State, Notifications, Environment, Runners.
|
|
1689
|
+
.TP
|
|
1690
|
+
.B \-\-no\-headers
|
|
1691
|
+
Omit the header row
|
|
1692
|
+
.TP
|
|
1693
|
+
.B \-f, \-\-filter <text>
|
|
1694
|
+
Show only monitors whose name contains this text (applies to the returned page, case\-insensitive)
|
|
1695
|
+
.TP
|
|
1696
|
+
.B \-\-sort <field>
|
|
1697
|
+
Sort the returned page by "name" or "active"
|
|
1698
|
+
.TP
|
|
1699
|
+
.B \-\-json
|
|
1700
|
+
Output as JSON instead of a table
|
|
866
1701
|
|
|
867
1702
|
.TP Examples:
|
|
868
1703
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
1704
|
+
Eg. postman monitor list
|
|
1705
|
+
postman monitor list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1706
|
+
postman monitor list \-\-active true \-\-sort name
|
|
1707
|
+
postman monitor list \-\-runner 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1708
|
+
postman monitor list \-\-columns Name,State \-\-no\-headers
|
|
1709
|
+
postman monitor list \-\-json
|
|
873
1710
|
|
|
874
1711
|
|
|
875
|
-
.SS "
|
|
876
|
-
|
|
1712
|
+
.SS "monitor get"
|
|
1713
|
+
Show a monitor's configuration.
|
|
877
1714
|
|
|
878
1715
|
.B Usage:
|
|
879
|
-
[options]
|
|
1716
|
+
[options] <monitorId>
|
|
880
1717
|
|
|
881
1718
|
.B Options:
|
|
882
1719
|
.TP
|
|
883
|
-
.B \-w, \-\-workspace <id>
|
|
884
|
-
Workspace ID (defaults to .postman/resources.yaml binding)
|
|
885
|
-
.TP
|
|
886
1720
|
.B \-\-api\-key <key>
|
|
887
|
-
Postman API key
|
|
1721
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
888
1722
|
.TP
|
|
889
1723
|
.B \-\-json
|
|
890
|
-
Output as JSON
|
|
1724
|
+
Output as JSON instead of a table
|
|
891
1725
|
|
|
892
1726
|
.TP Examples:
|
|
893
1727
|
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
postman spec list ./openapi.yaml
|
|
897
|
-
postman spec list
|
|
898
|
-
postman spec list \-w 12345\-abcde \-\-json
|
|
899
|
-
|
|
1728
|
+
Eg. postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1729
|
+
postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
|
|
900
1730
|
|
|
901
1731
|
|
|
902
|
-
.SS "
|
|
903
|
-
|
|
1732
|
+
.SS "monitor metrics"
|
|
1733
|
+
Show per\-request latency and outcome history for a monitor.
|
|
904
1734
|
|
|
905
1735
|
.B Usage:
|
|
906
|
-
[options] <
|
|
1736
|
+
[options] <monitorId>
|
|
907
1737
|
|
|
908
1738
|
.B Options:
|
|
909
1739
|
.TP
|
|
910
1740
|
.B \-\-api\-key <key>
|
|
911
|
-
Postman API key
|
|
1741
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1742
|
+
.TP
|
|
1743
|
+
.B \-\-since <dateTime>
|
|
1744
|
+
Only executions at or after this ISO 8601 date\-time. Defaults to 7 days ago.
|
|
1745
|
+
.TP
|
|
1746
|
+
.B \-\-until <dateTime>
|
|
1747
|
+
Only executions at or before this ISO 8601 date\-time. Defaults to now.
|
|
1748
|
+
.TP
|
|
1749
|
+
.B \-f, \-\-filter <text>
|
|
1750
|
+
Show only requests whose name contains this text (case\-insensitive)
|
|
1751
|
+
.TP
|
|
1752
|
+
.B \-\-limit <n>
|
|
1753
|
+
Cap the number of rows shown: executions (newest first) under \-\-json, or table rows (worst\-behaving request first) otherwise. Not honoured by the service \-\- there is no server\-side pagination on this route.
|
|
912
1754
|
.TP
|
|
913
1755
|
.B \-\-json
|
|
914
|
-
Output as JSON
|
|
1756
|
+
Output as JSON instead of a table
|
|
915
1757
|
|
|
916
1758
|
.TP Examples:
|
|
917
1759
|
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
postman spec get 12345678\-abcd\-1234\-efgh\-567890abcdef \-\-json
|
|
923
|
-
|
|
1760
|
+
Eg. postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1761
|
+
postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-since 2026\-09\-01T00:00:00Z
|
|
1762
|
+
postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-filter "GET /health"
|
|
1763
|
+
postman monitor metrics 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
|
|
924
1764
|
|
|
925
1765
|
|
|
926
|
-
.SS "monitor"
|
|
927
|
-
|
|
1766
|
+
.SS "monitor pause"
|
|
1767
|
+
Pause a monitor, so it stops firing on schedule.
|
|
928
1768
|
|
|
929
1769
|
.B Usage:
|
|
930
|
-
[options]
|
|
1770
|
+
[options] <monitorId>
|
|
931
1771
|
|
|
932
|
-
.B
|
|
1772
|
+
.B Options:
|
|
933
1773
|
.TP
|
|
934
|
-
.B
|
|
935
|
-
|
|
1774
|
+
.B \-\-api\-key <key>
|
|
1775
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1776
|
+
.TP
|
|
1777
|
+
.B \-\-json
|
|
1778
|
+
Output as JSON instead of a table
|
|
936
1779
|
|
|
937
|
-
.SS "monitor
|
|
938
|
-
|
|
1780
|
+
.SS "monitor resume"
|
|
1781
|
+
Resume a paused monitor, so it fires on schedule again.
|
|
939
1782
|
|
|
940
1783
|
.B Usage:
|
|
941
1784
|
[options] <monitorId>
|
|
942
1785
|
|
|
943
1786
|
.B Options:
|
|
944
1787
|
.TP
|
|
945
|
-
.B \-
|
|
946
|
-
|
|
1788
|
+
.B \-\-api\-key <key>
|
|
1789
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
947
1790
|
.TP
|
|
948
|
-
.B
|
|
949
|
-
|
|
1791
|
+
.B \-\-json
|
|
1792
|
+
Output as JSON instead of a table
|
|
950
1793
|
|
|
951
1794
|
.SS "workspace"
|
|
952
1795
|
Manage workspace resources.
|
|
@@ -976,6 +1819,9 @@ Pull workspace entities from a Postman workspace into the local git\-native fold
|
|
|
976
1819
|
.TP
|
|
977
1820
|
.B workspace connect-git
|
|
978
1821
|
Connect a Postman workspace to a local git repository.
|
|
1822
|
+
.TP
|
|
1823
|
+
.B workspace diff
|
|
1824
|
+
Preview local\-vs\-cloud drift before pushing. Read\-only: nothing is created, updated or deleted.
|
|
979
1825
|
|
|
980
1826
|
.SS "workspace list"
|
|
981
1827
|
List all available Postman Workspaces
|
|
@@ -1160,6 +2006,46 @@ Examples:
|
|
|
1160
2006
|
|
|
1161
2007
|
|
|
1162
2008
|
|
|
2009
|
+
.SS "workspace diff"
|
|
2010
|
+
Preview local\-vs\-cloud drift before pushing. Read\-only: nothing is created, updated or deleted.
|
|
2011
|
+
|
|
2012
|
+
.B Usage:
|
|
2013
|
+
[options] [workspaceId]
|
|
2014
|
+
|
|
2015
|
+
.B Options:
|
|
2016
|
+
.TP
|
|
2017
|
+
.B \-\-push\-strategy <strategy>
|
|
2018
|
+
Strategy to preview. "force\-sync" also shows cloud entities that would be DELETED. Defaults to "force\-sync".
|
|
2019
|
+
.TP
|
|
2020
|
+
.B \-\-summary
|
|
2021
|
+
Skip content comparison. Faster, but updates are listed without checking whether they changed.
|
|
2022
|
+
.TP
|
|
2023
|
+
.B \-\-json
|
|
2024
|
+
Print the diff as machine\-readable JSON.
|
|
2025
|
+
.TP
|
|
2026
|
+
.B \-\-exit\-code
|
|
2027
|
+
Exit with code 1 when drift is found (for CI gates).
|
|
2028
|
+
.TP
|
|
2029
|
+
.B \-\-verbose
|
|
2030
|
+
Show detailed logging
|
|
2031
|
+
.TP
|
|
2032
|
+
.B \-\-timeout <ms>
|
|
2033
|
+
Abort the run after this many milliseconds. Defaults to 120000.
|
|
2034
|
+
|
|
2035
|
+
.TP Examples:
|
|
2036
|
+
|
|
2037
|
+
Examples:
|
|
2038
|
+
postman workspace diff
|
|
2039
|
+
Preview what `push \-\-push\-strategy force\-sync` would do
|
|
2040
|
+
postman workspace diff \-\-summary
|
|
2041
|
+
Fast deletion preview, no content comparison
|
|
2042
|
+
postman workspace diff \-\-json \-\-exit\-code
|
|
2043
|
+
Machine\-readable output, exit 1 when there is drift (CI gate)
|
|
2044
|
+
postman workspace diff \-\-push\-strategy default
|
|
2045
|
+
Preview a create/update\-only push, hiding deletions
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
|
|
1163
2049
|
.SS "performance"
|
|
1164
2050
|
Manage performance tests on your collections.
|
|
1165
2051
|
|
|
@@ -1170,6 +2056,9 @@ Manage performance tests on your collections.
|
|
|
1170
2056
|
.TP
|
|
1171
2057
|
.B performance run
|
|
1172
2058
|
Run a performance test on a collection
|
|
2059
|
+
.TP
|
|
2060
|
+
.B performance runs
|
|
2061
|
+
List past performance runs for a collection, newest first.
|
|
1173
2062
|
|
|
1174
2063
|
.SS "performance run"
|
|
1175
2064
|
Run a performance test on a collection
|
|
@@ -1237,6 +2126,40 @@ Examples:
|
|
|
1237
2126
|
postman performance run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab \-\-runner postman\-cloud\-static\-ip
|
|
1238
2127
|
|
|
1239
2128
|
|
|
2129
|
+
.SS "performance runs"
|
|
2130
|
+
List past performance runs for a collection, newest first.
|
|
2131
|
+
|
|
2132
|
+
.B Usage:
|
|
2133
|
+
\-\-collection\-id <id> [options]
|
|
2134
|
+
|
|
2135
|
+
.B Options:
|
|
2136
|
+
.TP
|
|
2137
|
+
.B \-c, \-\-collection\-id <id>
|
|
2138
|
+
Collection ID whose performance runs to list
|
|
2139
|
+
.TP
|
|
2140
|
+
.B \-\-cursor <token>
|
|
2141
|
+
Pagination cursor from a previous page's response
|
|
2142
|
+
.TP
|
|
2143
|
+
.B \-\-json
|
|
2144
|
+
Output as JSON instead of a table
|
|
2145
|
+
.TP
|
|
2146
|
+
.B \-\-timeout <ms>
|
|
2147
|
+
Milliseconds to wait for the service before failing (default: 30000)
|
|
2148
|
+
|
|
2149
|
+
.TP Examples:
|
|
2150
|
+
|
|
2151
|
+
Examples:
|
|
2152
|
+
postman performance runs \-\-collection\-id 1402295\-45159473\-1e45\-1f34\-5678\-1234567890ab
|
|
2153
|
+
postman performance runs \-c 1402295\-45159473\-1e45\-1f34\-5678\-1234567890ab \-\-json
|
|
2154
|
+
postman performance runs \-c 1402295\-45159473\-1e45\-1f34\-5678\-1234567890ab \-\-cursor eyJpZCI6...
|
|
2155
|
+
|
|
2156
|
+
The newest 25 runs are returned. A `\-` in Duration means the run has not finished yet.
|
|
2157
|
+
A page shorter than 25 does not mean the end of the list: use the printed \-\-cursor
|
|
2158
|
+
while one is offered.
|
|
2159
|
+
|
|
2160
|
+
Authentication uses POSTMAN_API_KEY, or the `postman login` session.
|
|
2161
|
+
|
|
2162
|
+
|
|
1240
2163
|
.SS "flows"
|
|
1241
2164
|
Manage and interact with flows.
|
|
1242
2165
|
|
|
@@ -2279,7 +3202,7 @@ Examples:
|
|
|
2279
3202
|
|
|
2280
3203
|
|
|
2281
3204
|
.SS "mock"
|
|
2282
|
-
|
|
3205
|
+
Create, run, and manage Postman mocks — in your repository or in Postman cloud.
|
|
2283
3206
|
|
|
2284
3207
|
.B Usage:
|
|
2285
3208
|
[options] [command]
|
|
@@ -2287,28 +3210,31 @@ Run and manage Postman mocks, locally and in the cloud.
|
|
|
2287
3210
|
.B Subcommands:
|
|
2288
3211
|
.TP
|
|
2289
3212
|
.B mock generate
|
|
2290
|
-
Generate a
|
|
3213
|
+
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.
|
|
2291
3214
|
.TP
|
|
2292
3215
|
.B mock run
|
|
2293
|
-
Start a
|
|
3216
|
+
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).
|
|
3217
|
+
.TP
|
|
3218
|
+
.B mock push
|
|
3219
|
+
Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).
|
|
2294
3220
|
.TP
|
|
2295
3221
|
.B mock deploy
|
|
2296
|
-
|
|
3222
|
+
Turn a mock in Postman cloud into a live mock server others can call over the internet.
|
|
2297
3223
|
.TP
|
|
2298
3224
|
.B mock get
|
|
2299
|
-
Show a mock's details
|
|
3225
|
+
Show a mock's details using its path if it lives in your repository, or its id if it lives in Postman cloud.
|
|
2300
3226
|
.TP
|
|
2301
3227
|
.B mock list
|
|
2302
|
-
List
|
|
3228
|
+
List the mocks in your repository or Postman cloud workspace
|
|
2303
3229
|
.TP
|
|
2304
3230
|
.B mock log
|
|
2305
|
-
|
|
3231
|
+
Show the requests a live mock server has received and the responses it sent, using its id.
|
|
2306
3232
|
.TP
|
|
2307
3233
|
.B mock delete
|
|
2308
|
-
|
|
3234
|
+
Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.
|
|
2309
3235
|
|
|
2310
3236
|
.SS "mock generate"
|
|
2311
|
-
Generate a
|
|
3237
|
+
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.
|
|
2312
3238
|
|
|
2313
3239
|
.B Usage:
|
|
2314
3240
|
[sourcePath] [options]
|
|
@@ -2316,25 +3242,25 @@ Generate a runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git\
|
|
|
2316
3242
|
.B Options:
|
|
2317
3243
|
.TP
|
|
2318
3244
|
.B \-o, \-\-output <dir>
|
|
2319
|
-
|
|
3245
|
+
Folder to save the mock in. Relative or absolute, e.g. ./postman/mocks/orders. Defaults to postman/mocks/<name>.
|
|
2320
3246
|
.TP
|
|
2321
3247
|
.B \-n, \-\-name <name>
|
|
2322
|
-
|
|
3248
|
+
Name for the mock. Taken from the source when you provide one; required for the sample.
|
|
2323
3249
|
.TP
|
|
2324
3250
|
.B \-\-port <port>
|
|
2325
|
-
Port the mock
|
|
3251
|
+
Port the mock runs on (e.g. 4010) (default: 4500)
|
|
2326
3252
|
.TP
|
|
2327
3253
|
.B \-\-force
|
|
2328
|
-
Overwrite the
|
|
3254
|
+
Overwrite the mock's files if the target folder already has one
|
|
2329
3255
|
.TP
|
|
2330
3256
|
.B \-u, \-\-update <mockPath>
|
|
2331
|
-
Update an existing mock
|
|
3257
|
+
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.
|
|
2332
3258
|
.TP
|
|
2333
3259
|
.B \-w, \-\-workspace <id>
|
|
2334
|
-
|
|
3260
|
+
Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with \-\-output, \-\-force, or \-\-update.
|
|
2335
3261
|
.TP
|
|
2336
3262
|
.B \-\-api\-key <key>
|
|
2337
|
-
Postman API key
|
|
3263
|
+
Postman API key to use with \-\-workspace (defaults to your `postman login` session)
|
|
2338
3264
|
.TP
|
|
2339
3265
|
.B \-x, \-\-suppress\-exit\-code
|
|
2340
3266
|
Always exit with code 0, even on failure
|
|
@@ -2346,11 +3272,13 @@ Eg. postman mock generate ./my\-collection.json
|
|
|
2346
3272
|
postman mock generate \-\-name "My Mock" \-\-port 4010 # sample mock, custom port
|
|
2347
3273
|
postman mock generate ./openapi.yaml \-\-output ./postman/mocks/api \-\-port 4010
|
|
2348
3274
|
postman mock generate ./my\-collection.json \-\-update ./postman/mocks/orders
|
|
2349
|
-
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # cloud
|
|
3275
|
+
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # save to Postman cloud
|
|
3276
|
+
|
|
3277
|
+
Paths can be relative (e.g. ./my\-collection.json) or absolute (e.g. /Users/me/my\-collection.json).
|
|
2350
3278
|
|
|
2351
3279
|
|
|
2352
3280
|
.SS "mock run"
|
|
2353
|
-
Start a
|
|
3281
|
+
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).
|
|
2354
3282
|
|
|
2355
3283
|
.B Usage:
|
|
2356
3284
|
<mockIdOrPath>
|
|
@@ -2358,29 +3286,54 @@ Start a local mock server from a cloud mock id (fetched and run locally), a mani
|
|
|
2358
3286
|
.B Options:
|
|
2359
3287
|
.TP
|
|
2360
3288
|
.B \-e, \-\-environment <path>
|
|
2361
|
-
Path to
|
|
3289
|
+
Path to a file of environment variables for the mock. Relative or absolute, e.g. ./postman/environments/dev.json
|
|
2362
3290
|
.TP
|
|
2363
3291
|
.B \-g, \-\-globals <path>
|
|
2364
|
-
Path to a
|
|
3292
|
+
Path to a file of global variables for the mock. Relative or absolute, e.g. ./globals.json
|
|
2365
3293
|
.TP
|
|
2366
3294
|
.B \-p, \-\-port <port>
|
|
2367
|
-
|
|
3295
|
+
Port to run on (e.g. 4010), or "auto" for a free one. Defaults to the mock's configured port.
|
|
3296
|
+
.TP
|
|
3297
|
+
.B \-\-api\-key <key>
|
|
3298
|
+
Postman API key, used with a Postman cloud id (defaults to your `postman login` session)
|
|
3299
|
+
|
|
3300
|
+
.TP Examples:
|
|
3301
|
+
|
|
3302
|
+
Eg. postman mock run 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Postman cloud
|
|
3303
|
+
postman mock run ./postman/mocks/orders # by path, from your repository
|
|
3304
|
+
postman mock run ./postman/mocks/orders \-\-environment ./postman/environments/dev.json
|
|
3305
|
+
postman mock run ./postman/mocks/orders \-\-port auto # pick any free port
|
|
3306
|
+
postman mock run ./postman/mocks/orders \-\-port 4600 # use port 4600 (fails if it is in use)
|
|
3307
|
+
|
|
3308
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
3309
|
+
|
|
3310
|
+
|
|
3311
|
+
.SS "mock push"
|
|
3312
|
+
Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).
|
|
3313
|
+
|
|
3314
|
+
.B Usage:
|
|
3315
|
+
<mockPath> [options]
|
|
3316
|
+
|
|
3317
|
+
.B Options:
|
|
3318
|
+
.TP
|
|
3319
|
+
.B \-w, \-\-workspace <id>
|
|
3320
|
+
Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)
|
|
2368
3321
|
.TP
|
|
2369
3322
|
.B \-\-api\-key <key>
|
|
2370
|
-
Postman API key
|
|
3323
|
+
Postman API key (defaults to your `postman login` session)
|
|
2371
3324
|
|
|
2372
3325
|
.TP Examples:
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
postman mock
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
3326
|
+
|
|
3327
|
+
Eg. postman mock push ./postman/mocks/orders # a mock in your repository
|
|
3328
|
+
postman mock push ./postman/mocks/orders \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
3329
|
+
|
|
3330
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
3331
|
+
|
|
3332
|
+
After uploading, use `postman mock deploy <id>` to turn it into a live mock server.
|
|
2380
3333
|
|
|
2381
3334
|
|
|
2382
3335
|
.SS "mock deploy"
|
|
2383
|
-
|
|
3336
|
+
Turn a mock in Postman cloud into a live mock server others can call over the internet.
|
|
2384
3337
|
|
|
2385
3338
|
.B Usage:
|
|
2386
3339
|
<mockId> [options]
|
|
@@ -2388,38 +3341,40 @@ Deploy a cloud mock into a mock server.
|
|
|
2388
3341
|
.B Options:
|
|
2389
3342
|
.TP
|
|
2390
3343
|
.B \-w, \-\-workspace <id>
|
|
2391
|
-
|
|
3344
|
+
Postman cloud workspace that will own the server, by id (defaults to the workspace already linked to this project)
|
|
2392
3345
|
.TP
|
|
2393
3346
|
.B \-n, \-\-name <name>
|
|
2394
|
-
|
|
3347
|
+
Name for the mock server (you are asked for one if you skip this)
|
|
2395
3348
|
.TP
|
|
2396
3349
|
.B \-s, \-\-slug <slug>
|
|
2397
|
-
|
|
3350
|
+
Short label used in the server's web address, e.g. "my\-mock" (you are asked for one if you skip this)
|
|
2398
3351
|
.TP
|
|
2399
3352
|
.B \-\-public
|
|
2400
|
-
|
|
3353
|
+
Let anyone with the link reach the server. Private by default (callers must send a Postman API key).
|
|
2401
3354
|
.TP
|
|
2402
3355
|
.B \-\-auto\-deploy
|
|
2403
|
-
|
|
3356
|
+
Update the live server automatically whenever the mock changes (off by default)
|
|
2404
3357
|
.TP
|
|
2405
3358
|
.B \-y, \-\-yes
|
|
2406
|
-
|
|
3359
|
+
Use the defaults and skip all questions (private, no auto\-deploy)
|
|
2407
3360
|
.TP
|
|
2408
3361
|
.B \-\-api\-key <key>
|
|
2409
|
-
Postman API key (defaults to
|
|
3362
|
+
Postman API key (defaults to your `postman login` session)
|
|
2410
3363
|
|
|
2411
3364
|
.TP Examples:
|
|
2412
3365
|
|
|
2413
|
-
|
|
3366
|
+
mockId is the id of a mock in Postman cloud (find it with `postman mock list`).
|
|
3367
|
+
|
|
3368
|
+
Eg. postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef # asks a few questions
|
|
2414
3369
|
postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-mock \-\-public
|
|
2415
3370
|
postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-n "My Mock" \-s my\-mock \-\-auto\-deploy
|
|
2416
|
-
postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-mock \-y #
|
|
3371
|
+
postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-mock \-y # no questions asked
|
|
2417
3372
|
|
|
2418
|
-
|
|
3373
|
+
Don't have the mock in Postman cloud yet? Upload it first with `postman mock push`.
|
|
2419
3374
|
|
|
2420
3375
|
|
|
2421
3376
|
.SS "mock get"
|
|
2422
|
-
Show a mock's details
|
|
3377
|
+
Show a mock's details using its path if it lives in your repository, or its id if it lives in Postman cloud.
|
|
2423
3378
|
|
|
2424
3379
|
.B Usage:
|
|
2425
3380
|
<mockIdOrPath> [options]
|
|
@@ -2427,20 +3382,22 @@ Show a mock's details: a cloud mock by id, or a local mock by path.
|
|
|
2427
3382
|
.B Options:
|
|
2428
3383
|
.TP
|
|
2429
3384
|
.B \-\-api\-key <key>
|
|
2430
|
-
Postman API key (defaults to
|
|
3385
|
+
Postman API key (defaults to your `postman login` session)
|
|
2431
3386
|
.TP
|
|
2432
3387
|
.B \-\-json
|
|
2433
|
-
|
|
3388
|
+
Print the details as machine\-readable data instead of a table
|
|
2434
3389
|
|
|
2435
3390
|
.TP Examples:
|
|
2436
3391
|
|
|
2437
|
-
Eg. postman mock get 12345678\-90ab\-cdef\-1234\-567890abcdef #
|
|
2438
|
-
postman mock get ./postman/mocks/orders #
|
|
3392
|
+
Eg. postman mock get 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Postman cloud
|
|
3393
|
+
postman mock get ./postman/mocks/orders # by path, from your repository
|
|
2439
3394
|
postman mock get ./postman/mocks/orders \-\-json
|
|
2440
3395
|
|
|
3396
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
3397
|
+
|
|
2441
3398
|
|
|
2442
3399
|
.SS "mock list"
|
|
2443
|
-
List
|
|
3400
|
+
List the mocks in your repository or Postman cloud workspace
|
|
2444
3401
|
|
|
2445
3402
|
.B Usage:
|
|
2446
3403
|
[pathOrDir] [options]
|
|
@@ -2448,24 +3405,26 @@ List a workspace's cloud mocks, or (with a path) local mocks under a directory.
|
|
|
2448
3405
|
.B Options:
|
|
2449
3406
|
.TP
|
|
2450
3407
|
.B \-w, \-\-workspace <id>
|
|
2451
|
-
|
|
3408
|
+
Postman cloud workspace whose mocks to list, by id (defaults to the workspace already linked to this project)
|
|
2452
3409
|
.TP
|
|
2453
3410
|
.B \-\-api\-key <key>
|
|
2454
|
-
Postman API key (defaults to
|
|
3411
|
+
Postman API key (defaults to your `postman login` session)
|
|
2455
3412
|
.TP
|
|
2456
3413
|
.B \-\-json
|
|
2457
|
-
|
|
3414
|
+
Print the list as machine\-readable data instead of a table
|
|
2458
3415
|
|
|
2459
3416
|
.TP Examples:
|
|
2460
3417
|
|
|
2461
|
-
Eg. postman mock list
|
|
2462
|
-
postman mock list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef #
|
|
2463
|
-
postman mock list ./postman/mocks #
|
|
3418
|
+
Eg. postman mock list # your Postman cloud workspace
|
|
3419
|
+
postman mock list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # a specific workspace
|
|
3420
|
+
postman mock list ./postman/mocks # a folder in your repository
|
|
2464
3421
|
postman mock list ./postman/mocks \-\-json
|
|
2465
3422
|
|
|
3423
|
+
The folder path can be relative (e.g. ./postman/mocks) or absolute (e.g. /Users/me/postman/mocks).
|
|
3424
|
+
|
|
2466
3425
|
|
|
2467
3426
|
.SS "mock log"
|
|
2468
|
-
|
|
3427
|
+
Show the requests a live mock server has received and the responses it sent, using its id.
|
|
2469
3428
|
|
|
2470
3429
|
.B Usage:
|
|
2471
3430
|
<mockServerId> [options]
|
|
@@ -2473,40 +3432,42 @@ Browse a deployed mock server's request/response logs by its id (see `mock get`)
|
|
|
2473
3432
|
.B Options:
|
|
2474
3433
|
.TP
|
|
2475
3434
|
.B \-\-limit <n>
|
|
2476
|
-
|
|
3435
|
+
Most entries to show (defaults to 50 when printing machine\-readable output)
|
|
2477
3436
|
.TP
|
|
2478
3437
|
.B \-\-method <method>
|
|
2479
|
-
|
|
3438
|
+
Show only requests of this type (e.g. GET, POST)
|
|
2480
3439
|
.TP
|
|
2481
3440
|
.B \-\-status <code|range>
|
|
2482
|
-
|
|
3441
|
+
Show only these response codes (e.g. 404, or 5xx for any 500\-series)
|
|
2483
3442
|
.TP
|
|
2484
3443
|
.B \-\-path <pattern>
|
|
2485
|
-
|
|
3444
|
+
Show only requests to matching addresses (use * and ? as wildcards, e.g. /users/*)
|
|
2486
3445
|
.TP
|
|
2487
3446
|
.B \-\-since <duration>
|
|
2488
|
-
Show
|
|
3447
|
+
Show entries from this long ago until now (e.g. 2h = the last 2 hours)
|
|
2489
3448
|
.TP
|
|
2490
3449
|
.B \-\-until <duration>
|
|
2491
|
-
|
|
3450
|
+
Hide entries newer than this (e.g. 30m = skip the most recent 30 minutes)
|
|
2492
3451
|
.TP
|
|
2493
3452
|
.B \-\-api\-key <key>
|
|
2494
|
-
Postman API key (defaults to
|
|
3453
|
+
Postman API key (defaults to your `postman login` session)
|
|
2495
3454
|
.TP
|
|
2496
3455
|
.B \-\-json
|
|
2497
|
-
|
|
3456
|
+
Print entries as machine\-readable data instead of the scrollable view
|
|
2498
3457
|
|
|
2499
3458
|
.TP Examples:
|
|
2500
3459
|
|
|
2501
|
-
|
|
2502
|
-
|
|
3460
|
+
mockServerId is the id of a live mock server (get it from `postman mock deploy` or `postman mock get`).
|
|
3461
|
+
|
|
3462
|
+
Eg. postman mock log 12345678\-90ab\-cdef\-1234\-567890abcdef # scroll through entries
|
|
3463
|
+
postman mock log 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json # machine\-readable output
|
|
2503
3464
|
postman mock log <mockServerId> \-\-method GET \-\-path '/users/*'
|
|
2504
3465
|
postman mock log <mockServerId> \-\-status 5xx \-\-limit 50
|
|
2505
3466
|
postman mock log <mockServerId> \-\-since 7h \-\-until 2h # between 7h and 2h ago
|
|
2506
3467
|
|
|
2507
3468
|
|
|
2508
3469
|
.SS "mock delete"
|
|
2509
|
-
|
|
3470
|
+
Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.
|
|
2510
3471
|
|
|
2511
3472
|
.B Usage:
|
|
2512
3473
|
<mockIdOrPath> [options]
|
|
@@ -2514,17 +3475,18 @@ Permanently remove a mock: a cloud mock by id, or a local mock artifact by path.
|
|
|
2514
3475
|
.B Options:
|
|
2515
3476
|
.TP
|
|
2516
3477
|
.B \-y, \-\-yes
|
|
2517
|
-
|
|
3478
|
+
Delete without asking for confirmation first
|
|
2518
3479
|
.TP
|
|
2519
3480
|
.B \-\-api\-key <key>
|
|
2520
|
-
Postman API key
|
|
3481
|
+
Postman API key, used with a Postman cloud id (defaults to your `postman login` session)
|
|
2521
3482
|
|
|
2522
3483
|
.TP Examples:
|
|
2523
3484
|
|
|
2524
|
-
Eg. postman mock delete 12345678\-90ab\-cdef\-1234\-567890abcdef #
|
|
2525
|
-
postman mock delete ./postman/mocks/orders #
|
|
3485
|
+
Eg. postman mock delete 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Postman cloud
|
|
3486
|
+
postman mock delete ./postman/mocks/orders # by path, from your repository
|
|
2526
3487
|
postman mock delete ./postman/mocks/orders \-\-yes
|
|
2527
|
-
|
|
3488
|
+
|
|
3489
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
2528
3490
|
|
|
2529
3491
|
|
|
2530
3492
|
.SS "application"
|
|
@@ -4505,6 +5467,15 @@ Manage workspace dependencies (Postman entities reused from other workspaces).
|
|
|
4505
5467
|
.TP
|
|
4506
5468
|
.B dependency add
|
|
4507
5469
|
Add a Postman collection, environment, or mock as a workspace dependency.
|
|
5470
|
+
.TP
|
|
5471
|
+
.B dependency list
|
|
5472
|
+
List the workspace dependencies declared in .postman/resources.yaml.
|
|
5473
|
+
.TP
|
|
5474
|
+
.B dependency install
|
|
5475
|
+
Materialise the dependencies declared in .postman/resources.yaml (all, or one).
|
|
5476
|
+
.TP
|
|
5477
|
+
.B dependency update
|
|
5478
|
+
Refresh declared dependencies to the latest content from their source (all, or one).
|
|
4508
5479
|
|
|
4509
5480
|
.SS "dependency add"
|
|
4510
5481
|
Add a Postman collection, environment, or mock as a workspace dependency.
|
|
@@ -4532,6 +5503,83 @@ Examples:
|
|
|
4532
5503
|
|
|
4533
5504
|
|
|
4534
5505
|
|
|
5506
|
+
.SS "dependency list"
|
|
5507
|
+
List the workspace dependencies declared in .postman/resources.yaml.
|
|
5508
|
+
|
|
5509
|
+
.B Usage:
|
|
5510
|
+
[options]
|
|
5511
|
+
|
|
5512
|
+
.B Options:
|
|
5513
|
+
.TP
|
|
5514
|
+
.B \-\-type <type>
|
|
5515
|
+
Only list dependencies of this type (collection, environment, or mock).
|
|
5516
|
+
.TP
|
|
5517
|
+
.B \-\-json
|
|
5518
|
+
Output the result as JSON.
|
|
5519
|
+
|
|
5520
|
+
.TP Examples:
|
|
5521
|
+
|
|
5522
|
+
Examples:
|
|
5523
|
+
postman dependency list
|
|
5524
|
+
postman dependency list \-\-type collection
|
|
5525
|
+
postman dependency list \-\-json
|
|
5526
|
+
|
|
5527
|
+
|
|
5528
|
+
|
|
5529
|
+
.SS "dependency install"
|
|
5530
|
+
Materialise the dependencies declared in .postman/resources.yaml (all, or one).
|
|
5531
|
+
|
|
5532
|
+
.B Usage:
|
|
5533
|
+
[options] [nameOrId]
|
|
5534
|
+
|
|
5535
|
+
.B Options:
|
|
5536
|
+
.TP
|
|
5537
|
+
.B \-\-type <type>
|
|
5538
|
+
Only install dependencies of this type (collection, environment, or mock).
|
|
5539
|
+
.TP
|
|
5540
|
+
.B \-\-json
|
|
5541
|
+
Output the result as JSON.
|
|
5542
|
+
|
|
5543
|
+
.TP Examples:
|
|
5544
|
+
|
|
5545
|
+
Install is the `npm install` of a Postman project: the step to run after a clone or in CI.
|
|
5546
|
+
A [nameOrId] is the cloud id, display name, or on\-disk name of a declared
|
|
5547
|
+
dependency (as shown by `postman dependency list`).
|
|
5548
|
+
|
|
5549
|
+
Examples:
|
|
5550
|
+
postman dependency install
|
|
5551
|
+
postman dependency install \-\-type collection
|
|
5552
|
+
postman dependency install Payments
|
|
5553
|
+
|
|
5554
|
+
|
|
5555
|
+
|
|
5556
|
+
.SS "dependency update"
|
|
5557
|
+
Refresh declared dependencies to the latest content from their source (all, or one).
|
|
5558
|
+
|
|
5559
|
+
.B Usage:
|
|
5560
|
+
[options] [nameOrId]
|
|
5561
|
+
|
|
5562
|
+
.B Options:
|
|
5563
|
+
.TP
|
|
5564
|
+
.B \-\-type <type>
|
|
5565
|
+
Only update dependencies of this type (collection, environment, or mock).
|
|
5566
|
+
.TP
|
|
5567
|
+
.B \-\-json
|
|
5568
|
+
Output the result as JSON.
|
|
5569
|
+
|
|
5570
|
+
.TP Examples:
|
|
5571
|
+
|
|
5572
|
+
Update fetches the latest cloud entity for each declared dependency and overwrites its
|
|
5573
|
+
files in place. A [nameOrId] is the cloud id, display name, or on\-disk name of a
|
|
5574
|
+
declared dependency (as shown by `postman dependency list`).
|
|
5575
|
+
|
|
5576
|
+
Examples:
|
|
5577
|
+
postman dependency update
|
|
5578
|
+
postman dependency update \-\-type environment
|
|
5579
|
+
postman dependency update Payments
|
|
5580
|
+
|
|
5581
|
+
|
|
5582
|
+
|
|
4535
5583
|
.SH SEE ALSO
|
|
4536
5584
|
Full documentation: https://learning.postman.com/docs/postman\-cli/postman\-cli\-overview/
|
|
4537
5585
|
.SH AUTHOR
|