SapienStream API

v1.0

The Logic Layer for the Physical World - API access to verified constraint satisfaction systems for brownfield infrastructure

Machines API
Vendor-agnostic canonical models with Semantic Fabric mapping across manufacturers
OPC-UAModbusS7
Tags API
Hybrid Intelligent Search + Regulatory Knowledge Graph - semantic vectors + SQL constraints + ISO Standards for compliance-verified queries
BOOLINTREALSTRING
Semantic Tags API
Nelo Runtime execution with compliance validation - IEC 61131-3 logic + SIL/PL verification + EU Machinery Regulation reports
AnalogDigitalStateCounter
Documents API
Deep Perception™ extraction with regulatory metadata - multi-agent parsing of PDFs with ISO Standards and EU regulatory compliance validation
ManualsCertificatesSDS
Components API
Computable physics catalog mapped to Regulatory Knowledge Graph - verified specifications across vendor-agnostic Semantic Fabric with compliance tracking
SensorsActuatorsControllers
Subscription Policies
Plan management, feature limits, and usage validation
FreeProfessionalEnterprise
Authentication
JWT-based auth with RBAC, MFA, and API key management
JWTRBACMFA

Quick Start

Get started with the Logic Layer API. All credentials provide access to verified constraint satisfaction outputs.

Base URL
https://sapienstream.com/api
Authentication
curl -X POST "https://sapienstream.com/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"username": "your_username", "password": "your_password"}'

Example: Get Machine List

# First, authenticate to get a token
TOKEN=$(curl -X POST "https://sapienstream.com/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"username": "your_username", "password": "your_password"}' \
  | jq -r '.access_token')

# Then use the token to access the API
curl -X GET "https://sapienstream.com/api/machines" \
  -H "Authorization: Bearer $TOKEN"

Key Features

Multi-Protocol Support
  • • OPC-UA industrial communication
  • • Modbus TCP/RTU protocol support
  • • Siemens S7 native connectivity
  • • EtherNet/IP integration
  • • Simulation adapters for testing
Data Management
  • • Real-time tag value monitoring
  • • Data quality indicators
  • • Historical value tracking
  • • Type-safe data validation
  • • Write operation audit trails
Semantic Abstractions
  • • High-level operational metrics
  • • Safety criticality classification
  • • Custom validation rules
  • • OPC-UA mapping support
  • • Engineering units management
Enterprise Security
  • • Role-based access control (RBAC)
  • • Multi-factor authentication
  • • API key management
  • • Session management
  • • Comprehensive audit logging

Getting Started

Authentication
Learn how to authenticate with the SapienStream API
Get Started →
Machine Management
Register and configure industrial machines
Learn More →
Subscription Plans
Explore plan features, limits, and pricing
Learn More →
Core Concepts
Understand semantic tags and data abstractions
Learn More →

Implementation Details

Current Architecture

  • • RESTful API with PostgreSQL backend
  • • SQLAlchemy async ORM with Alembic migrations
  • • FastAPI framework with automatic OpenAPI docs
  • • JWT authentication with configurable expiration
  • • Role-based permissions with fine-grained control
  • • Multi-protocol adapter architecture

Data Types Supported

  • Tags: BOOL, INT, REAL, STRING
  • Semantic Types: Analog, Digital, State, Counter
  • Adapters: SIM, OPC-UA, Modbus, S7, EtherNet/IP
  • Documents: Manual, Certificate, SDS, Drawing
  • Components: 20+ industrial categories
  • Criticality: Low, Medium, High, Critical