Netrunr APIs

Overview

The Netrunr Architecture exports APIs to manage and control various aspects of system operation. In this sense, Netrunr is a service-oriented architecture (SOA). The SOA is flexible and dynamic, enabling Netrunr to be extended and upgraded, following continuous development/integration (CI/CD) principles.

The discussion below focuses on Netrunr Gateway-oriented APIs. Other APIs are described elsewhere.

Netrunr Gateway-oriented APIs

These APIs control the configuration, management, and operation of the Netrunr Gateways associated with a Netrunr Edge instance. The APIs are implemented by each Netrunr Edge.

APIs are numbered with semantic versioning.

Netrunr Gateway-oriented API categories include:

  • Account Management and Authentication
  • Device Management, Control, and Data Flow
  • Gateway Management and Provisioning
  • FOTA Updates
  • Administration

APIs are based on REST and MQTT. MQTT supports both direct and WebSocket access (for non-native MQTT clients). MQTT generally provides lower latency and higher throughput than REST, and should be the preferred choice for using the APIs. Access can be restricted to REST to minimize firewall restrictions.

API required ports:

  • 443 - HTTP-S
  • 8883 - MQTT-S
  • 9002 - WSS (Secure WebSockets)
Netrunr Edge: all ports above must be open.
Netrunr Gateway routers: HTTP-S and MQTT-S ports must be open.

Applications make the most use of the Authentication, Device Control, and Data Flow APIs. These are also known as Gateway APIs (GAPI), and are packaged into SDKs to be more friendly to applications.

Netrunr JavaScript SDK is built on GAPI can be used by applications written for both Node.js and web browsers.

The APIs are asynchronous. Not only is this more efficient than synchronous operation in network environments, it is required for certain languages (e.g. JavaScript).

JavaScript examples illustrate several styles of asynchronous programming in JS using the SDK.