How DataMiner App agent apps work
This page gives a short technical overview of the apps built by the DataMiner App agent. You do not need this knowledge to use the agent, but it helps to understand the behavior of the apps and the deployment limitations.
flowchart LR
U[User] -->|Signs in| Host["DataMiner App Framework<br/>(sign-in, permissions, header bar)"]
Host <-->|"postMessage bridge &<br/>Network Port v1 (MessageChannel)"| App["Sandboxed iframe<br/>(Opaque origin: static app)"]
Host -->|"HTTP: /API/v1/Json.asmx"| DMA[DataMiner Agent]
Host <-->|"WebSocket: GQI pages and updates"| DMA
A static app hosted by DataMiner
By default, the agent builds a React application with Vite. You can also use other client-side technologies that do not rely on server-side rendering. The production build contains static files: an index.html file and the JavaScript, CSS, font, and image files it uses, built with relative asset paths (such as base: './' in Vite) together with an App.info.json manifest.
The build output and App.info.json are packaged into a ZIP file and uploaded via the DataMiner landing page as an integrated app. DataMiner hosts the app without needing any extra server, backend, proxy, or Node.js runtime on the DataMiner Agent.
Sandboxed hosting and signing in
DataMiner hosts the app inside a sandboxed iframe with an opaque origin. Because of this isolation:
- The app cannot read
DMAConnectioncookies or access the host'slocalStoragedirectly. - DataMiner handles sign-in, user permissions, and the standard DataMiner header bar around the iframe.
- All calls run with the session and permissions of the signed-in user, without exposing connection tokens to the app code.
Communicating with DataMiner
All communication between the app and DataMiner goes through the hosting framework's postMessage bridge and Network Port v1 (MessageChannel):
- DataMiner API and WebSocket traffic: HTTP requests under
/API/v1/and WebSocket connections for streamed results and live updates are routed through theMessageChannelHTTP and WebSocket bridge, using the hosting framework's authenticated session. - Header bar, storage, and URL navigation: Adding custom buttons or menus to the DataMiner header bar, storing and reading client-side app data, and updating or opening browser URLs also use the
postMessagebridge.
The app uses the DataMiner API through the bridge for two main data and action patterns:
| Purpose | How |
|---|---|
| Reading data | Running GQI queries through the query session methods of the DataMiner Web Services API. |
| Changing data | Executing automation scripts with ExecuteAutomationScriptWithOutput. |
GQI is therefore not a separate API: it is the way the app reads data through the Web Services API. The agent deliberately does not use the older Web Services methods that retrieve specific objects directly, e.g., methods to get elements, parameters, or alarms. GQI covers data sources including elements, parameter tables, alarms, services, DOM instances, and custom ad hoc data sources.
Retrieving data
While the app is being built, the agent signs in to your DataMiner System to discover or validate the GQI queries for each data need (using DataMiner Intelligence if enabled).
In the app, the generated queries are embedded as fixed query definitions. The app opens a query session via the network bridge, retrieves the rows page by page over the bridged WebSocket connection, and, for live data, keeps the session open to receive updates when rows are added, changed, or removed. For standard data-driven apps, no AI is used at runtime unless you explicitly integrate a DataMiner Intelligence agent (see Integrating a DataMiner Intelligence agent into an app).
This means that the app shows the same data as a low-code app with the same query, and it respects the same permissions.
Performing actions
When the app needs to change something in DataMiner, it executes an automation script with the ExecuteAutomationScriptWithOutput method via the network bridge and shows the result. For interactive automation scripts, the app can render the script's dialogs in its own user interface and send the user's input back to the script.
Testing
The agent creates Playwright end-to-end tests that start the production build locally and replace the DataMiner API and WebSocket responses with mocks. This way, the tests can cover sign-in, data loading, actions, and error situations without a connection to a DataMiner System.