Nexalis Cloud exposes a powerful real-time API which allows users to query and fetch high-frequency sensor data using WarpScript, a stack-based language designed for time-series analysis.
Quick Start Examples
- Nexalis Macros - Learn how to use Nexalis custom macros for simplified queries
- Python Examples - Integrate the API into your Python data pipelines
- PowerBI Examples - Create dashboards with time-series data
API Endpoint
The Nexalis real-time API is accessible via your dedicated endpoint:yourcompany with your organization’s name. All requests must be sent via HTTP POST with WarpScript code in the request body.
Authentication
All API requests require authentication using a Warp10 READ token passed in the request header:Contact contact@nexalis.io to obtain your READ token.
Data Structure
A tag is stored as a Geo Time Series (GTS). Each GTS is uniquely identified across all your data with its labels, namely:siteName- site where the device is locateddeviceModel- manufacturer and modeldeviceID- unique identifier of the devicedataPoint- device‑specific identifier (e.g., Modbus register, OPC UA tag)
description- manufacturer‑provided descriptionprotocol- communication protocol used
Standardized Tags
Nexalis standardizes some tags by contextualizing and translating them to the Nexalis data model, which is based on IEC 61850. Standardized tags will have additional attribute columns:assetType- standardized device type (e.g., Solar inverter, Storage inverter, Meteo station, Meter, Wind turbine, etc.)subDeviceID- distinguishes devices when connected via proxy/gatewaylogicalNode- standardized function type (e.g., MMDC: DC Measurements)dataObject- standardized tag (e.g., PhV: phase voltage)subDataObject- finer breakdown (e.g., phsA: phase A)engUnits- standardized engineering unitsmultiplier- scaling multiplier for unit conversion (from scada unit to NexalisengUnits)adder- scaling offset for unit conversion (from scada unit to NexalisengUnits)measurementType- Analog or Discrete
Field Availability: Nexalis API only returns non-empty labels and attributes. While labels are always present for identification, standardized attributes (such as
assetType, logicalNode, dataObject) are only included for tags that have been mapped to the Nexalis data model. Additionally, unit-related attributes (engUnits, adder, multiplier) are typically omitted for discrete measurement types, as these data points generally do not have a unit.Core Query Functions
The API uses WarpScript, a stack-based language for time-series operations. Two main functions are available:FIND - Discover Available Metrics
Search for time-series matching specific criteria without fetching values. Useful for exploring what data is available. Complete documentation here. Example query:"c":{...}), labels ("l":{...}), attributes ("a":{...}), and an empty value field ("v":[]).
How to do it in python
FETCH - Retrieve Time-Series Data
Fetch actual values for specific time ranges and metrics. Complete documentation here. Example query:Both FIND and FETCH functions support:
- Regular expressions for pattern matching (prefix with
~) - Multiple filters on labels and attributes (both passed in the “labels” field)
- Flexible time ranges with ISO8601 strings or microseconds unix time
Nexalis Custom Macros
Nexalis provides ready-to-use macros that simplify common time-series operations:@nexalis/scale- Apply unit conversions and calibrations@nexalis/fetch_trapezoidal_averages- Fetch and compute trapezoidal averages for irregularly-sampled data
Custom Macros
You can also build your own WarpScript macros to encapsulate complex logic and reuse common query patterns across your organization.Filtering Data
Thelabels parameter in both FIND and FETCH queries accepts filters on both labels and attributes, allowing you to precisely target the data you need.
Basic Filtering
Filter by exact matches on any label or attribute field:Regular Expression Filtering
Prefix filter values with~ to use regular expressions for pattern matching:
Common Regex Patterns
| Pattern | Description | Example |
|---|---|---|
~.* | Match anything (wildcard) | 'siteName' '~.*' |
~^TX_ | Starts with “TX_“ | 'siteName' '~^TX_' |
~.*_001$ | Ends with “_001” | 'deviceID' '~.*_001$' |
~(INV|METER) | Match multiple values | 'assetType' '~(INV|METER)' |
Remember to escape special regex characters when needed. The tilde (
~) prefix indicates that the value should be interpreted as a regular expression rather than an exact string match.API Integration
The Nexalis real-time API can be queried from any tool or programming language that supports HTTP requests. Simply send a POST request with:- URL: Your endpoint (
https://yourcompany.app.nexalis.io/api/v0/exec) - Headers:
X-Warp10-Token: YOUR_READ_TOKEN - Body: WarpScript code (plain text)
Learn More
- Nexalis Macros Examples - Detailed macro usage and patterns
- Python Integration - Build data pipelines with Python
- PowerBI Integration - Create live dashboards
- Warp10 - FIND and FETCH complete documentations