SapienStream API

v1.0

Industrial Automation Platform - Comprehensive machine management, data collection, and component marketplace

Machines API
Register and manage industrial machines with multiple protocol adapters
OPC-UAModbusS7
Tags API
Real-time machine data and tag management with quality indicators
BOOLINTREALSTRING
Semantic Tags API
High-level abstractions with safety criticality and validation rules
AnalogDigitalStateCounter
Documents API
Compliance management and regulatory documentation
ManualsCertificatesSDS
Components API
Industrial component marketplace with specifications and pricing
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 SapienStream API in minutes. All you need is valid credentials to begin accessing industrial data.

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