Postman
Last updated
Last updated
Postman is an application that functions as a REST CLIENT for testing REST APIs. Postman is commonly used by API developers as a tool to test the APIs they have created.
The first thing to do is Download Postman. Choose according to the Operating System of your laptop/computer.
After the download is complete, run the Postman application installation setup. Setup will run the Postman application installation process automatically.
Once the installation process is complete, you will be prompted to create a Postman account and sign in using that account. You can also sign in using your Google account.
In the default view of the Postman landing page, there is a workspace to operate Postman functions. You can create requests, collections, environments, APIs, and more in the launchpad section. Postman also provides in-app tutorials that you can easily access on the launchpad.
You can also change the Postman application settings at File > Settings on the menu bar.
Postman makes it easy for those of you who work together in teams, where you can add your colleagues to your workspace. You only need to invite your teammates via e-mail.
Here is a tutorial on how to use some of the ANTARES APIs through Postman
ANTARES API Collection is a collection of APIs used by ANTARES to integrate ANTARES clients and servers. This API collection will make it easier for users to connect ANTARES with Postman. At this stage, Postman users will be asked to import the ANTARES API into the Postman collection.
Open the import tool on the toolbar in the Postman workspace.
A menu will then appear to import the collection.
Download the .zip file below after that extract it first. In the Import File section, click Choose Files and please click the file that was extracted earlier.
Then click the Import button and the ANTARES API collection will appear in the collection section in your Postman workspace.
3. The next step is to adjust the settings in the ANTARES API for Public folder with the properties of your device on ANTARES.
To adjust the settings in the ANTARES API collection folder you need to open the edit menu in the ANTARES API for Public folder located on the action bar of the folder (button with a three-dot icon next to the collection folder name), then open the variables tab.
In the variable menu there are several fields that you must adjust to the properties of your ANTARES device. You simply change the Initial-value and Current-value fields according to your device properties in ANTARES. The fields that you must adjust are described in the following table.
Field
Initial Value
Current Value
access-key
access-id:access-password
access-id:access-password
application-name
your app name in ANTARES
your app name in ANTARES
device-name
your device name in ANTARES
your device name in ANTARES
Your e-mail
Your e-mail
device-id
your-device-id
your-device-id
Application-name and device-name are the application and device names that you create in your ANTARES console. Meanwhile, you can get the access-key in the account section of your ANTARES console.
Here is an example of customising the fields in a variable in the collection menu.
Open the ANTARES API for Public folder on the collection tab in your workspace. In the folder there is a list of API functions. Select Store data of a device with the POST icon. There are two types of API store data functions, namely XML and JSON. The difference between the two is only in the type of data content delivery format, you can use either format.
To edit the content of the data you will send, open the body tab and select the raw option. You can edit the content of the data that will be sent to your ANTARES device as needed.
The following are data content editing formats for XML and JSON formats
Field
Value
Body
Key and Value are the variables and values in the content.
4. After the content is edited according to what you need, you just need to send the data to ANTARES by clicking the SEND button and checking the data entered in ANTARES.
C. Pulling Data from ANTARES (Get)
Open the ANTARES API for Public folder on the collection tab in your workspace. In the folder there is a list of API functions. Select Get latest data of a device with the GET icon. There are two types of API get data functions, namely XML and JSON. The difference between the two is only in the type of format for receiving data content, you can use either format.
After that, the launchpad get latest data of a device will appear in your workspace. You don't need to edit the URL or the value of the header in the launchpad. You just need to click the SEND button.
After that you can see the data content that Postman received from ANTARES.