TGM Expert is an enterprise asset management platform designed for hydro and energy assets. This documentation covers all major features and APIs.
Admin Portal
Looking for the TGM Admin Portal documentation? The platform administration dashboard for managing multi-tenant deployments, database migrations, backups, licensing, and system monitoring.
Multi-Tenant Architecture¶
TGM Expert uses a two-level multi-tenancy architecture:
- Client Isolation (Database Level) - Each client/organization has their own PostgreSQL database
- Sandbox Isolation (Schema Level) - Within each client's database, sandboxes use schema-based isolation
Required Headers for API Requests¶
| Header | Purpose | Example |
|---|---|---|
Authorization |
JWT or API token | Bearer eyJ... |
X-Client-ID |
Client/organization identifier | acme-corp |
X-Tenant-ID |
Sandbox identifier (optional) | sandbox_dev |
See Multi-Tenancy Documentation for complete details.
Table of Contents¶
Core Features¶
- Authentication & Authorization - JWT, SSO, TOTP, API Tokens
- Company Management - Company setup, configuration, multi-tenancy
- Asset Management - Units, Components, Asset Lifecycle
- Maintenance Operations - Inspections, Interventions, Work Orders
- Calendar & Scheduling - Per-user calendar, assignment notifications
- Projects & CAPEX - Project management and capital expenditure
Communication¶
- Email System - Multi-provider email with templates
- Messaging Providers - SMS, WhatsApp, Telegram, Slack, Discord
- Webhooks - Real-time event notifications
Monitoring & Analytics¶
- IoT & Sensors - Sensor data ingestion and condition monitoring
- Dashboard & Analytics - KPIs, search, export, compliance
Infrastructure¶
- InfluxDB - Time-series database for sensor data and audit logs
- RabbitMQ - Message broker for real-time events and WebSocket
- Storage - File storage with per-company provider support (MinIO, S3, Azure)
- Multi-Tenancy - Client and sandbox isolation architecture
- Health Monitoring - Service health checks and monitoring
Advanced Features¶
- API Tokens - Programmatic API access with granular permissions
- Sandbox Environments - Development and testing environments
- OCR Document Analysis - PaddleOCR text extraction and document search
Integration Guides¶
- SSO Configuration - SAML and OIDC setup
- ERP Integration - Enterprise system integration
Quick Start¶
Base URL¶
Production: https://api.tgm-expert.com
Development: http://localhost:1337
Authentication¶
All API requests require authentication via JWT token or API token, plus multi-tenant headers:
# JWT Authentication with multi-tenant headers
curl -X GET https://api.tgm-expert.com/api/inspections \
-H "Authorization: Bearer <jwt_token>" \
-H "X-Client-ID: acme-corp"
# API Token Authentication (for production data)
curl -X GET https://api.tgm-expert.com/api/inspections \
-H "Authorization: Bearer tgm_xxxxxxxxxxxx" \
-H "X-Client-ID: acme-corp"
# Access sandbox data
curl -X GET https://api.tgm-expert.com/api/inspections \
-H "Authorization: Bearer <jwt_token>" \
-H "X-Client-ID: acme-corp" \
-H "X-Tenant-ID: sandbox_dev"
Alternative: Use subdomain-based routing: https://acme-corp.tgm-expert.com/api/inspections
Standard Response Format¶
All API responses follow a consistent Strapi-compatible format:
{
"data": { ... },
"meta": {
"pagination": {
"page": 1,
"pageSize": 25,
"pageCount": 10,
"total": 250
}
}
}
Feature Overview¶
Asset Management¶
- Locations/Plants - Physical locations and power plants
- Units - Major equipment units (turbines, generators)
- Components - Individual components within units
- Sub-Assemblies - Component groupings
- Asset Lifecycle - Full lifecycle tracking from acquisition to disposal
Maintenance¶
- Inspections - Scheduled and ad-hoc inspections
- Interventions - Maintenance activities and repairs
- Work Orders - Formal work requests and tracking
- Maintenance Plans - Preventive maintenance scheduling
- Failures - Failure tracking and analysis
- RCA - Root Cause Analysis
Monitoring¶
- Sensors - IoT sensor configuration
- Sensor Readings - Real-time data ingestion
- Alerts - Threshold-based alerting
- Dashboards - Visual analytics
Communication¶
- Email - Transactional emails with multiple providers
- SMS/WhatsApp/Telegram - Multi-channel messaging
- Webhooks - External system integration
- Notifications - In-app user notifications
Documents¶
- Drawings - Technical drawings and schematics
- Documents - General documentation
- Files & Folders - File management
- OCR Document Analysis - Text extraction from PDFs and images via PaddleOCR
Knowledge Base¶
- Articles - Technical articles
- FAQs - Frequently asked questions
- Best Practices - Industry best practices
- Learning Modules - Training content
API Versioning¶
The API uses URL path versioning. Current version: v1
All endpoints are prefixed with /api/ for the main API or /api/admin/ for administrative endpoints.
Rate Limiting¶
| Tier | Requests/minute | Requests/hour |
|---|---|---|
| Standard | 100 | 3,000 |
| Premium | 500 | 15,000 |
| Enterprise | Unlimited | Unlimited |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706745600
Health & Monitoring¶
Health Endpoint¶
Check system health and external service connectivity:
curl http://localhost:1337/actuator/health
Response:
{
"status": "UP",
"components": {
"application": {
"status": "UP",
"details": {
"name": "TGM Manager Server",
"version": "1.1.0",
"features": {
"ocr": false,
"influxDb": false,
"email": true,
"sms": false,
"sso": true,
"rabbitmq": true,
"cron": true
}
}
},
"db": { "status": "UP", "details": { "database": "PostgreSQL" } },
"minio": { "status": "UP", "details": { "bucket": "tgm-uploads" } },
"rabbit": { "status": "UP", "details": { "version": "3.12.14" } },
"redis": { "status": "UP", "details": { "version": "8.4.0" } }
}
}
Health Components¶
| Component | Description |
|---|---|
application |
App info and enabled features |
db |
PostgreSQL database connection |
minio |
MinIO/S3 file storage |
rabbit |
RabbitMQ message broker |
redis |
Redis cache/session store |
ocr |
OCR service (when enabled) |
influxdb |
InfluxDB (when enabled) |
diskSpace |
Available disk space |
Actuator Endpoints¶
| Endpoint | Access | Description |
|---|---|---|
/actuator/health |
Public | Health status of all components |
/actuator/info |
Admin | Application information |
/actuator/metrics |
Admin | Application metrics |
/actuator/prometheus |
Admin | Prometheus metrics export |
Support¶
- Documentation Issues: Create an issue in the repository
- API Support: support@tgm-expert.com
- Emergency: Contact your account manager
Changelog¶
v1.0.0 (2026-02-01)¶
- Initial release
- Multi-provider email system
- Multi-channel messaging (SMS, WhatsApp, Telegram, etc.)
- Webhook support for all entities
- API token system with granular permissions