Web API/Rest API
Introduction
The NetXMS Web API provides a REST-like interface for integrating external systems with the NetXMS server. API calls use JSON for data exchange. The Web API is embedded directly into the NetXMS server process and is documented using an OpenAPI specification.
Information about Grafana configuration can be found here.
Built-in Web API
The built-in Web API is integrated directly into the NetXMS server process as a loadable module.
Setup
To enable the built-in Web API, add the following line to the server configuration file
(netxmsd.conf):
Module = webapi
The API listens on the loopback address on port 8000 by default. Once enabled, it can be
accessed at http://127.0.0.1:8000/.
Configuration
All configuration parameters are placed in the [WEBAPI] section of the server
configuration file (netxmsd.conf).
Parameter |
Default |
Description |
|---|---|---|
Enable |
true |
Set to |
Address |
loopback |
Listener address. Empty value or |
Port |
8000 |
HTTP listener port. |
Example configuration:
Module = webapi
[WEBAPI]
Address = any
Port = 8000
TLS Configuration
The built-in Web API does not terminate TLS directly. Instead, it uses reproxy as a TLS termination proxy, which is started and managed automatically by the server when TLS is enabled. Alternatively, any external reverse proxy (e.g. Nginx) can be used for TLS termination instead of reproxy — in that case leave TLS disabled in the NetXMS configuration and configure the proxy to forward HTTPS traffic to the HTTP listener port.
Parameter |
Default |
Description |
|---|---|---|
TLSEnable |
false |
Set to |
TLSPort |
8443 |
HTTPS listener port (reproxy listens on this port). |
TLSAddress |
0.0.0.0 |
Address reproxy binds to for HTTPS. |
TLSCertificate |
(none) |
Path to the TLS certificate file. Required when TLS is enabled. |
TLSCertificateKey |
(none) |
Path to the TLS certificate private key file. Required when TLS is enabled. |
ReproxyPath |
|
Path to the reproxy executable. On Windows, defaults to |
Example TLS configuration:
[WEBAPI]
Address = loopback
Port = 8000
TLSEnable = true
TLSPort = 8443
TLSAddress = 0.0.0.0
TLSCertificate = /etc/ssl/certs/netxms.crt
TLSCertificateKey = /etc/ssl/private/netxms.key
Note
When TLS is enabled, it is recommended to keep the HTTP listener bound to the loopback address (default) so that unencrypted traffic is not exposed on the network.