주 콘텐츠로 건너뛰기
Hints and Tips 생성 편집

Environments Setting in Postman

shutterstock_219471724-20231117-013503.jpg

DId you read Postman's basic usage method? Let's start MIDAS Open API with Postman

 

Getting Started with Postman

This section will guide you through the comprehensive use of Postman.

 

Environments

Each time, testing and utilizing REST API through coding can be challenging. Due to this, users frequently use Postman when using the REST API; however, they often encounter one issue.

 

Frequently used requests are typically pre-set, as shown below, but the issue lies in the temporary nature of the URL and MAPI key.

image-20231023-104253.png

Frequently used Request

 

It means whenever they can be changed. It is easy to handle if we only use a few requests, but if we preset tens or hundreds of Requests and change the URL and MAPI-Key? How can you manage them?

 

Fortunately, Postman offers an Environment function to handle these variables.

Fundamentally, the Environment provides Global Environments. In this example, I will create a new environment.

 

image-20231023-104732.png

Global Environments

 

  • Click Create Environment.
  • Set the name of a new environment.
  • Create two variables. (baseURL and MAPI-Key)
  • Input an initial value of each variable.
  • Save. (ctrl+s)

image-20231023-105056.png

MIDAS Open API - Environments

 

Apply the saved environment as follows.

image-20231023-111637.png

Apply Environments

 

The next step is to open the Request and replace the URL and Header part with variables. To utilize variables, employ double curly braces and input the variable name.

image-20231023-111838.png

Variable Request

 

When you copy this format to create a new Request, URL / MAPI-Key can be applied globally even though their values keep changing.

Copying and using this format when creating a MIDAS Open API request ensures that any changes to the URL or MAPI-Key will be globally applied to all related requests.

Instead of altering variables in the Environment tab each time, you can swiftly access and modify them using the icon at the top-right corner.

image-20231023-112208.png

Swift access to modify variable values

0
컨텐츠가 도움이 되셨나요?