Skip to navigation

Preview and edit environments in a monitor

View as Markdown

When you select an environment in the monitor form, the Environment tab in the preview panel shows its variables. Use it to check which values the monitor can use and to fix problems before you create the monitor, without leaving the form or opening the environment in a separate tab.

Monitors run in the Postman Cloud, so they can only use shared values. A variable that has a value only on your machine works when you send a request, but it can cause the monitor run to fail. The Environment tab shows a warning icon next to these variables so you can catch them before the first run.

You select an environment while you configure a monitor. This page covers what you can do with that environment from the monitor form.

Edit and save the environment

The Environment tab uses the same variables editor as the environment tab in the workbench. To learn more about environments, see Create and use environments and Set environment variables. To edit the environment from the monitor form, do the following:

  1. Select an Environment in the monitor form, then click the Environment tab. If you select Add icon Create new environment from the dropdown list, Postman creates the environment, selects it, and shows it in the Environment tab instead of opening a new tab.

  2. Add, edit, or reorder variables, or set values as secure. While you have edits that aren’t saved, the Environment tab shows an unsaved indicator and Unsaved changes appears at the bottom of the tab.

  3. At the bottom of the Environment tab, save your changes in one of the following ways:

    • Click Save to update the environment. Postman asks you to confirm, because other collections, monitors, and services might use the environment. Click Confirm to save the changes to the environment.
    • Click Save as new environment to create a copy of the environment with your changes and select the copy for the monitor. Postman names the copy for you, and the original environment stays unchanged. This option is available when you create a monitor. When you edit a monitor, use Save to update the environment the monitor already uses.

Save as new environment shares every unshared value in the new environment, including sensitive values. Everyone in the workspace can see them. Values that you link to a vault secret keep their links and aren’t shared as text.

Postman doesn’t save environment edits when you click Create Monitor or Update Monitor. If you create the monitor or select a different environment before you save, Postman discards your edits. Postman doesn’t warn you about unsaved edits or unshared values when you create or update the monitor.

Share values for new variables

When you add a new variable in the Environment tab and enter a value, Postman sets the variable to share that value, so the monitor can use it. The value isn’t shared with your teammates until you click Save or Save as new environment, like any other edit. When you click Save, variables that are already in the environment keep their current sharing settings, and so does any shared value you set yourself. Save as new environment shares every unshared value in the copy, as the warning in the previous section describes.

Fix variables a monitor can’t use

In the Environment tab, Postman greys out each variable that the monitor can’t use and shows a warning icon next to its name. You can still edit these variables. Hover over the warning icon to see why the variable can’t be used and how to fix it:

WarningWhat it meansHow to fix it
Value not sharedThe variable’s current value is local to you. Share the value so the monitor can use it.Share the value, then click Save.
Local Vault valueThe variable’s value is a secret in your Postman Local Vault, which only you can access. Monitors can’t use values in your local vault.Link a Shared Vault secret instead, and share the secure variable, then click Save.

A variable that references a Shared Vault secret shows a warning icon until you share it.

Monitors can’t run on values that stay unshared or in a local vault. If you don’t fix a variable that has a warning icon, the monitor can’t use that variable’s value.

Edit environments in Local View

You can preview and edit environments in the monitor form in Local View, with the same warnings. How Postman saves your changes depends on where the environment is stored:

  • Local environment — Postman edits the environment from its file in your working directory. Save writes to the file and works offline. When you create or update the monitor, Postman pushes the changes to the environment’s cloud copy. Learn more about pushing local resources to the cloud.
  • Cloud-only environment — Postman reads the environment from the cloud, using your cloud permissions. Save writes your changes directly to the cloud and needs an internet connection.
  • Save as new environment — Postman creates a cloud environment named after the original with “Copy” added, shares every value, and selects it for the monitor.