What do environments do in new APIs tab?

Our team just upgraded to 7.1. While we have an existing collection defining our API already, I decided to start from scratch and see what the new APIs tab could do. We have various environments setup with each environment containing various variables. The endpoints in our existing collection make use of these variables in the URL. e.g., the endpoint URL is defined as {{service_url}}/foo allowing me to switch environments, hit “Send”, and get the response from the server associated with the environment.

I’ve only tried to use RAML so far to define my API in the new tab, but it doesn’t seem to have a way to embed environment variables into the definition. This means the collection I can generate has none of that. You can add environments in the “Develop” section, but what does this actually do for you? I can’t find any documentation on what this provides. Is it meant to be a “here’s where we’ve deployed this version of the API” checklist?

On a related note, I could add an existing test suite collection in the “Test” section but have no way to run it from there or at least have it switch to the collections tab and bring me to it.

Hi @Luis,

This is to clarify that you cannot embed environment variables into the API schema definition, the purpose of the environment section in the API tab is to provide a clear visual representation of the different elements associated with the API schema. The environment which you add in the API section will be tagged to the generated collection and the environment variables can be referenced within that collection.

You can check out the link https://learning.getpostman.com/docs/postman/design_and_develop_apis/introduction_to_apis/ for further information related to Designing and Developing API’s.