Prerequisites
Before you begin, ensure you have the following installed and configured:.NET 9.0 SDK
Download from dotnet.microsoft.com
SQL Server
Required for business database connections (optional for basic testing)
INFOR EAM Access
Valid credentials for INFOR EAM Web Services
Code Editor
Visual Studio 2022, VS Code, or JetBrains Rider
The SQLite cache database is created automatically on first run - no manual database setup required!
Installation
Restore Dependencies
Restore all NuGet packages:This will download all required packages including:
- ASP.NET Core 9.0
- Entity Framework Core 9.0
- Mediator.SourceGenerator
- Scalar.AspNetCore 2.11.0
- AspNetCore.Authentication.Basic
Configuration
Configure the application by editingappsettings.json in the HGT.EAM.WebServices project:
- EAM Connection
- Grid Configuration
- Cache Settings
- Authentication
Configure your INFOR EAM connection settings:
appsettings.json
Running the Application
Start the Application
Run the project using the .NET CLI:Or if you’re already in the project directory:The application will start and display the listening URLs (typically https://localhost:5001).
Verify Startup
Check the console output for successful startup messages:The SQLite cache database will be created automatically on first run.
Access API Documentation
Open your browser and navigate to the Scalar documentation interface:You’ll see an interactive API reference with all available endpoints, organized by category:
- Abastecimiento (Provision)
- Contabilidad (Accounting)
- Cuentas por Pagar (Accounts Payable)
- Control de Gestión (Management)
Making Your First API Call
Let’s make a request to fetch accounting transactions:Understanding the Parameters
The API uses common query parameters across most endpoints:Filter type for data retrieval:
1= Previous day2= Previous month3= Current month4= Last year5= Custom month/year (requires Month and Year parameters)
Page number for pagination (starts at 1)
Number of records per page (if not specified, uses EAMDefaultRecords from config)
Specific month (1-12) - required when TypeFilter is 5
Specific year - required when TypeFilter is 5
Example Response
Successful requests return a standardized response structure:Testing Different Endpoints
Try these common endpoints to explore the API:- Provision
- Accounting
Purchase OrdersContractsPurchase Order Audit
All endpoints support response caching with a 15-minute (900 seconds) cache duration. Subsequent identical requests will return cached results for faster response times.
Rate Limiting
The API implements rate limiting to prevent abuse:- Limit: 60 requests per minute
- Per: Authenticated user or IP address (for anonymous requests)
- Response: HTTP 429 (Too Many Requests) when limit exceeded
Rate Limit Response
Troubleshooting
401 Unauthorized
401 Unauthorized
Cache Not Working
Cache Not Working
Problem: Data is not being cached or cache is staleSolutions:
- Delete the SQLite cache database:
rm gridcache.db - Check
GridCache.Enabledis set totruein configuration - Verify the cache directory has write permissions
- Check logs for Entity Framework errors
Cannot Connect to INFOR EAM
Cannot Connect to INFOR EAM
Problem: API cannot reach INFOR EAM servicesSolutions:
- Verify
EAMBaseUrlis correct and accessible from your network - Check EAM credentials are valid
- Ensure firewall allows outbound SOAP connections
- Test EAM endpoint directly using a SOAP client
Empty or Invalid Grid Data
Empty or Invalid Grid Data
Problem: API returns empty results or errorsSolutions:
- Verify
GridIdandDataSpyIdsare correct for your EAM configuration - Check that the user has permissions to access the grid in EAM
- Review Serilog logs for detailed error messages
- Confirm the
UserFunctionmatches the EAM grid’s function code
Next Steps
API Reference
Explore detailed documentation for all endpoints
Configuration Guide
Learn about advanced configuration options
Architecture
Understand the project structure and design patterns
Setup Guide
Learn about deployment and production setup
Congratulations! You’ve successfully set up HGT EAM WebServices and made your first API call.