DEV Community

Mourya Vamsi Modugula
Mourya Vamsi Modugula

Posted on

Setting up Environment for POSTMAN

Here’s how to set up environments, globals, and API sharing in Postman:

Setting Up Environments in Postman:

  1. Open Postman:

    • Ensure that Postman is installed and running on your machine.
  2. Create a New Environment:

    • In the top-right corner of the Postman window, click the Environments icon.
    • Select Manage Environments and then Add to create a new environment. ![Add Environment])

post man of

  1. Add Variables to Environment:
    • After naming your environment, you can add key-value pairs for variables like {{baseUrl}}, {{token}}, etc. ![Environment Variables])

post man

  1. Use Environment Variables in Requests:

    • Use {{variableName}} in your request URL, headers, or body, and Postman will substitute it with the value from the selected environment.
  2. Switch Between Environments:

    • You can switch environments by selecting the dropdown in the top-right corner. ![Switch Environment]) post man

Setting Up Globals in Postman:

  1. Open Globals:

    • Go to the Environments section again and click on Globals.
  2. Add Global Variables:

    • Similar to environments, you can define global variables that are available across all collections, requests, and environments.
  3. Use Global Variables:

    • Use global variables in your requests by referencing them with {{globalVarName}}.

API Sharing and Collaboration in Postman:

  1. Create an API:

    • From the Postman sidebar, go to APIs and click New API.
    • Define your API name, version, and schema if available.
  2. Share API:

    • Click on Share in the top-right corner of the API workspace.
    • Select a workspace or team members with whom you want to share the API.
  3. Collaborate in Workspaces:

    • You can share collections, environments, and APIs within a workspace. Click on Workspace in the top-left corner to manage sharing.

API Sharing Settings:

  1. Invite Collaborators:

    • From the API settings, go to the Share API tab and invite users by email or by sending them a link to join the workspace.
  2. Assign Roles and Permissions:

    • You can manage user roles like Editor, Viewer, or Admin for team collaboration.
  3. Public API Sharing (Optional):

    • For public APIs, you can generate a shareable link or post your API documentation directly on Postman’s Public API Network.

These steps should cover the setup of environments, globals, and API sharing in Postman. Let me know if you need further details!

Top comments (0)