postman-cli 1.57.0 → 1.58.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 +816 -77
- 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-17" "v1.58.0" "Postman CLI Manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
postman \- Command\-line companion utility for Postman
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -127,6 +127,17 @@ Examples:
|
|
|
127
127
|
$ postman init \-\-visibility personal
|
|
128
128
|
|
|
129
129
|
|
|
130
|
+
.SS "whoami"
|
|
131
|
+
Show the Postman account or guest session this CLI session is using.
|
|
132
|
+
|
|
133
|
+
.B Usage:
|
|
134
|
+
[options]
|
|
135
|
+
|
|
136
|
+
.B Options:
|
|
137
|
+
.TP
|
|
138
|
+
.B \-\-json
|
|
139
|
+
Print current identity as machine\-readable JSON.
|
|
140
|
+
|
|
130
141
|
.SS "skills"
|
|
131
142
|
Check and update the agent skills in this repository.
|
|
132
143
|
|
|
@@ -425,14 +436,14 @@ Exports the cookie jar to a file after completing the run
|
|
|
425
436
|
.B \-\-verbose
|
|
426
437
|
Show detailed information of collection run and each request sent
|
|
427
438
|
.TP
|
|
428
|
-
.B \-\-mock <
|
|
429
|
-
Start a mock server
|
|
439
|
+
.B \-\-mock <pathOrId>
|
|
440
|
+
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
441
|
.TP
|
|
431
442
|
.B \-\-port <port>
|
|
432
|
-
Port for the \-\-mock server
|
|
443
|
+
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
444
|
.TP
|
|
434
445
|
.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
|
|
446
|
+
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
447
|
.TP
|
|
437
448
|
.B \-\-simulate <path>
|
|
438
449
|
Start mock servers with fault\-injection scenarios from a .sim.yaml file
|
|
@@ -445,6 +456,8 @@ Do not send analytics to Postman
|
|
|
445
456
|
|
|
446
457
|
.TP Examples:
|
|
447
458
|
Eg. postman collection run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab
|
|
459
|
+
postman collection run <id> \-\-mock ./postman/mocks/orders # a mock in your repository
|
|
460
|
+
postman collection run <id> \-\-mock 12345678\-90ab\-cdef\-1234\-567890abcdef # a mock in Postman cloud
|
|
448
461
|
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./mock/config.yaml delay"
|
|
449
462
|
postman collection run <id> \-\-use\-mock "{{baseurl}} mock:./a.yaml" \-\-use\-mock "api.com mock\-server:9d8e7f6a"
|
|
450
463
|
|
|
@@ -585,12 +598,15 @@ Verbose output
|
|
|
585
598
|
.TP
|
|
586
599
|
.B \-\-json
|
|
587
600
|
JSON output
|
|
601
|
+
.TP
|
|
602
|
+
.B \-\-show\-secrets
|
|
603
|
+
Show secret variable values in output
|
|
588
604
|
|
|
589
605
|
.TP Examples:
|
|
590
606
|
|
|
591
607
|
Examples:
|
|
592
608
|
postman environment var get baseUrl \-\-environment ./postman/environments/dev.environment.yaml
|
|
593
|
-
postman environment var get token \-\-environment 123456\-11111111\-2222\-3333\-4444\-
|
|
609
|
+
postman environment var get token \-\-environment 123456\-11111111\-2222\-3333\-4444\-5555555 \-\-show\-secrets
|
|
594
610
|
|
|
595
611
|
|
|
596
612
|
|
|
@@ -752,7 +768,7 @@ Eg. postman api publish <apiId> \-\-name v1\e
|
|
|
752
768
|
|
|
753
769
|
|
|
754
770
|
.SS "runner"
|
|
755
|
-
|
|
771
|
+
Where your monitors execute: run and inspect your own self\-hosted runners, and list the Postman\-operated regions available to your team
|
|
756
772
|
|
|
757
773
|
.B Usage:
|
|
758
774
|
[options] [command]
|
|
@@ -761,6 +777,12 @@ Run runners on your own environments for monitoring your APIs
|
|
|
761
777
|
.TP
|
|
762
778
|
.B runner start
|
|
763
779
|
Start a runner
|
|
780
|
+
.TP
|
|
781
|
+
.B runner list
|
|
782
|
+
List the team's registered self\-hosted runners
|
|
783
|
+
.TP
|
|
784
|
+
.B runner regions
|
|
785
|
+
List the region and private\-runner values valid for monitor create/update \-\-runner, including a static IP where configured
|
|
764
786
|
|
|
765
787
|
.SS "runner start"
|
|
766
788
|
Start a runner
|
|
@@ -803,6 +825,34 @@ Accepted for compatibility; analytics are sent by default
|
|
|
803
825
|
.B \-\-no\-report\-events
|
|
804
826
|
Do not send analytics to Postman
|
|
805
827
|
|
|
828
|
+
.SS "runner list"
|
|
829
|
+
List the team's registered self\-hosted runners
|
|
830
|
+
|
|
831
|
+
.B Usage:
|
|
832
|
+
[options]
|
|
833
|
+
|
|
834
|
+
.B Options:
|
|
835
|
+
.TP
|
|
836
|
+
.B \-\-api\-key <key>
|
|
837
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
838
|
+
.TP
|
|
839
|
+
.B \-\-json
|
|
840
|
+
Output the runner list as JSON instead of a table
|
|
841
|
+
|
|
842
|
+
.SS "runner regions"
|
|
843
|
+
List the region and private\-runner values valid for monitor create/update \-\-runner, including a static IP where configured
|
|
844
|
+
|
|
845
|
+
.B Usage:
|
|
846
|
+
[options]
|
|
847
|
+
|
|
848
|
+
.B Options:
|
|
849
|
+
.TP
|
|
850
|
+
.B \-\-api\-key <key>
|
|
851
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
852
|
+
.TP
|
|
853
|
+
.B \-\-json
|
|
854
|
+
Output the region list as JSON instead of a table
|
|
855
|
+
|
|
806
856
|
.SS "spec"
|
|
807
857
|
Lint and validate Specifications from the command line
|
|
808
858
|
|
|
@@ -824,6 +874,12 @@ List local spec files under a path, or (no path) a workspace's cloud specs.
|
|
|
824
874
|
.TP
|
|
825
875
|
.B spec get
|
|
826
876
|
Read a spec definition, including every file of a multi\-file spec.
|
|
877
|
+
.TP
|
|
878
|
+
.B spec file
|
|
879
|
+
Add, update, or remove files in a spec (cloud ID or local directory).
|
|
880
|
+
.TP
|
|
881
|
+
.B spec create
|
|
882
|
+
Create a new spec in a workspace, or (with path) scaffold a local spec file.
|
|
827
883
|
|
|
828
884
|
.SS "spec lint"
|
|
829
885
|
Run linting on the given specification by ID or local file path.
|
|
@@ -923,8 +979,136 @@ Examples:
|
|
|
923
979
|
|
|
924
980
|
|
|
925
981
|
|
|
982
|
+
.SS "spec file"
|
|
983
|
+
Add, update, or remove files in a spec (cloud ID or local directory).
|
|
984
|
+
|
|
985
|
+
.B Usage:
|
|
986
|
+
[options] [command]
|
|
987
|
+
|
|
988
|
+
.B Subcommands:
|
|
989
|
+
.TP
|
|
990
|
+
.B spec file add
|
|
991
|
+
Add a new file to a spec.
|
|
992
|
+
.TP
|
|
993
|
+
.B spec file update
|
|
994
|
+
Update an existing file in a spec.
|
|
995
|
+
.TP
|
|
996
|
+
.B spec file rm
|
|
997
|
+
Remove a file from a spec.
|
|
998
|
+
|
|
999
|
+
.SS "spec file add"
|
|
1000
|
+
Add a new file to a spec.
|
|
1001
|
+
|
|
1002
|
+
.B Usage:
|
|
1003
|
+
[options] <spec> <filePath>
|
|
1004
|
+
|
|
1005
|
+
.B Options:
|
|
1006
|
+
.TP
|
|
1007
|
+
.B \-c, \-\-content <content>
|
|
1008
|
+
File content (reads from stdin if omitted)
|
|
1009
|
+
.TP
|
|
1010
|
+
.B \-\-api\-key <key>
|
|
1011
|
+
Postman API key
|
|
1012
|
+
|
|
1013
|
+
.TP Examples:
|
|
1014
|
+
|
|
1015
|
+
Examples:
|
|
1016
|
+
postman spec file add 12345678\-abcd\-1234\-abcd\-1234567890ab schemas/user.yaml \-c "type: object"
|
|
1017
|
+
postman spec file add ./postman/specs/api schemas/user.yaml \-c "type: object"
|
|
1018
|
+
cat schema.yaml | postman spec file add ./postman/specs/api schemas/user.yaml
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
.SS "spec file update"
|
|
1023
|
+
Update an existing file in a spec.
|
|
1024
|
+
|
|
1025
|
+
.B Usage:
|
|
1026
|
+
[options] <spec> <filePath>
|
|
1027
|
+
|
|
1028
|
+
.B Options:
|
|
1029
|
+
.TP
|
|
1030
|
+
.B \-c, \-\-content <content>
|
|
1031
|
+
New file content (reads from stdin if omitted)
|
|
1032
|
+
.TP
|
|
1033
|
+
.B \-\-api\-key <key>
|
|
1034
|
+
Postman API key
|
|
1035
|
+
|
|
1036
|
+
.TP Examples:
|
|
1037
|
+
|
|
1038
|
+
Examples:
|
|
1039
|
+
postman spec file update 12345678\-abcd\-1234\-abcd\-1234567890ab index.yaml \-c "openapi: 3.1.0"
|
|
1040
|
+
postman spec file update ./postman/specs/api schemas/user.yaml \-c "type: object"
|
|
1041
|
+
cat schema.yaml | postman spec file update ./postman/specs/api schemas/user.yaml
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
.SS "spec file rm"
|
|
1046
|
+
Remove a file from a spec.
|
|
1047
|
+
|
|
1048
|
+
.B Usage:
|
|
1049
|
+
[options] <spec> <filePath>
|
|
1050
|
+
|
|
1051
|
+
.B Options:
|
|
1052
|
+
.TP
|
|
1053
|
+
.B \-y, \-\-yes
|
|
1054
|
+
Skip confirmation prompt
|
|
1055
|
+
.TP
|
|
1056
|
+
.B \-\-api\-key <key>
|
|
1057
|
+
Postman API key
|
|
1058
|
+
|
|
1059
|
+
.TP Examples:
|
|
1060
|
+
|
|
1061
|
+
Examples:
|
|
1062
|
+
postman spec file rm 12345678\-abcd\-1234\-abcd\-1234567890ab schemas/user.yaml \-\-yes
|
|
1063
|
+
postman spec file rm ./postman/specs/api schemas/user.yaml \-\-yes
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
.SS "spec create"
|
|
1068
|
+
Create a new spec in a workspace, or (with path) scaffold a local spec file.
|
|
1069
|
+
|
|
1070
|
+
.B Usage:
|
|
1071
|
+
[options] [path]
|
|
1072
|
+
|
|
1073
|
+
.B Options:
|
|
1074
|
+
.TP
|
|
1075
|
+
.B \-n, \-\-name <name>
|
|
1076
|
+
Specification name / title
|
|
1077
|
+
.TP
|
|
1078
|
+
.B \-t, \-\-type <type>
|
|
1079
|
+
Spec type: openapi, asyncapi, graphql, protobuf, smithy (default: openapi) (default: openapi)
|
|
1080
|
+
.TP
|
|
1081
|
+
.B \-\-spec\-version <ver>
|
|
1082
|
+
Spec version (e.g. 3.1 for openapi, 3 for protobuf)
|
|
1083
|
+
.TP
|
|
1084
|
+
.B \-f, \-\-format <fmt>
|
|
1085
|
+
File format: yaml or json (openapi/asyncapi only, default: yaml) (default: yaml)
|
|
1086
|
+
.TP
|
|
1087
|
+
.B \-w, \-\-workspace <id>
|
|
1088
|
+
Workspace ID (cloud create, defaults to .postman/resources.yaml)
|
|
1089
|
+
.TP
|
|
1090
|
+
.B \-\-force
|
|
1091
|
+
Overwrite an existing local file
|
|
1092
|
+
.TP
|
|
1093
|
+
.B \-\-api\-key <key>
|
|
1094
|
+
Postman API key
|
|
1095
|
+
|
|
1096
|
+
.TP Examples:
|
|
1097
|
+
|
|
1098
|
+
Examples:
|
|
1099
|
+
postman spec create \-n "Pet Store"
|
|
1100
|
+
postman spec create \-n "Pet Store" \-w 12345678\-abcd\-1234\-abcd\-1234567890ab
|
|
1101
|
+
postman spec create ./postman/specs/pet\-store/index.yaml \-n "Pet Store"
|
|
1102
|
+
postman spec create ./api.yaml \-n "Events" \-t asyncapi \-f yaml
|
|
1103
|
+
postman spec create ./swagger.yaml \-n "Legacy" \-t openapi \-\-spec\-version 2.0
|
|
1104
|
+
postman spec create ./schema.graphql \-n "My GraphQL API" \-t graphql
|
|
1105
|
+
postman spec create ./service.proto \-n "My Service" \-t protobuf \-\-spec\-version 3
|
|
1106
|
+
postman spec create ./model.smithy \-n "My Model" \-t smithy
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
926
1110
|
.SS "monitor"
|
|
927
|
-
|
|
1111
|
+
Run and manage Postman monitors.
|
|
928
1112
|
|
|
929
1113
|
.B Usage:
|
|
930
1114
|
[options] [command]
|
|
@@ -933,6 +1117,33 @@ Invoke a monitor run and display results
|
|
|
933
1117
|
.TP
|
|
934
1118
|
.B monitor run
|
|
935
1119
|
Invoke a monitor run and display results.
|
|
1120
|
+
.TP
|
|
1121
|
+
.B monitor create
|
|
1122
|
+
Create a collection\-based monitor.
|
|
1123
|
+
.TP
|
|
1124
|
+
.B monitor update
|
|
1125
|
+
Update a monitor's schedule, runner, notifications or run options.
|
|
1126
|
+
.TP
|
|
1127
|
+
.B monitor delete
|
|
1128
|
+
Permanently delete a monitor. Prompts for confirmation unless \-\-yes is passed.
|
|
1129
|
+
.TP
|
|
1130
|
+
.B monitor jobs
|
|
1131
|
+
Inspect a monitor's jobs and their per\-region runs.
|
|
1132
|
+
.TP
|
|
1133
|
+
.B monitor runs
|
|
1134
|
+
Inspect a monitor run's attempts.
|
|
1135
|
+
.TP
|
|
1136
|
+
.B monitor list
|
|
1137
|
+
List the monitors visible to you.
|
|
1138
|
+
.TP
|
|
1139
|
+
.B monitor get
|
|
1140
|
+
Show a monitor's configuration.
|
|
1141
|
+
.TP
|
|
1142
|
+
.B monitor pause
|
|
1143
|
+
Pause a monitor, so it stops firing on schedule.
|
|
1144
|
+
.TP
|
|
1145
|
+
.B monitor resume
|
|
1146
|
+
Resume a paused monitor, so it fires on schedule again.
|
|
936
1147
|
|
|
937
1148
|
.SS "monitor run"
|
|
938
1149
|
Invoke a monitor run and display results.
|
|
@@ -942,11 +1153,414 @@ Invoke a monitor run and display results.
|
|
|
942
1153
|
|
|
943
1154
|
.B Options:
|
|
944
1155
|
.TP
|
|
1156
|
+
.B \-\-api\-key <key>
|
|
1157
|
+
Postman API key (defaults to the `postman login` session)
|
|
1158
|
+
.TP
|
|
945
1159
|
.B \-x, \-\-suppress\-exit\-code
|
|
946
1160
|
Specify whether or not to override the default exit code for the current run
|
|
947
1161
|
.TP
|
|
948
1162
|
.B \-t, \-\-timeout <ms>
|
|
949
1163
|
Maximum wait time for run completion in milliseconds (default: 15 minutes) (default: 900000)
|
|
1164
|
+
.TP
|
|
1165
|
+
.B \-\-async
|
|
1166
|
+
Submit the run and return immediately with its job id and Postman URL, without waiting for completion
|
|
1167
|
+
.TP
|
|
1168
|
+
.B \-\-json
|
|
1169
|
+
Output the run's verdict as JSON instead of a table, printing nothing else
|
|
1170
|
+
|
|
1171
|
+
.SS "monitor create"
|
|
1172
|
+
Create a collection\-based monitor.
|
|
1173
|
+
|
|
1174
|
+
.B Usage:
|
|
1175
|
+
[options]
|
|
1176
|
+
|
|
1177
|
+
.B Options:
|
|
1178
|
+
.TP
|
|
1179
|
+
.B \-c, \-\-collection <id>
|
|
1180
|
+
Collection to monitor \-\- accepts the id shown in the Postman app, prefixed or bare
|
|
1181
|
+
.TP
|
|
1182
|
+
.B \-\-name <name>
|
|
1183
|
+
Monitor name (defaults to the linked collection's own name)
|
|
1184
|
+
.TP
|
|
1185
|
+
.B \-\-environment <id>
|
|
1186
|
+
Environment to run the monitored collection with
|
|
1187
|
+
.TP
|
|
1188
|
+
.B \-w, \-\-workspace <id>
|
|
1189
|
+
Workspace to create the monitor in (defaults to the workspace named in the local .postman/resources.yaml manifest; required if neither is available)
|
|
1190
|
+
.TP
|
|
1191
|
+
.B \-\-schedule <cron>
|
|
1192
|
+
Cron expression for the monitor's schedule
|
|
1193
|
+
.TP
|
|
1194
|
+
.B \-\-timezone <tz>
|
|
1195
|
+
Time zone for \-\-schedule, e.g. America/New_York (defaults to the host machine's own zone)
|
|
1196
|
+
.TP
|
|
1197
|
+
.B \-\-runner <value>
|
|
1198
|
+
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: )
|
|
1199
|
+
.TP
|
|
1200
|
+
.B \-\-notify\-email <email>
|
|
1201
|
+
Email to notify on a run failure or error (repeatable) (default: )
|
|
1202
|
+
.TP
|
|
1203
|
+
.B \-\-notification\-limit <n>
|
|
1204
|
+
Cap consecutive notifications before they are muted (service range: 1\-99)
|
|
1205
|
+
.TP
|
|
1206
|
+
.B \-\-retry <n>
|
|
1207
|
+
Retries on a failed run (service caps this at 2)
|
|
1208
|
+
.TP
|
|
1209
|
+
.B \-\-timeout <ms>
|
|
1210
|
+
Request timeout in milliseconds
|
|
1211
|
+
.TP
|
|
1212
|
+
.B \-\-delay <ms>
|
|
1213
|
+
Delay between requests in milliseconds
|
|
1214
|
+
.TP
|
|
1215
|
+
.B \-\-strict\-ssl
|
|
1216
|
+
Fail the run when the target's TLS certificate cannot be verified
|
|
1217
|
+
.TP
|
|
1218
|
+
.B \-\-insecure
|
|
1219
|
+
Skip TLS certificate verification for the monitored target
|
|
1220
|
+
.TP
|
|
1221
|
+
.B \-\-follow\-redirects
|
|
1222
|
+
Follow HTTP redirects during the run
|
|
1223
|
+
.TP
|
|
1224
|
+
.B \-\-block\-redirects
|
|
1225
|
+
Do not follow HTTP redirects during the run
|
|
1226
|
+
.TP
|
|
1227
|
+
.B \-\-dataset\-id <id>
|
|
1228
|
+
Dataset to use as iteration data (used together with \-\-dataset\-view\-id)
|
|
1229
|
+
.TP
|
|
1230
|
+
.B \-\-dataset\-view\-id <id>
|
|
1231
|
+
Dataset view to iterate (used together with \-\-dataset\-id)
|
|
1232
|
+
.TP
|
|
1233
|
+
.B \-\-iteration\-count <n>
|
|
1234
|
+
Number of iterations to run
|
|
1235
|
+
.TP
|
|
1236
|
+
.B \-\-iteration\-strategy <strategy>
|
|
1237
|
+
How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires \-\-iteration\-count, \-\-dataset\-id and \-\-dataset\-view\-id)
|
|
1238
|
+
.TP
|
|
1239
|
+
.B \-\-no\-run\-now
|
|
1240
|
+
Do not trigger an immediate run after creating the monitor
|
|
1241
|
+
.TP
|
|
1242
|
+
.B \-\-api\-key <key>
|
|
1243
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1244
|
+
.TP
|
|
1245
|
+
.B \-\-json
|
|
1246
|
+
Output as JSON instead of a table
|
|
1247
|
+
|
|
1248
|
+
.TP Examples:
|
|
1249
|
+
|
|
1250
|
+
Examples:
|
|
1251
|
+
postman monitor create \-\-collection 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1252
|
+
postman monitor create \-\-collection <id> \-\-schedule "0 9 * * MON" \-\-timezone America/New_York
|
|
1253
|
+
postman monitor create \-\-collection <id> \-\-runner us\-east \-\-runner <self\-hosted\-runner\-id>
|
|
1254
|
+
postman monitor create \-\-collection <id> \-\-workspace 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
.SS "monitor update"
|
|
1259
|
+
Update a monitor's schedule, runner, notifications or run options.
|
|
1260
|
+
|
|
1261
|
+
.B Usage:
|
|
1262
|
+
[options] <monitorId>
|
|
1263
|
+
|
|
1264
|
+
.B Options:
|
|
1265
|
+
.TP
|
|
1266
|
+
.B \-\-name <name>
|
|
1267
|
+
New monitor name
|
|
1268
|
+
.TP
|
|
1269
|
+
.B \-\-schedule <cron>
|
|
1270
|
+
New cron expression for the monitor's schedule
|
|
1271
|
+
.TP
|
|
1272
|
+
.B \-\-timezone <tz>
|
|
1273
|
+
Time zone for \-\-schedule, e.g. America/New_York (defaults to the host machine's own zone)
|
|
1274
|
+
.TP
|
|
1275
|
+
.B \-\-runner <value>
|
|
1276
|
+
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: )
|
|
1277
|
+
.TP
|
|
1278
|
+
.B \-\-notify\-email <email>
|
|
1279
|
+
Email to notify on a run failure or error (repeatable; replaces the current list) (default: )
|
|
1280
|
+
.TP
|
|
1281
|
+
.B \-\-clear\-notifications
|
|
1282
|
+
Remove every notification recipient
|
|
1283
|
+
.TP
|
|
1284
|
+
.B \-\-notification\-limit <n>
|
|
1285
|
+
Cap consecutive notifications before they are muted (service range: 1\-99)
|
|
1286
|
+
.TP
|
|
1287
|
+
.B \-\-retry <n>
|
|
1288
|
+
Retries on a failed run (service caps this at 2)
|
|
1289
|
+
.TP
|
|
1290
|
+
.B \-\-timeout <ms>
|
|
1291
|
+
Request timeout in milliseconds
|
|
1292
|
+
.TP
|
|
1293
|
+
.B \-\-delay <ms>
|
|
1294
|
+
Delay between requests in milliseconds
|
|
1295
|
+
.TP
|
|
1296
|
+
.B \-\-strict\-ssl
|
|
1297
|
+
Fail the run when the target's TLS certificate cannot be verified
|
|
1298
|
+
.TP
|
|
1299
|
+
.B \-\-insecure
|
|
1300
|
+
Skip TLS certificate verification for the monitored target
|
|
1301
|
+
.TP
|
|
1302
|
+
.B \-\-follow\-redirects
|
|
1303
|
+
Follow HTTP redirects during the run
|
|
1304
|
+
.TP
|
|
1305
|
+
.B \-\-block\-redirects
|
|
1306
|
+
Do not follow HTTP redirects during the run
|
|
1307
|
+
.TP
|
|
1308
|
+
.B \-\-dataset\-id <id>
|
|
1309
|
+
Dataset to use as iteration data (used together with \-\-dataset\-view\-id)
|
|
1310
|
+
.TP
|
|
1311
|
+
.B \-\-dataset\-view\-id <id>
|
|
1312
|
+
Dataset view to iterate (used together with \-\-dataset\-id)
|
|
1313
|
+
.TP
|
|
1314
|
+
.B \-\-iteration\-count <n>
|
|
1315
|
+
Number of iterations to run
|
|
1316
|
+
.TP
|
|
1317
|
+
.B \-\-iteration\-strategy <strategy>
|
|
1318
|
+
How iteration data is consumed, e.g. round_robin, repeat_last, stop_at_end (requires \-\-iteration\-count, \-\-dataset\-id and \-\-dataset\-view\-id)
|
|
1319
|
+
.TP
|
|
1320
|
+
.B \-\-api\-key <key>
|
|
1321
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1322
|
+
.TP
|
|
1323
|
+
.B \-\-json
|
|
1324
|
+
Output as JSON instead of a table
|
|
1325
|
+
|
|
1326
|
+
.TP Examples:
|
|
1327
|
+
|
|
1328
|
+
Examples:
|
|
1329
|
+
postman monitor update <id> \-\-schedule "0 */6 * * *" \-\-timezone UTC
|
|
1330
|
+
postman monitor update <id> \-\-notify\-email a@example.com \-\-notify\-email b@example.com
|
|
1331
|
+
postman monitor update <id> \-\-clear\-notifications
|
|
1332
|
+
postman monitor update <id> \-\-runner us\-east \-\-runner <self\-hosted\-runner\-id>
|
|
1333
|
+
|
|
1334
|
+
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.
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
.SS "monitor delete"
|
|
1338
|
+
Permanently delete a monitor. Prompts for confirmation unless \-\-yes is passed.
|
|
1339
|
+
|
|
1340
|
+
.B Usage:
|
|
1341
|
+
[options] <monitorId>
|
|
1342
|
+
|
|
1343
|
+
.B Options:
|
|
1344
|
+
.TP
|
|
1345
|
+
.B \-y, \-\-yes
|
|
1346
|
+
Skip the confirmation prompt
|
|
1347
|
+
.TP
|
|
1348
|
+
.B \-\-api\-key <key>
|
|
1349
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1350
|
+
.TP
|
|
1351
|
+
.B \-\-json
|
|
1352
|
+
Output the outcome, including any failure, as JSON instead of a plain message
|
|
1353
|
+
|
|
1354
|
+
.TP Examples:
|
|
1355
|
+
|
|
1356
|
+
Examples:
|
|
1357
|
+
postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1358
|
+
postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-yes
|
|
1359
|
+
postman monitor delete 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-yes \-\-json
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
.SS "monitor jobs"
|
|
1364
|
+
Inspect a monitor's jobs and their per\-region runs.
|
|
1365
|
+
|
|
1366
|
+
.B Usage:
|
|
1367
|
+
[options] [command]
|
|
1368
|
+
|
|
1369
|
+
.B Subcommands:
|
|
1370
|
+
.TP
|
|
1371
|
+
.B monitor jobs list
|
|
1372
|
+
List a monitor's recent jobs.
|
|
1373
|
+
.TP
|
|
1374
|
+
.B monitor jobs get
|
|
1375
|
+
Report one job's terminal state and its per\-region run outcomes.
|
|
1376
|
+
|
|
1377
|
+
.SS "monitor jobs list"
|
|
1378
|
+
List a monitor's recent jobs.
|
|
1379
|
+
|
|
1380
|
+
.B Usage:
|
|
1381
|
+
[options] <monitorId>
|
|
1382
|
+
|
|
1383
|
+
.B Options:
|
|
1384
|
+
.TP
|
|
1385
|
+
.B \-\-api\-key <key>
|
|
1386
|
+
Postman API key (defaults to the `postman login` session)
|
|
1387
|
+
.TP
|
|
1388
|
+
.B \-\-result <value>
|
|
1389
|
+
Filter by outcome, e.g. success, failure, error, abort (server\-validated, not a fixed list)
|
|
1390
|
+
.TP
|
|
1391
|
+
.B \-\-trigger <value>
|
|
1392
|
+
Filter by trigger, e.g. api, schedule, webhook, postman\-cli (server\-validated, not a fixed list)
|
|
1393
|
+
.TP
|
|
1394
|
+
.B \-\-since <dateTime>
|
|
1395
|
+
Only jobs that finished at or after this ISO 8601 date\-time
|
|
1396
|
+
.TP
|
|
1397
|
+
.B \-\-limit <n>
|
|
1398
|
+
Maximum number of jobs to return
|
|
1399
|
+
.TP
|
|
1400
|
+
.B \-\-cursor <token>
|
|
1401
|
+
Opaque pagination cursor
|
|
1402
|
+
.TP
|
|
1403
|
+
.B \-\-json
|
|
1404
|
+
Output as JSON instead of a table
|
|
1405
|
+
|
|
1406
|
+
.SS "monitor jobs get"
|
|
1407
|
+
Report one job's terminal state and its per\-region run outcomes.
|
|
1408
|
+
|
|
1409
|
+
.B Usage:
|
|
1410
|
+
[options] <jobId>
|
|
1411
|
+
|
|
1412
|
+
.B Options:
|
|
1413
|
+
.TP
|
|
1414
|
+
.B \-\-api\-key <key>
|
|
1415
|
+
Postman API key (defaults to the `postman login` session)
|
|
1416
|
+
.TP
|
|
1417
|
+
.B \-\-json
|
|
1418
|
+
Output as JSON instead of a table
|
|
1419
|
+
|
|
1420
|
+
.SS "monitor runs"
|
|
1421
|
+
Inspect a monitor run's attempts.
|
|
1422
|
+
|
|
1423
|
+
.B Usage:
|
|
1424
|
+
[options] [command]
|
|
1425
|
+
|
|
1426
|
+
.B Subcommands:
|
|
1427
|
+
.TP
|
|
1428
|
+
.B monitor runs get
|
|
1429
|
+
Report which test assertions ran during one attempt of a run, which failed, and why.
|
|
1430
|
+
|
|
1431
|
+
.SS "monitor runs get"
|
|
1432
|
+
Report which test assertions ran during one attempt of a run, which failed, and why.
|
|
1433
|
+
|
|
1434
|
+
.B Usage:
|
|
1435
|
+
[options] <runId>
|
|
1436
|
+
|
|
1437
|
+
.B Options:
|
|
1438
|
+
.TP
|
|
1439
|
+
.B \-\-api\-key <key>
|
|
1440
|
+
Postman API key (defaults to the `postman login` session)
|
|
1441
|
+
.TP
|
|
1442
|
+
.B \-\-attempt <n>
|
|
1443
|
+
Which attempt of the run to show, counting from 0 (default: the latest)
|
|
1444
|
+
.TP
|
|
1445
|
+
.B \-\-failed\-only
|
|
1446
|
+
Show only failed assertions
|
|
1447
|
+
.TP
|
|
1448
|
+
.B \-\-json
|
|
1449
|
+
Output as JSON instead of a table
|
|
1450
|
+
|
|
1451
|
+
.SS "monitor list"
|
|
1452
|
+
List the monitors visible to you.
|
|
1453
|
+
|
|
1454
|
+
.B Usage:
|
|
1455
|
+
[options]
|
|
1456
|
+
|
|
1457
|
+
.B Options:
|
|
1458
|
+
.TP
|
|
1459
|
+
.B \-\-api\-key <key>
|
|
1460
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1461
|
+
.TP
|
|
1462
|
+
.B \-w, \-\-workspace <id>
|
|
1463
|
+
Filter to monitors in this workspace
|
|
1464
|
+
.TP
|
|
1465
|
+
.B \-c, \-\-collection <id>
|
|
1466
|
+
Filter to monitors on this collection
|
|
1467
|
+
.TP
|
|
1468
|
+
.B \-\-environment <id>
|
|
1469
|
+
Filter to monitors on this environment
|
|
1470
|
+
.TP
|
|
1471
|
+
.B \-\-runner <id>
|
|
1472
|
+
Filter to a Self\-Hosted Runner ID (not a Postman Region). Cannot be combined with \-\-workspace, \-\-collection, \-\-environment, \-\-owner, \-\-team or \-\-active.
|
|
1473
|
+
.TP
|
|
1474
|
+
.B \-\-owner <id>
|
|
1475
|
+
Filter to monitors created by this user id (shown in the Owner column)
|
|
1476
|
+
.TP
|
|
1477
|
+
.B \-\-team
|
|
1478
|
+
Filter to monitors owned by your own team
|
|
1479
|
+
.TP
|
|
1480
|
+
.B \-\-active <true|false>
|
|
1481
|
+
Filter by active state
|
|
1482
|
+
.TP
|
|
1483
|
+
.B \-\-limit <n>
|
|
1484
|
+
Max monitors to return. The service caps page size and rejects a value above it with its own error.
|
|
1485
|
+
.TP
|
|
1486
|
+
.B \-\-offset <n>
|
|
1487
|
+
Not supported: the service accepts this parameter and silently ignores it. Refused locally. Use \-\-cursor instead.
|
|
1488
|
+
.TP
|
|
1489
|
+
.B \-\-cursor <token>
|
|
1490
|
+
Pagination cursor from a previous page's response.
|
|
1491
|
+
.TP
|
|
1492
|
+
.B \-\-columns <names>
|
|
1493
|
+
Comma\-separated columns to show. Defaults to Name, Status, ID, Schedule, Owner, Collection. Also available: State, Notifications, Environment, Runners.
|
|
1494
|
+
.TP
|
|
1495
|
+
.B \-\-no\-headers
|
|
1496
|
+
Omit the header row
|
|
1497
|
+
.TP
|
|
1498
|
+
.B \-f, \-\-filter <text>
|
|
1499
|
+
Show only monitors whose name contains this text (applies to the returned page, case\-insensitive)
|
|
1500
|
+
.TP
|
|
1501
|
+
.B \-\-sort <field>
|
|
1502
|
+
Sort the returned page by "name" or "active"
|
|
1503
|
+
.TP
|
|
1504
|
+
.B \-\-json
|
|
1505
|
+
Output as JSON instead of a table
|
|
1506
|
+
|
|
1507
|
+
.TP Examples:
|
|
1508
|
+
|
|
1509
|
+
Eg. postman monitor list
|
|
1510
|
+
postman monitor list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1511
|
+
postman monitor list \-\-active true \-\-sort name
|
|
1512
|
+
postman monitor list \-\-runner 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1513
|
+
postman monitor list \-\-columns Name,State \-\-no\-headers
|
|
1514
|
+
postman monitor list \-\-json
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
.SS "monitor get"
|
|
1518
|
+
Show a monitor's configuration.
|
|
1519
|
+
|
|
1520
|
+
.B Usage:
|
|
1521
|
+
[options] <monitorId>
|
|
1522
|
+
|
|
1523
|
+
.B Options:
|
|
1524
|
+
.TP
|
|
1525
|
+
.B \-\-api\-key <key>
|
|
1526
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1527
|
+
.TP
|
|
1528
|
+
.B \-\-json
|
|
1529
|
+
Output as JSON instead of a table
|
|
1530
|
+
|
|
1531
|
+
.TP Examples:
|
|
1532
|
+
|
|
1533
|
+
Eg. postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
1534
|
+
postman monitor get 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
.SS "monitor pause"
|
|
1538
|
+
Pause a monitor, so it stops firing on schedule.
|
|
1539
|
+
|
|
1540
|
+
.B Usage:
|
|
1541
|
+
[options] <monitorId>
|
|
1542
|
+
|
|
1543
|
+
.B Options:
|
|
1544
|
+
.TP
|
|
1545
|
+
.B \-\-api\-key <key>
|
|
1546
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1547
|
+
.TP
|
|
1548
|
+
.B \-\-json
|
|
1549
|
+
Output as JSON instead of a table
|
|
1550
|
+
|
|
1551
|
+
.SS "monitor resume"
|
|
1552
|
+
Resume a paused monitor, so it fires on schedule again.
|
|
1553
|
+
|
|
1554
|
+
.B Usage:
|
|
1555
|
+
[options] <monitorId>
|
|
1556
|
+
|
|
1557
|
+
.B Options:
|
|
1558
|
+
.TP
|
|
1559
|
+
.B \-\-api\-key <key>
|
|
1560
|
+
Postman API key (defaults to POSTMAN_API_KEY, then the `postman login` session)
|
|
1561
|
+
.TP
|
|
1562
|
+
.B \-\-json
|
|
1563
|
+
Output as JSON instead of a table
|
|
950
1564
|
|
|
951
1565
|
.SS "workspace"
|
|
952
1566
|
Manage workspace resources.
|
|
@@ -2279,7 +2893,7 @@ Examples:
|
|
|
2279
2893
|
|
|
2280
2894
|
|
|
2281
2895
|
.SS "mock"
|
|
2282
|
-
|
|
2896
|
+
Create, run, and manage Postman mocks — in your repository or in Postman cloud.
|
|
2283
2897
|
|
|
2284
2898
|
.B Usage:
|
|
2285
2899
|
[options] [command]
|
|
@@ -2287,28 +2901,31 @@ Run and manage Postman mocks, locally and in the cloud.
|
|
|
2287
2901
|
.B Subcommands:
|
|
2288
2902
|
.TP
|
|
2289
2903
|
.B mock generate
|
|
2290
|
-
Generate a
|
|
2904
|
+
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
2905
|
.TP
|
|
2292
2906
|
.B mock run
|
|
2293
|
-
Start a
|
|
2907
|
+
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).
|
|
2908
|
+
.TP
|
|
2909
|
+
.B mock push
|
|
2910
|
+
Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).
|
|
2294
2911
|
.TP
|
|
2295
2912
|
.B mock deploy
|
|
2296
|
-
|
|
2913
|
+
Turn a mock in Postman cloud into a live mock server others can call over the internet.
|
|
2297
2914
|
.TP
|
|
2298
2915
|
.B mock get
|
|
2299
|
-
Show a mock's details
|
|
2916
|
+
Show a mock's details using its path if it lives in your repository, or its id if it lives in Postman cloud.
|
|
2300
2917
|
.TP
|
|
2301
2918
|
.B mock list
|
|
2302
|
-
List
|
|
2919
|
+
List the mocks in your Postman cloud workspace, or — with a folder path — the mocks in that folder in your repository.
|
|
2303
2920
|
.TP
|
|
2304
2921
|
.B mock log
|
|
2305
|
-
|
|
2922
|
+
Show the requests a live mock server has received and the responses it sent, using its id.
|
|
2306
2923
|
.TP
|
|
2307
2924
|
.B mock delete
|
|
2308
|
-
|
|
2925
|
+
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
2926
|
|
|
2310
2927
|
.SS "mock generate"
|
|
2311
|
-
Generate a
|
|
2928
|
+
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
2929
|
|
|
2313
2930
|
.B Usage:
|
|
2314
2931
|
[sourcePath] [options]
|
|
@@ -2316,25 +2933,25 @@ Generate a runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git\
|
|
|
2316
2933
|
.B Options:
|
|
2317
2934
|
.TP
|
|
2318
2935
|
.B \-o, \-\-output <dir>
|
|
2319
|
-
|
|
2936
|
+
Folder to save the mock in. Relative or absolute, e.g. ./postman/mocks/orders. Defaults to postman/mocks/<name>.
|
|
2320
2937
|
.TP
|
|
2321
2938
|
.B \-n, \-\-name <name>
|
|
2322
|
-
|
|
2939
|
+
Name for the mock. Taken from the source when you provide one; required for the sample.
|
|
2323
2940
|
.TP
|
|
2324
2941
|
.B \-\-port <port>
|
|
2325
|
-
Port the mock
|
|
2942
|
+
Port the mock runs on (e.g. 4010) (default: 4500)
|
|
2326
2943
|
.TP
|
|
2327
2944
|
.B \-\-force
|
|
2328
|
-
Overwrite the
|
|
2945
|
+
Overwrite the mock's files if the target folder already has one
|
|
2329
2946
|
.TP
|
|
2330
2947
|
.B \-u, \-\-update <mockPath>
|
|
2331
|
-
Update an existing mock
|
|
2948
|
+
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
2949
|
.TP
|
|
2333
2950
|
.B \-w, \-\-workspace <id>
|
|
2334
|
-
|
|
2951
|
+
Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with \-\-output, \-\-force, or \-\-update.
|
|
2335
2952
|
.TP
|
|
2336
2953
|
.B \-\-api\-key <key>
|
|
2337
|
-
Postman API key
|
|
2954
|
+
Postman API key to use with \-\-workspace (defaults to your `postman login` session)
|
|
2338
2955
|
.TP
|
|
2339
2956
|
.B \-x, \-\-suppress\-exit\-code
|
|
2340
2957
|
Always exit with code 0, even on failure
|
|
@@ -2346,11 +2963,13 @@ Eg. postman mock generate ./my\-collection.json
|
|
|
2346
2963
|
postman mock generate \-\-name "My Mock" \-\-port 4010 # sample mock, custom port
|
|
2347
2964
|
postman mock generate ./openapi.yaml \-\-output ./postman/mocks/api \-\-port 4010
|
|
2348
2965
|
postman mock generate ./my\-collection.json \-\-update ./postman/mocks/orders
|
|
2349
|
-
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # cloud
|
|
2966
|
+
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # save to Postman cloud
|
|
2967
|
+
|
|
2968
|
+
Paths can be relative (e.g. ./my\-collection.json) or absolute (e.g. /Users/me/my\-collection.json).
|
|
2350
2969
|
|
|
2351
2970
|
|
|
2352
2971
|
.SS "mock run"
|
|
2353
|
-
Start a
|
|
2972
|
+
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
2973
|
|
|
2355
2974
|
.B Usage:
|
|
2356
2975
|
<mockIdOrPath>
|
|
@@ -2358,29 +2977,54 @@ Start a local mock server from a cloud mock id (fetched and run locally), a mani
|
|
|
2358
2977
|
.B Options:
|
|
2359
2978
|
.TP
|
|
2360
2979
|
.B \-e, \-\-environment <path>
|
|
2361
|
-
Path to
|
|
2980
|
+
Path to a file of environment variables for the mock. Relative or absolute, e.g. ./postman/environments/dev.json
|
|
2362
2981
|
.TP
|
|
2363
2982
|
.B \-g, \-\-globals <path>
|
|
2364
|
-
Path to a
|
|
2983
|
+
Path to a file of global variables for the mock. Relative or absolute, e.g. ./globals.json
|
|
2365
2984
|
.TP
|
|
2366
2985
|
.B \-p, \-\-port <port>
|
|
2367
|
-
|
|
2986
|
+
Port to run on (e.g. 4010), or "auto" for a free one. Defaults to the mock's configured port.
|
|
2368
2987
|
.TP
|
|
2369
2988
|
.B \-\-api\-key <key>
|
|
2370
|
-
Postman API key
|
|
2989
|
+
Postman API key, used with a Postman cloud id (defaults to your `postman login` session)
|
|
2371
2990
|
|
|
2372
2991
|
.TP Examples:
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
postman mock run ./postman/
|
|
2376
|
-
postman mock run ./postman/
|
|
2377
|
-
postman mock run ./
|
|
2378
|
-
postman mock run ./
|
|
2379
|
-
|
|
2992
|
+
|
|
2993
|
+
Eg. postman mock run 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Postman cloud
|
|
2994
|
+
postman mock run ./postman/mocks/orders # by path, from your repository
|
|
2995
|
+
postman mock run ./postman/mocks/orders \-\-environment ./postman/environments/dev.json
|
|
2996
|
+
postman mock run ./postman/mocks/orders \-\-port auto # pick any free port
|
|
2997
|
+
postman mock run ./postman/mocks/orders \-\-port 4600 # use port 4600 (fails if it is in use)
|
|
2998
|
+
|
|
2999
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
3000
|
+
|
|
3001
|
+
|
|
3002
|
+
.SS "mock push"
|
|
3003
|
+
Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).
|
|
3004
|
+
|
|
3005
|
+
.B Usage:
|
|
3006
|
+
<mockPath> [options]
|
|
3007
|
+
|
|
3008
|
+
.B Options:
|
|
3009
|
+
.TP
|
|
3010
|
+
.B \-w, \-\-workspace <id>
|
|
3011
|
+
Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)
|
|
3012
|
+
.TP
|
|
3013
|
+
.B \-\-api\-key <key>
|
|
3014
|
+
Postman API key (defaults to your `postman login` session)
|
|
3015
|
+
|
|
3016
|
+
.TP Examples:
|
|
3017
|
+
|
|
3018
|
+
Eg. postman mock push ./postman/mocks/orders # a mock in your repository
|
|
3019
|
+
postman mock push ./postman/mocks/orders \-w 12345678\-90ab\-cdef\-1234\-567890abcdef
|
|
3020
|
+
|
|
3021
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
3022
|
+
|
|
3023
|
+
After uploading, use `postman mock deploy <id>` to turn it into a live mock server.
|
|
2380
3024
|
|
|
2381
3025
|
|
|
2382
3026
|
.SS "mock deploy"
|
|
2383
|
-
|
|
3027
|
+
Turn a mock in Postman cloud into a live mock server others can call over the internet.
|
|
2384
3028
|
|
|
2385
3029
|
.B Usage:
|
|
2386
3030
|
<mockId> [options]
|
|
@@ -2388,38 +3032,40 @@ Deploy a cloud mock into a mock server.
|
|
|
2388
3032
|
.B Options:
|
|
2389
3033
|
.TP
|
|
2390
3034
|
.B \-w, \-\-workspace <id>
|
|
2391
|
-
|
|
3035
|
+
Postman cloud workspace that will own the server, by id (defaults to the workspace already linked to this project)
|
|
2392
3036
|
.TP
|
|
2393
3037
|
.B \-n, \-\-name <name>
|
|
2394
|
-
|
|
3038
|
+
Name for the mock server (you are asked for one if you skip this)
|
|
2395
3039
|
.TP
|
|
2396
3040
|
.B \-s, \-\-slug <slug>
|
|
2397
|
-
|
|
3041
|
+
Short label used in the server's web address, e.g. "my\-mock" (you are asked for one if you skip this)
|
|
2398
3042
|
.TP
|
|
2399
3043
|
.B \-\-public
|
|
2400
|
-
|
|
3044
|
+
Let anyone with the link reach the server. Private by default (callers must send a Postman API key).
|
|
2401
3045
|
.TP
|
|
2402
3046
|
.B \-\-auto\-deploy
|
|
2403
|
-
|
|
3047
|
+
Update the live server automatically whenever the mock changes (off by default)
|
|
2404
3048
|
.TP
|
|
2405
3049
|
.B \-y, \-\-yes
|
|
2406
|
-
|
|
3050
|
+
Use the defaults and skip all questions (private, no auto\-deploy)
|
|
2407
3051
|
.TP
|
|
2408
3052
|
.B \-\-api\-key <key>
|
|
2409
|
-
Postman API key (defaults to
|
|
3053
|
+
Postman API key (defaults to your `postman login` session)
|
|
2410
3054
|
|
|
2411
3055
|
.TP Examples:
|
|
2412
3056
|
|
|
2413
|
-
|
|
3057
|
+
mockId is the id of a mock in Postman cloud (find it with `postman mock list`).
|
|
3058
|
+
|
|
3059
|
+
Eg. postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef # asks a few questions
|
|
2414
3060
|
postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-mock \-\-public
|
|
2415
3061
|
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 #
|
|
3062
|
+
postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-mock \-y # no questions asked
|
|
2417
3063
|
|
|
2418
|
-
|
|
3064
|
+
Don't have the mock in Postman cloud yet? Upload it first with `postman mock push`.
|
|
2419
3065
|
|
|
2420
3066
|
|
|
2421
3067
|
.SS "mock get"
|
|
2422
|
-
Show a mock's details
|
|
3068
|
+
Show a mock's details using its path if it lives in your repository, or its id if it lives in Postman cloud.
|
|
2423
3069
|
|
|
2424
3070
|
.B Usage:
|
|
2425
3071
|
<mockIdOrPath> [options]
|
|
@@ -2427,20 +3073,22 @@ Show a mock's details: a cloud mock by id, or a local mock by path.
|
|
|
2427
3073
|
.B Options:
|
|
2428
3074
|
.TP
|
|
2429
3075
|
.B \-\-api\-key <key>
|
|
2430
|
-
Postman API key (defaults to
|
|
3076
|
+
Postman API key (defaults to your `postman login` session)
|
|
2431
3077
|
.TP
|
|
2432
3078
|
.B \-\-json
|
|
2433
|
-
|
|
3079
|
+
Print the details as machine\-readable data instead of a table
|
|
2434
3080
|
|
|
2435
3081
|
.TP Examples:
|
|
2436
3082
|
|
|
2437
|
-
Eg. postman mock get 12345678\-90ab\-cdef\-1234\-567890abcdef #
|
|
2438
|
-
postman mock get ./postman/mocks/orders #
|
|
3083
|
+
Eg. postman mock get 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Postman cloud
|
|
3084
|
+
postman mock get ./postman/mocks/orders # by path, from your repository
|
|
2439
3085
|
postman mock get ./postman/mocks/orders \-\-json
|
|
2440
3086
|
|
|
3087
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
3088
|
+
|
|
2441
3089
|
|
|
2442
3090
|
.SS "mock list"
|
|
2443
|
-
List
|
|
3091
|
+
List the mocks in your Postman cloud workspace, or — with a folder path — the mocks in that folder in your repository.
|
|
2444
3092
|
|
|
2445
3093
|
.B Usage:
|
|
2446
3094
|
[pathOrDir] [options]
|
|
@@ -2448,24 +3096,26 @@ List a workspace's cloud mocks, or (with a path) local mocks under a directory.
|
|
|
2448
3096
|
.B Options:
|
|
2449
3097
|
.TP
|
|
2450
3098
|
.B \-w, \-\-workspace <id>
|
|
2451
|
-
|
|
3099
|
+
Postman cloud workspace whose mocks to list, by id (defaults to the workspace already linked to this project)
|
|
2452
3100
|
.TP
|
|
2453
3101
|
.B \-\-api\-key <key>
|
|
2454
|
-
Postman API key (defaults to
|
|
3102
|
+
Postman API key (defaults to your `postman login` session)
|
|
2455
3103
|
.TP
|
|
2456
3104
|
.B \-\-json
|
|
2457
|
-
|
|
3105
|
+
Print the list as machine\-readable data instead of a table
|
|
2458
3106
|
|
|
2459
3107
|
.TP Examples:
|
|
2460
3108
|
|
|
2461
|
-
Eg. postman mock list
|
|
2462
|
-
postman mock list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef #
|
|
2463
|
-
postman mock list ./postman/mocks #
|
|
3109
|
+
Eg. postman mock list # your Postman cloud workspace
|
|
3110
|
+
postman mock list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # a specific workspace
|
|
3111
|
+
postman mock list ./postman/mocks # a folder in your repository
|
|
2464
3112
|
postman mock list ./postman/mocks \-\-json
|
|
2465
3113
|
|
|
3114
|
+
The folder path can be relative (e.g. ./postman/mocks) or absolute (e.g. /Users/me/postman/mocks).
|
|
3115
|
+
|
|
2466
3116
|
|
|
2467
3117
|
.SS "mock log"
|
|
2468
|
-
|
|
3118
|
+
Show the requests a live mock server has received and the responses it sent, using its id.
|
|
2469
3119
|
|
|
2470
3120
|
.B Usage:
|
|
2471
3121
|
<mockServerId> [options]
|
|
@@ -2473,40 +3123,42 @@ Browse a deployed mock server's request/response logs by its id (see `mock get`)
|
|
|
2473
3123
|
.B Options:
|
|
2474
3124
|
.TP
|
|
2475
3125
|
.B \-\-limit <n>
|
|
2476
|
-
|
|
3126
|
+
Most entries to show (defaults to 50 when printing machine\-readable output)
|
|
2477
3127
|
.TP
|
|
2478
3128
|
.B \-\-method <method>
|
|
2479
|
-
|
|
3129
|
+
Show only requests of this type (e.g. GET, POST)
|
|
2480
3130
|
.TP
|
|
2481
3131
|
.B \-\-status <code|range>
|
|
2482
|
-
|
|
3132
|
+
Show only these response codes (e.g. 404, or 5xx for any 500\-series)
|
|
2483
3133
|
.TP
|
|
2484
3134
|
.B \-\-path <pattern>
|
|
2485
|
-
|
|
3135
|
+
Show only requests to matching addresses (use * and ? as wildcards, e.g. /users/*)
|
|
2486
3136
|
.TP
|
|
2487
3137
|
.B \-\-since <duration>
|
|
2488
|
-
Show
|
|
3138
|
+
Show entries from this long ago until now (e.g. 2h = the last 2 hours)
|
|
2489
3139
|
.TP
|
|
2490
3140
|
.B \-\-until <duration>
|
|
2491
|
-
|
|
3141
|
+
Hide entries newer than this (e.g. 30m = skip the most recent 30 minutes)
|
|
2492
3142
|
.TP
|
|
2493
3143
|
.B \-\-api\-key <key>
|
|
2494
|
-
Postman API key (defaults to
|
|
3144
|
+
Postman API key (defaults to your `postman login` session)
|
|
2495
3145
|
.TP
|
|
2496
3146
|
.B \-\-json
|
|
2497
|
-
|
|
3147
|
+
Print entries as machine\-readable data instead of the scrollable view
|
|
2498
3148
|
|
|
2499
3149
|
.TP Examples:
|
|
2500
3150
|
|
|
2501
|
-
|
|
2502
|
-
|
|
3151
|
+
mockServerId is the id of a live mock server (get it from `postman mock deploy` or `postman mock get`).
|
|
3152
|
+
|
|
3153
|
+
Eg. postman mock log 12345678\-90ab\-cdef\-1234\-567890abcdef # scroll through entries
|
|
3154
|
+
postman mock log 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json # machine\-readable output
|
|
2503
3155
|
postman mock log <mockServerId> \-\-method GET \-\-path '/users/*'
|
|
2504
3156
|
postman mock log <mockServerId> \-\-status 5xx \-\-limit 50
|
|
2505
3157
|
postman mock log <mockServerId> \-\-since 7h \-\-until 2h # between 7h and 2h ago
|
|
2506
3158
|
|
|
2507
3159
|
|
|
2508
3160
|
.SS "mock delete"
|
|
2509
|
-
|
|
3161
|
+
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
3162
|
|
|
2511
3163
|
.B Usage:
|
|
2512
3164
|
<mockIdOrPath> [options]
|
|
@@ -2514,17 +3166,18 @@ Permanently remove a mock: a cloud mock by id, or a local mock artifact by path.
|
|
|
2514
3166
|
.B Options:
|
|
2515
3167
|
.TP
|
|
2516
3168
|
.B \-y, \-\-yes
|
|
2517
|
-
|
|
3169
|
+
Delete without asking for confirmation first
|
|
2518
3170
|
.TP
|
|
2519
3171
|
.B \-\-api\-key <key>
|
|
2520
|
-
Postman API key
|
|
3172
|
+
Postman API key, used with a Postman cloud id (defaults to your `postman login` session)
|
|
2521
3173
|
|
|
2522
3174
|
.TP Examples:
|
|
2523
3175
|
|
|
2524
|
-
Eg. postman mock delete 12345678\-90ab\-cdef\-1234\-567890abcdef #
|
|
2525
|
-
postman mock delete ./postman/mocks/orders #
|
|
3176
|
+
Eg. postman mock delete 12345678\-90ab\-cdef\-1234\-567890abcdef # by id, from Postman cloud
|
|
3177
|
+
postman mock delete ./postman/mocks/orders # by path, from your repository
|
|
2526
3178
|
postman mock delete ./postman/mocks/orders \-\-yes
|
|
2527
|
-
|
|
3179
|
+
|
|
3180
|
+
Paths can be relative (e.g. ./postman/mocks/orders) or absolute (e.g. /Users/me/postman/mocks/orders).
|
|
2528
3181
|
|
|
2529
3182
|
|
|
2530
3183
|
.SS "application"
|
|
@@ -4505,6 +5158,15 @@ Manage workspace dependencies (Postman entities reused from other workspaces).
|
|
|
4505
5158
|
.TP
|
|
4506
5159
|
.B dependency add
|
|
4507
5160
|
Add a Postman collection, environment, or mock as a workspace dependency.
|
|
5161
|
+
.TP
|
|
5162
|
+
.B dependency list
|
|
5163
|
+
List the workspace dependencies declared in .postman/resources.yaml.
|
|
5164
|
+
.TP
|
|
5165
|
+
.B dependency install
|
|
5166
|
+
Materialise the dependencies declared in .postman/resources.yaml (all, or one).
|
|
5167
|
+
.TP
|
|
5168
|
+
.B dependency update
|
|
5169
|
+
Refresh declared dependencies to the latest content from their source (all, or one).
|
|
4508
5170
|
|
|
4509
5171
|
.SS "dependency add"
|
|
4510
5172
|
Add a Postman collection, environment, or mock as a workspace dependency.
|
|
@@ -4532,6 +5194,83 @@ Examples:
|
|
|
4532
5194
|
|
|
4533
5195
|
|
|
4534
5196
|
|
|
5197
|
+
.SS "dependency list"
|
|
5198
|
+
List the workspace dependencies declared in .postman/resources.yaml.
|
|
5199
|
+
|
|
5200
|
+
.B Usage:
|
|
5201
|
+
[options]
|
|
5202
|
+
|
|
5203
|
+
.B Options:
|
|
5204
|
+
.TP
|
|
5205
|
+
.B \-\-type <type>
|
|
5206
|
+
Only list dependencies of this type (collection, environment, or mock).
|
|
5207
|
+
.TP
|
|
5208
|
+
.B \-\-json
|
|
5209
|
+
Output the result as JSON.
|
|
5210
|
+
|
|
5211
|
+
.TP Examples:
|
|
5212
|
+
|
|
5213
|
+
Examples:
|
|
5214
|
+
postman dependency list
|
|
5215
|
+
postman dependency list \-\-type collection
|
|
5216
|
+
postman dependency list \-\-json
|
|
5217
|
+
|
|
5218
|
+
|
|
5219
|
+
|
|
5220
|
+
.SS "dependency install"
|
|
5221
|
+
Materialise the dependencies declared in .postman/resources.yaml (all, or one).
|
|
5222
|
+
|
|
5223
|
+
.B Usage:
|
|
5224
|
+
[options] [nameOrId]
|
|
5225
|
+
|
|
5226
|
+
.B Options:
|
|
5227
|
+
.TP
|
|
5228
|
+
.B \-\-type <type>
|
|
5229
|
+
Only install dependencies of this type (collection, environment, or mock).
|
|
5230
|
+
.TP
|
|
5231
|
+
.B \-\-json
|
|
5232
|
+
Output the result as JSON.
|
|
5233
|
+
|
|
5234
|
+
.TP Examples:
|
|
5235
|
+
|
|
5236
|
+
Install is the `npm install` of a Postman project: the step to run after a clone or in CI.
|
|
5237
|
+
A [nameOrId] is the cloud id, display name, or on\-disk name of a declared
|
|
5238
|
+
dependency (as shown by `postman dependency list`).
|
|
5239
|
+
|
|
5240
|
+
Examples:
|
|
5241
|
+
postman dependency install
|
|
5242
|
+
postman dependency install \-\-type collection
|
|
5243
|
+
postman dependency install Payments
|
|
5244
|
+
|
|
5245
|
+
|
|
5246
|
+
|
|
5247
|
+
.SS "dependency update"
|
|
5248
|
+
Refresh declared dependencies to the latest content from their source (all, or one).
|
|
5249
|
+
|
|
5250
|
+
.B Usage:
|
|
5251
|
+
[options] [nameOrId]
|
|
5252
|
+
|
|
5253
|
+
.B Options:
|
|
5254
|
+
.TP
|
|
5255
|
+
.B \-\-type <type>
|
|
5256
|
+
Only update dependencies of this type (collection, environment, or mock).
|
|
5257
|
+
.TP
|
|
5258
|
+
.B \-\-json
|
|
5259
|
+
Output the result as JSON.
|
|
5260
|
+
|
|
5261
|
+
.TP Examples:
|
|
5262
|
+
|
|
5263
|
+
Update fetches the latest cloud entity for each declared dependency and overwrites its
|
|
5264
|
+
files in place. A [nameOrId] is the cloud id, display name, or on\-disk name of a
|
|
5265
|
+
declared dependency (as shown by `postman dependency list`).
|
|
5266
|
+
|
|
5267
|
+
Examples:
|
|
5268
|
+
postman dependency update
|
|
5269
|
+
postman dependency update \-\-type environment
|
|
5270
|
+
postman dependency update Payments
|
|
5271
|
+
|
|
5272
|
+
|
|
5273
|
+
|
|
4535
5274
|
.SH SEE ALSO
|
|
4536
5275
|
Full documentation: https://learning.postman.com/docs/postman\-cli/postman\-cli\-overview/
|
|
4537
5276
|
.SH AUTHOR
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postman-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "Official Postman CLI - Command-line companion for API development, testing, and automation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postman",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"man/"
|
|
59
59
|
],
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@postman/pm-bin-macos-arm64": "1.
|
|
62
|
-
"@postman/pm-bin-macos-x64": "1.
|
|
63
|
-
"@postman/pm-bin-linux-x64": "1.
|
|
64
|
-
"@postman/pm-bin-linux-arm64": "1.
|
|
65
|
-
"@postman/pm-bin-windows-x64": "1.
|
|
61
|
+
"@postman/pm-bin-macos-arm64": "1.58.0",
|
|
62
|
+
"@postman/pm-bin-macos-x64": "1.58.0",
|
|
63
|
+
"@postman/pm-bin-linux-x64": "1.58.0",
|
|
64
|
+
"@postman/pm-bin-linux-arm64": "1.58.0",
|
|
65
|
+
"@postman/pm-bin-windows-x64": "1.58.0"
|
|
66
66
|
}
|
|
67
67
|
}
|