Back to videos

REST API Server / Configuring REST API Server

Configuring REST API Server

Description

In this video of our N3uron Academy, we’ll walk you through the configuration of N3uron’s REST API Server. Let’s get started!

  • [05:14] Configuring REST API Server

Transcription

[00:00] Hello everyone! In this video, we’ll walk you through the configuration of N3uron’s REST API Server. This module allows external applications to interact with the N3uron platform via HTTP requests, enabling efficient retrieval, updates, and management of various system data. The REST API Server provides multiple endpoints, granting access to alarms, backups, certificates, licenses, modules, system information, N3uron Links, and the tag model. To get started, let’s create a new REST API Server module instance. First, navigate to the Config tab under the System section, click on Modules, and select New Module. Assign a name to the module instance, such as RestApiServer, and set the module type to RestApiServer.

[01:04] Once completed, save the configuration. Now that the module has been created, we need to configure its network settings. In the Explorer Panel, locate the module and open its main settings. The first step is to choose the server mode, where we can decide whether the connection should use HTTP, HTTPS, or both. After that, we specify whether the server should listen on all available network interfaces or be restricted to a specific one, depending on our requirements. Once that is configured, we define the TCP port for the REST API Server. By default, it listens on port 3003 for HTTP and 3443 for HTTPS, but these values can be adjusted if necessary. To ensure a secure connection, we should enable HTTPS and provide a valid TLS/SSL certificate along with a private key. This encrypts all API communications and is highly recommended.

[02:01] If you don’t already have a TLS/SSL certificate, you can generate a Certificate Signing Request using the built-in CSR creation helper. This allows you to obtain a certificate from a Certificate Authority or create a self-signed certificate. N3uron provides flexibility in handling certificates. You can choose to embed the certificate directly or provide the file path to an external certificate file. If the file path option is selected, the module will automatically reload the certificate whenever it detects a change in the certificate files. Additionally, you can configure the reload interval, which determines how frequently the system checks for certificate updates and applies them dynamically without requiring a manual update. For this example, we will use embedded certificates. Once the server settings are in place, we need to configure access control. Authentication is mandatory in the REST API Server module to ensure that only authorized clients can access the API.

[03:05] User roles, users, and groups are all managed in the Roles section. Users can either be local or managed via an Active Directory server for centralized authentication. To further secure access, we define permissions that control which endpoints each role or token has access to, restricting which users can retrieve or modify system data. Additionally, tag filters can be configured to determine which parts of the tag model are accessible for each user role or token. This allows for granular control over data exposure, ensuring that users or applications can only access the necessary data. In this example, we will grant full control to the Administrator role and set up token-based access with read-only permissions for a specific part of the tag model.

[04:31] With the server configuration complete, we can now save the settings. That’s it for this video—you’ve successfully configured the N3uron REST API Server! In our upcoming videos, we’ll explore data retrieval, covering how to access real-time and historical data, as well as tasks like creating and exporting backups. The REST API also enables more advanced operations, including license management, module control, and even loading a full system configuration.

[05:00] We encourage you to check out the N3uron Knowledge Base for additional details and to explore the Postman Collections for practical examples. Thanks for watching, and see you in the next video!

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from - Youtube
Vimeo
Consent to display content from - Vimeo
Google Maps
Consent to display content from - Google
Spotify
Consent to display content from - Spotify
Sound Cloud
Consent to display content from - Sound