What is HGT EAM WebServices?
HGT EAM WebServices is a modern RESTful API gateway built with .NET 9.0 that provides simplified and optimized access to INFOR EAM (Enterprise Asset Management) SOAP web services. Originally developed for HGT (formerly SAAM Terminals), this gateway transforms complex SOAP operations into clean, easy-to-use REST endpoints.The API acts as an intelligent intermediary between your applications and INFOR EAM, providing caching, rate limiting, and a modern REST interface.
Key Features
INFOR EAM Integration
Seamless integration with INFOR EAM SOAP services to fetch grid data and perform operations
Intelligent Caching
SQLite-based persistent caching system for ultra-fast responses and reduced load on EAM servers
RESTful API
Modern REST endpoints with automatic OpenAPI documentation using Scalar
Built-in Security
Basic authentication and rate limiting (60 requests/minute) to protect your services
Clean Architecture
Follows CQRS pattern with clear separation of concerns using Mediator pattern
Production Ready
Includes structured logging with Serilog, error handling, and response caching
Architecture Overview
The project follows Clean Architecture principles with a clear separation of concerns:Project Structure
The solution consists of three main projects:HGT.EAM.WebServices
The main API project containing:
- Controllers: REST endpoints organized by domain (Accounting, Provision, etc.)
- Queries: CQRS query definitions
- Models: DTOs and request/response models
- Setup: Application configuration and startup logic
HGT.EAM.WebServices.Infrastructure
Core infrastructure components:
- GridCache: SQLite-based caching system
- Base Controllers: Reusable controller logic
- Middlewares: Exception handling, validation, and response formatting
- Query Interfaces: CQRS abstractions
Design Patterns
The project leverages several industry-standard design patterns:CQRS (Command Query Responsibility Segregation)
CQRS (Command Query Responsibility Segregation)
Separates read operations (queries) from write operations (commands) for better scalability and maintainability. All data retrieval uses dedicated query objects and handlers.
Mediator Pattern
Mediator Pattern
Uses the Mediator pattern (via MediatR library) to decouple controllers from business logic. Controllers send queries to handlers without direct dependencies.
Repository Pattern
Repository Pattern
Abstracts data access through the GridCache system, providing a clean interface for data persistence and retrieval.
Dependency Injection
Dependency Injection
Leverages .NET’s built-in DI container for loose coupling and testability throughout the application.
How the Caching System Works
The intelligent caching system significantly improves performance:Initial Request
When a client requests grid data, the system first checks if the data exists in the SQLite cache.
Store and Return
Retrieved data is stored in SQLite cache for future requests and returned to the client.
Cache expiration is configurable via
GridCache.ExpirationMinutes in appsettings.json (default: 60 minutes).API Categories
The API organizes endpoints into logical categories:| Category | Description | Example Endpoints |
|---|---|---|
| Abastecimiento (Provision) | Purchase orders, contracts, and procurement data | /api/provisions/purchase/order, /api/provisions/contracts |
| Contabilidad (Accounting) | Transactions and accounting reports | /api/accounting/transactions, /api/accounting/kardex |
| Cuentas por Pagar | Accounts payable data | /api/accounts-payable/* |
| Control de Gestión | Management and control reports | /api/management/* |
Technology Stack
.NET 9.0
Latest .NET framework for high performance
ASP.NET Core
Web API framework
Mediator
CQRS pattern implementation
Mapster
Fast object-to-object mapping
SQLite
Lightweight caching database
Serilog
Structured logging
Scalar
OpenAPI documentation UI
Entity Framework Core
Data access for cache
Use Cases
HGT EAM WebServices is ideal for:- Web Applications: Build dashboards and reporting tools that need EAM data
- Mobile Apps: Access EAM information through a modern REST API
- Integration Projects: Connect third-party systems to INFOR EAM
- Data Analytics: Extract EAM data for business intelligence and analytics
- Automation: Create automated workflows that interact with EAM data
Next Steps
Quickstart
Get started with installation and your first API call
API Reference
Explore all available endpoints and their parameters