An environment enables you to collaborate on Postman data when you're working as part of a team. You can use environments to share a group of variable values and use those values when sending requests. You can also use environments to share and manage the visibility of sensitive data such as API keys, passwords, or tokens.
To get started, create a new environment, move an environment, or fork an environment in your team workspace. Then assign roles to team members to specify who can view or edit the environment.
To collaborate with others, move an environment to a shared workspace. You can share data with other team members in private and team workspaces, or share data with anyone using public workspaces.
You must be an Editor on an environment or a Workspace Admin to move the environment to another workspace. Learn more about managing environment roles.
To move an environment to another workspace, do the following:
Select Environments in the sidebar and select an environment.
Select the more actions icon and select Move.
Use the search bar to find the workspace you want to move the environment to. You can also select the filter icon to filter workspaces by type.
You can move environments to personal, private, team, and public workspaces that you have access to. You can't move environments from team, private, or public workspaces to a personal workspace.
Select the workspace, then select Move Environment.
Monitors and integrations in the original workspace that use the environment may no longer work and will need to be reconfigured in the new workspace. Collections, APIs, and mock servers that use the environment can be moved manually or reconfigured.
Another way to move an environment is to export it from one workspace and import it into a different workspace.
You can import the JSON file into another workspace by dragging it into Postman. Learn more about data import and export.
After you move an environment, you can share it with others and add them as collaborators.
Postman will notify the people you shared the element with about your request to collaborate. Learn more about sharing your work in Postman.
To copy a link to the environment you can share with others, select the link icon next to the environment's name.
Your role determines the actions you can take with an environment. You can have the Editor or Viewer role for an environment.
You must be an Editor on an environment or a Workspace Admin to assign environment roles. Learn more about environment roles.
To manage roles for an environment, do the following:
Select Environments in the sidebar and select an environment.
Select the more actions icon and select Manage Roles.
Enter the name, group name, or email address you want to assign a role to.
Select the role you want your collaborators to have:
Select Update Roles.
If you have the Viewer role for an environment, you can access the values of all variables in the environment. You can update a variable's current value, which is used to send requests in your local Postman instance and isn't shared with your team or synced to your Postman account. You can't edit the environment or update a variable's initial value, which is synced to the workspace and shared with your team.
If you have Viewer access to an environment, a lock icon displays next to the environment's name to indicate that you can't make changes to the environment. If you need to edit the environment or initial values for variables, request Editor access to the environment.
If you have the Editor role for an environment, you can edit the environment and update a variable's initial value. You can also create and update variables from your scripts.
When you edit the initial value of a shared environment variable, your updated value will be reflected for everyone who has access to the environment. Make sure it's safe to share the value with your team and sync it with Postman's servers. Learn more about managing sensitive variable values.
If you clear the checkbox next to an environment variable, the variable isn't available for use, and references to the variable won't have a value. Users with the Viewer role won't be able to change this setting to make the variable available again.
If you need to update the initial value of a variable in an environment you have Viewer access to, you can request Editor access.
Use your Postman Vault to store sensitive data as vault secrets, and reuse them in your local instance of Postman. Only you can access and use values associated with your vault secrets, and secrets aren't synced to the Postman cloud. This enables you to prevent unintentional disclosure of your sensitive data.
If you want to share sensitive data with collaborators, you can store it in an environment as a secret type variable. Learn about the initial and current values when setting environment variables:
A variable's initial value is synced to your account using Postman's cloud servers. It's shared with anyone who has access to the environment and is made public when publishing an environment along with a collection. For this reason, don't store sensitive data using the initial value to avoid unintentional disclosure of sensitive data. If the initial value includes sensitive data, you can mask the value by selecting the secret variable type.
A variable's current value is used when sending requests in your local instance of Postman and is never synced to your Postman account or shared with your team. This means it's safe to use the current value for sensitive data, such as API keys, passwords, or tokens. Keep in mind that if you persist a variable, the initial value is set to the current value and it's then shared with anyone who can access the environment.
You can fork an environment to make changes to it without impacting the parent environment. You can also use a fork to contribute to an environment without having Editor access.
To fork an environment, do the following:
You can edit your forked environment and use it as needed, or you can create a pull request to update the original environment.
You can view pull requests, forks, and details about an environment from the right sidebar.
To view pull requests, select the pull request icon .
If you have the Editor role for an environment, you can review pull requests and merge changes into the parent environment.
To view forks, select the fork icon .
To view more information about the environment, including its ID, creator, and any mock servers or monitors that use it, select the information icon .
Last modified: 2023/11/09