Skip to main content

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:
1

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
2

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
3

HGT.EAM.WebServices.Conector

INFOR EAM integration layer:
  • IEamGridFetcher: Interface for fetching EAM grid data
  • EAM Models: Domain models for EAM entities
  • SOAP Client: Communication with INFOR EAM web services

Design Patterns

The project leverages several industry-standard design patterns:
Separates read operations (queries) from write operations (commands) for better scalability and maintainability. All data retrieval uses dedicated query objects and handlers.
Uses the Mediator pattern (via MediatR library) to decouple controllers from business logic. Controllers send queries to handlers without direct dependencies.
Abstracts data access through the GridCache system, providing a clean interface for data persistence and retrieval.
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:
1

Initial Request

When a client requests grid data, the system first checks if the data exists in the SQLite cache.
2

Cache Miss

If data is not found or has expired, the system fetches it from INFOR EAM SOAP services.
3

Store and Return

Retrieved data is stored in SQLite cache for future requests and returned to the client.
4

Subsequent Requests

Future requests for the same data are served directly from cache, providing near-instant responses.
Cache expiration is configurable via GridCache.ExpirationMinutes in appsettings.json (default: 60 minutes).

API Categories

The API organizes endpoints into logical categories:
CategoryDescriptionExample 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 PagarAccounts payable data/api/accounts-payable/*
Control de GestiónManagement 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
This project is designed for internal use at HGT (SAAM Terminals) and requires valid INFOR EAM credentials to function.

Next Steps

Quickstart

Get started with installation and your first API call

API Reference

Explore all available endpoints and their parameters

Build docs developers (and LLMs) love