Scheduler API

(requires: Scheduler API)

The Scheduler API provides tools for running and managing automated NIS-Elements tasks (JOBs, GA3) using the HTTP protocol. It uses the OpenAPI standard, which is a very popular platform nowadays for creating application interfaces in many different programming languages. It enables developers of laboratory systems and devices to:

  • Control of NIS-Elements execution.

  • Control of acquisition tasks in the JOBs module

  • Control of image analysis tasks in the GA3 module.

  • Concatenation of acquired data into time-lapse documents for easy analysis of time-dependent processes.

Visit Scheduler API GitHub page for more details and examples.

Components of the Scheduler API Module

Windows Service – Scheduler API

Acts as a communication bridge between the NIS-Elements workstation and the laboratory system (scheduler). It enables launching the NIS-Elements application for acquisition jobs as well as independent post-processing tasks (e.g., GA3 analysis, data concatenation).

Developer Testing Interface

Third-party developers can use built-in documentation and testing tools provided at http://localhost:8444/docs.

Web Demo Application

A web-based demo interface available at /public allows real-time monitoring of NIS-Elements activity via the API.

Additional Features

HTTPS Support

Access via the HTTPS protocol is available for enhanced security (configurable).

Multi-User Task Execution

Acquisition and analysis tasks can be executed under different user accounts. This allows the system to store acquired or generated data directly into protected user directories.

REST API Communication Protocol
  • Based on the OpenAPI Specification.

  • A widely adopted standard for HTTP-based APIs.

  • Provides an auto-generated web interface for API documentation and interactive testing.

  • Client code can be automatically generated for many programming languages using the included openapi.json file.

High-Level API Layer in Python

The API is implemented using Python, allowing for quick modifications and easy customization of the interface. The OpenAPI definition (openapi.json) is dynamically generated at runtime from Python type annotations and docstrings using the FastAPI framework.

Station Service as a Windows Service

A core component, the "Station Service", runs as a Windows service and is available at <station name>:8444 or <IP address>:8444.

  • Always active after system startup (power-on), ready to communicate with the laboratory scheduler.

  • Operates independently of the NIS-Elements application.

  • Can report the basic operational status of the acquisition workstation.

  • Handles edge cases, such as warning if NIS-Elements cannot be started or suggesting fallback strategies.

Security

HTTP Basic Authentication

Authentication using a username and password can be enabled. When active, every API request must include valid credentials to be accepted.

HTTPS Support

The service supports both HTTP and HTTPS protocols. For secure communication over HTTPS, it is recommended to use a local Certificate Authority (CA), particularly within internal networks.

Quick Start Guide

After installing NIS-Elements, ensure that the Scheduler API option is checked under the Modules tab. This will install, in addition to the NIS-Elements application itself, two essential components of the Scheduler API system:

  1. Windows Service: NIS-Elements Scheduler API

    This service enables constant communication between the NIS-Elements workstation and the laboratory scheduler.

    • The API is accessible at:

      http://<workstation name>:8444
    • The API documentation and testing interface is available at:

      http://<workstation name>:8444/docs
  2. NIS-Elements Launcher (StartDaemon.exe)

    This application must be running on the desktop of the respective workstation. It allows the lab scheduler to launch acquisition tasks through the NIS-Elements application.

    • Ensure the launcher is started on each relevant workstation.

    • You can add it to the Startup folder for automatic launch at system startup.

    With both components properly configured and running, the system is ready for integration and use with external schedulers and monitoring tools.