Using the HTML API and SSE
This setup guide describes how to set up and use the HTML API and SSE of the BEHNKE STATION.
The Behnke Station provides two interfaces for network access with the
HTML API and Server-Sent Events (SSE). The HTML API can be used to query and change settings of the Behnke Station and to trigger certain events. Communication takes place via HTTP or HTTPS requests.
Server-Sent Events (SSE), on the other hand, enable a permanent connection between a client and the Behnke Station. Over this connection, the station can transmit events that occur, for example detected key presses, immediately to the connected client.
Both interfaces are disabled by default and must be explicitly enabled before use. The administrator password is required for access.
It is assumed that the Behnke-Station is already set up to the extent that access to the web interface is possible. If this is not the case, please follow the instructions provided with your base electronics (manualsThis page carries no version. This notice is generated automatically and was not written by an editor.) and refer to the technical manualRecently updated — within the last 72 hoursThis page carries no version. This notice is generated automatically and was not written by an editor. to complete the basic setup.
Tip
All built-in tools in this wiki article work ONLY with HTTPS. Before you can use these tools, you must visit the device's web interface with this end device and accept the certificate warning.
1. Enable the HTML API and SSE
- Open your browser
- Go to the web interface of the Behnke Station
- Log in

- In the sidebar on the left, click the menu item
- Navigate to the API section

- Set the value of the option Access to HTML API to allow
- Set the value of the option Access to SSE to allow
- Click to save the configuration
2. Using the HTML API
The HTML API makes it possible to call functions of the Behnke Station via HTTP or HTTPS requests. Depending on the API command used, information can be queried, settings can be changed or actions can be triggered.
Note
Use of the HTML API must first be allowed in the configuration of the Behnke Station. See 1.
The general scheme of an API call is:
https://[IP-Adresse]/?key=[Administrator-Passwort]&api=[Befehl]
The following information is required:
- [IP-Adresse]: IP address of the Behnke Station
- [Administrator-Passwort]: administrator password of the Behnke Station
- [Befehl]: API command to be executed
- if applicable, further parameters of the respective command
Important
If the administrator password contains special characters, they must be URL-encoded accordingly for use within the URL.
2.1 Creating an API command
The integrated API Command Builder can be used to create a valid API call.
The station is addressed over HTTPS only. Your browser does not know its certificate — open the station once via step 1 and confirm the warning. Password and IP stay in your browser; opening the URL in a new tab does put the password in the address bar.Build an API call
Device
Raw responses
The API Command Builder helps you assemble the command and the required parameters.
2.2 Testing an API call
The integrated API Tester can be used to test an API call.
The station is addressed over HTTPS only. Your browser does not know its certificate — open the station once via step 1 and confirm the warning. Password and IP stay in your browser; opening the URL in a new tab does put the password in the address bar. Everything the manual puts after &api= — for example get§ions or trigger&relay=1.API test
Alternatively, an API call can be executed directly via a web browser or another HTTP client.
Example of calling the API help:
https://[IP-Adresse]/?key=[Administrator-Passwort]&api=help
The help command can be used to retrieve further information about the available API commands.
Tip
Whenever possible, always use HTTPS so that the administrator password and other transmitted data are sent encrypted.
3. Using Server-Sent Events (SSE)
With Server-Sent Events, a permanent connection can be established between a client and the Behnke Station.
After the connection is established, it stays open. The Behnke Station can use it to transmit events that occur immediately to the connected client. These may include, for example, detected key presses or other events of the station.
Note
Use of SSE must first be allowed in the configuration of the Behnke Station.
The administrator password is required to establish the connection.
The connection can be established via HTTP or HTTPS:
http://[IP-Adresse]:8080/?key=[Administrator-Passwort]&sse
or:
https://[IP-Adresse]:8443/?key=[Administrator-Passwort]&sse
Important
If the administrator password contains special characters, they must be URL-encoded accordingly for use within the URL.
3.1 Testing the SSE connection
The integrated SSE Tester can be used to test the SSE interface.
The station is addressed over HTTPS only. Your browser does not know its certificate — open the station once via step 1 and confirm the warning. Password and IP stay in your browser; opening the URL in a new tab does put the password in the address bar.SSE test
After the connection has been established successfully, events transmitted by the Behnke Station are displayed in the tester.
Tip
Whenever possible, use the encrypted connection via HTTPS on port 8443.
4. HTTP and HTTPS
HTTPS should always be used for the HTML API and SSE. This way, the administrator password and other transmitted information are sent encrypted.
HTTP connections are only possible if they have been explicitly allowed via the Web connections setting in the General section.
| Interface | HTTP | HTTPS |
|---|---|---|
| HTML API | http://[IP-Adresse]/?... |
https://[IP-Adresse]/?... |
| SSE | http://[IP-Adresse]:8080/?... |
https://[IP-Adresse]:8443/?... |
5. Special case when using a webcam VLAN
For the HTML API, the IP address of the Behnke Station is always used.
SSE has a special case: if a separate VLAN for the webcam is configured in the Network section, the IP address of the webcam must be used for the SSE connection.
FAQ
Note
There is currently no content available here yet. As soon as content is planned, the pages will be marked as planned. Feel free to use the Report a problem function on the right in the toolbar to request new content, ask questions, or report anything that is unclear.
You can also give feedback after every heading, so that we can continuously improve our wiki:
- Move your mouse over the heading
- A small ? appears
- Click the small ?
We welcome every suggestion, every correction and every idea for improvement.