Skip to navigation

Postman CLI runner commands (postman runner)

View as Markdown

This topic covers the postman runner commands for the Postman CLI.

Use the postman runner commands to run your organization’s APIs from your internal network with Private API Monitoring, and to list the runners and regions a monitor can run from.

The postman runner list and postman runner regions commands accept --api-key <key> to authenticate with a Postman API key instead of your postman login session, falling back to the POSTMAN_API_KEY environment variable, so the reference below omits it. Where a command can print machine-readable output, its options include --json.

postman runner start

Private API Monitoring is available on Postman Enterprise plans.

With Private API Monitoring, you can use runners to monitor and test your organization’s APIs from your internal network, without publicly exposing your endpoints.

Run this command to start a runner from your internal network that regularly polls Postman for upcoming monitor runs. The collection’s tests run in your internal network. Then the test results are sent back to the Postman Cloud, making them available in the monitor results. Provide the runner ID and key from the command you copied when you created the runner. Learn more about setting up a runner in your internal network.

Optionally, you can configure the runner to route HTTP and HTTPS traffic through a proxy server that enforces outbound request policies. You can use the --proxy option to provide the URL for the proxy server used by your organization. Or you can use the --egress-proxy option to enable the built-in proxy and use the --egress-proxy-authz-url option to provide the URL for the runner authorization service that evaluates outbound request policies. Learn more about configuring a runner to use a proxy server.

You can’t use the --proxy and --egress-proxy options together.

The runner doesn’t block requests that go through its own proxy, set with --proxy or --egress-proxy, even when that proxy is on a loopback address such as 127.0.0.1. The runner still blocks any other proxy that resolves to a restricted address.

A monitor that runs on the runner can use a Postman dataset as its iteration data, including data sources that are only reachable from your internal network. A dataset with a custom JDBC data source also needs Java 8 or newer on the runner’s computer, along with the --dataset-jdbc-driver-dir option. Learn more about using datasets with a runner. A script can query a dataset’s database source directly instead of the copy Postman keeps in sync. Such a query returns at most 100,000 rows, and fails with an error that tells you to add a LIMIT clause rather than returning a partial result.

If the runner is running in the background, stop the runner using your system’s process control. You can also press Control+C or Ctrl+C to stop the runner.

Run events, including monitor runs and average response time, are reported to Postman by default, where they appear in the Monitors section of the API Catalog. To opt out, pass --report-events=false.

To use this command, sign in to Postman with the postman login command.

Usage

postman runner start --id <runner-id> --key <runner-key> [options]
--id <runner-id>
Required

Specifies the runner ID.

--key <runner-key>

Specifies the runner key that authenticates your runner with the Postman Cloud.

Options

--dataset-jdbc-driver-dir <path>

Specifies a folder on the runner’s computer that holds the JDBC driver JAR files. Required to run a monitor that uses a dataset with a custom JDBC data source. The runner loads drivers only from this folder and matches them by file name, so the driver paths saved in the dataset are ignored.

--egress-proxy

Runs the runner with the built-in proxy enabled. This option requires --egress-proxy-authz-url.

--egress-proxy-authz-url <url>

Specifies a custom runner authorization service URL. Instead of specifying this option, you can define the URL using the POSTMAN_RUNNER_AUTHZ_URL environment variable. This is required with --egress-proxy.

--metrics

Runs a metrics server available at the /health/live endpoint. Useful for health checks in orchestration environments, like Kubernetes.

--metrics-port <port>
Defaults to 9090

Specifies a port number where the metrics server can expose health checks and metrics.

--proxy <url>

Specifies your organization’s proxy URL. Instead of specifying this option, you can define the URL using the HTTP_PROXY and HTTPS_PROXY environment variables.

--region <region>

Specifies the region for the runner. Use eu for the EU region.

--ssl-extra-ca-certs <path>

Specifies the path to the file with one or more trusted CA certificates in PEM format. Used for custom SSL certificate validation.

--report-events

Run events are reported to Postman by default, whether you pass --report-events. To turn reporting off, pass --report-events=false. You can also use --no-report-events.

Examples

postman runner start --id 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --key 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12
postman runner start --id 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --key 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --proxy http://example.com:8080
postman runner start --id 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --key 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --dataset-jdbc-driver-dir /opt/jdbc-drivers
postman runner start --id 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --key 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --egress-proxy --egress-proxy-authz-url http://authz.example.com
postman runner start --id 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --key 12345678-12345ab-1234-1ab2-1ab2-ab1234112a12 --metrics --metrics-port 12044 --ssl-extra-ca-certs /path/to/certs.pem

postman runner list

Lists your team’s registered self-hosted runners. Use the runner IDs it returns with the --runner option on postman monitor create or postman monitor update to run a monitor from a self-hosted runner. You can run this command in a temporary session, which the postman init command creates.

Usage

postman runner list [options]

Options

-w, --workspace <id>

Filters the results to the runners in a specific workspace.

--json

Prints the runner list as JSON instead of a table. The output is { "runners": [...] }, with one object per runner. The scope is team or workspace, and lastPingAt is null for a runner that has never connected.

Examples

postman runner list
postman runner list --workspace 12345678-90ab-cdef-1234-567890abcdef

postman runner regions

Lists the region and private-runner values that are valid for the --runner option on postman monitor create and postman monitor update, including a static IP where one is configured. You can run this command in a temporary session, which the postman init command creates.

Usage

postman runner regions [options]

Options

--json

Prints the region list as JSON instead of a table. The output is { "regions": [...] }, with one object per region. The ip field is null when the region has no static IP or your team can’t use it.

Example

postman runner regions