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.
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.
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)
MIDAS Open API - Environments
Apply the saved environment as follows.
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.
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.
Swift access to modify variable values