FAQs
The BB-400 provides a REST server implementation that can be used to receive and modify information. This FAQ will explain how POSTMAN, a REST API client can be used to access and change information regarding the IO line status on the BB-400.
POSTMAN is one of a number of software’s used for API testing and development. The POSTMAN application is free to download for individuals and small teams.
Install the POSTMAN application
GET requests
The following examples show that by choosing the appropriate path, one can filter the relevant information to obtain or GET information regarding the IO lines.
1. To get the input states of the IO lines:
2. To get the input state of a selected IO line:
3. To get the output states of the IO lines:
4. To get the output state of a selected IO line:
POST request
To configure the POSTMAN application to send POST commands, change the request from GET to POST. Then, underneath “Body”, the “raw” option should be selected and the input type should be changed to JSON (application/json).
Now, the POST requests can be entered in the Body section and clicking the Send button will send the POST request. After sending the POST requests, it is possible to see the change in IO output values reflected in the LED state on the front of the BB-400 device and via the status or IO pages of the BB-400’s web based interface. If the POST request is successful a “200 OK” status will be returned, otherwise an unsuccessful status code will appear:
1. To set the output states of the IO lines
The web admin IO page shows that the POST request closed all the outputs:
2. To set the output state of a selected IO line
The web admin IO page can also be checked:
This FAQ has described how POSTMAN, a REST API can be used to receive and modify the status of the IO lines. A few examples of how to use the GET and POST commands have been provided to show the user how the REST server implementation works using the BB-400 IO line status.