Skip to content

Setting Up Postman & Postman Environments

Prior to sending requests to Vault API, you must set up Postman with your desired version of the Vault Platform Postman Collection and prepare environments to store your Vault's login credentials.

To import the Vault Platform Postman Collection:

  1. Create a Postman account.
  2. Download Postman.
  3. Download the Vault Platform Postman Collection from your applicable version of the Vault API Reference by clicking Run in Postman. Postman collections are available for Vault API versions v20.2+.
Import collections in PostmanImport collections in Postman

Once imported, the Vault Platform Postman Collection appears to the left within Collections. Click the arrow next to the name of a specific Postman Collection to expand or collapse the folders and endpoints nested within the collection.

Environments are reusable sets of stored variables that Postman references when you send requests to Vault API. For example, when sending a request, instead of indicating the vaultDNS and version as path parameters in Postman, you can store these variables and their values in an environment named after a specific Vault. Learn more about managing environments in the Postman Docs.

Download our sample Postman environment below or continue to the next section to learn how to create an environment for your Vault.

Download Sample Postman Environment

To create an environment for your Vault:

  1. In Postman, select Environments from the lefthand sidebar.
  2. Click Import to import the sample Postman environment.
  3. Populate a name for the environment. We recommend naming the environment after the name of your Vault.
  4. Populate an Initial value and Current value for each variable except the sessionId. Upon successfully authenticating your Vault, Postman auto-populates this variable with a valid sessionId value for any Vault DNS where the user has access. Providing a clientId for tracking purposes is optional. Learn more about the client ID in the Vault API documentation.
  5. Click Save to save your new environment.
  6. If you wish to use this environment immediately to send calls to Vault API, click the No Environment drop-down arrow in the top right and select the environment you created.
Postman environmentsPostman environments

When you create a new variable, Postman assigns it a Type of default, which allows the variable values to be visible in plain text. To mask a specific variable, such as your password, select a Type of secret. To omit, select the checkmark next to the variable's name. To include a variable, select the empty checkbox next to the variable's name.

A single environment can be active at a time, denoted by a checkmark next to its name in the list of environments. When you send requests to Vault API, Postman uses the variables stored in the active environment. There may be instances where you need to switch between environments, such as testing an endpoint in multiple sandbox Vaults or testing on behalf of multiple users.

To set an environment as active, hover over its name in the left-hand sidebar and select the checkmark. To set an environment as inactive, hover over the current active environment and select the highlighted checkmark. Alternatively, you can select an environment to be active from the dropdown in the top right.