What an environment swaps#

One side panel holds the values and the cookies that change between runs.

An environment is a named set of values you can swap in and out of your requests. You write {{baseUrl}} and {{token}} in your requests, instead of a hard-coded https://staging.example.com and a staging token in every one. You then keep one environment for staging and another for production. A switch of environment repoints every request at once.

The same side panel also holds your cookie jar, so the two things that change between runs, your variables and your cookies, live in one place.

Open the environment panel#

The environment button reads No environment until you choose one. Click it to open the panel. The panel has two tabs:

  • Environments. Your globals and your named environments, and the variables in each. See Variables.
  • Cookies. The cookie jar, grouped by domain. See Cookies.

Drag the panel's edge to resize it, or drag it closed.

Switch the active environment#

Only one environment is active at a time. Its variables, together with your globals, are what {{variable}} references resolve against when you send a request.

To switch, open the Environments tab and set another environment active. Every request that uses variables now points at the new set of values, with nothing else to change.

Where these values are used#

  • Variables fill in {{...}} references across the URL, query parameters, headers, body, form fields, and auth. See Variables and Dynamic variables.
  • Cookies arrive from responses, and API Client sends them back on matching requests. See Cookies.

API Client saves environments, globals, and cookies on your machine, so they survive a restart.