Introduction
This page documents the maintenance data model in GIMA, including preventive, corrective, and predictive maintenance activities. Maintenance records track work performed on assets throughout their lifecycle.Maintenance Model
Maintenance records (mantenimientos) represent work orders and activities performed on assets. Each maintenance:- Is associated with a specific activo (asset)
- Has a supervisor who oversees the work
- Includes a tecnico_principal (lead technician) responsible for execution
- Contains multiple sesiones (work sessions) tracking actual work performed
- Can be linked to a reporte (failure report) for corrective maintenance
- Tracks tipo (maintenance type), estado (status), and costo_total (total cost)
Maintenance Types
Scheduled preventive maintenance to avoid failures
Corrective maintenance to fix reported failures
Predictive maintenance based on condition monitoring
Maintenance States
Maintenance is scheduled but not yet started
Maintenance is currently in progress
Maintenance work has been completed
Maintenance was cancelled
Maintenance Workflow
1. Preventive Maintenance
2. Corrective Maintenance
Authentication & Authorization
All maintenance endpoints require authentication:Role Requirements
- View maintenance:
tecnico,supervisor,admin - Create maintenance:
supervisor,admin - Assign technicians:
supervisor,admin - Update work sessions:
tecnico,supervisor,admin - Validate completion:
supervisor,admin - Cancel maintenance:
supervisor,admin
Technicians can only view and update maintenance assigned to them
Maintenance Structure
Complete Maintenance Record
Key Concepts
Work Sessions
Maintenance work is tracked through sessions (sesiones_mantenimiento):- Each session records actual work performed by a technician
- Tracks hours worked, costs, and detailed observations
- Multiple technicians can contribute to the same maintenance
- Total maintenance cost is the sum of all session costs
Validation Process
Cost Tracking
Costs are accumulated at two levels:- Session Level: Each work session has its own
costo_total - Maintenance Level: Total cost aggregates all session costs
Common Patterns
Creating Corrective Maintenance from Report
Creating Preventive Maintenance
Preventive maintenance does not require a reporte_id (it’s nullable)
Base URL
All maintenance endpoints use the technical zone prefix:Related Resources
Maintenance Sessions
Track work sessions and technician time
Assets API
Manage the assets being maintained
Reports API
Handle failure reports that trigger maintenance