Skip to main content

Introduction

Assets (activos) in GIMA represent physical items like equipment and furniture that require maintenance and tracking. This page documents the asset data model and relationships.
Note: Direct CRUD endpoints for assets are not yet implemented in the current version. Asset management is currently performed through the database models. Future versions will expose RESTful endpoints for asset operations.

Asset Model

Assets in GIMA represent physical items that require maintenance and tracking. Each asset:
  • Is associated with an articulo (item definition) that describes what it is
  • Has a ubicacion (location) indicating where it is physically located
  • Maintains a estado (status) tracking its operational state
  • Includes valor (value) for financial tracking
  • Links to maintenance records and failure reports

Asset States

Assets can be in one of the following states:
operativo
string
Asset is operational and in active use
mantenimiento
string
Asset is currently undergoing maintenance
fuera_servicio
string
Asset is out of service but not decommissioned
baja
string
Asset has been decommissioned

Common Patterns

Asset Relationships

Assets are connected to multiple entities:
{
  "id": 1,
  "articulo_id": 5,
  "ubicacion_id": 3,
  "estado": "operativo",
  "valor": 15000.00,
  "articulo": {
    "id": 5,
    "tipo": "equipo",
    "marca": "Dell",
    "modelo": "Latitude 5420",
    "descripcion": "Laptop para desarrollo"
  },
  "ubicacion": {
    "id": 3,
    "edificio": "Edificio A",
    "piso": "3",
    "salon": "301"
  }
}

Asset Lifecycle

  1. Creation: Asset is registered with initial status operativo
  2. Operation: Asset is used in daily operations
  3. Maintenance: When maintenance is needed, status changes to mantenimiento
  4. Issues: Failure reports can be created for the asset
  5. Decommission: Asset status changes to baja when retired

Authentication & Authorization

All asset endpoints require authentication with a Bearer token:
Authorization: Bearer {token}

Role Requirements

Different operations require specific roles:
  • View assets: All authenticated users
  • Create/Update assets: admin, supervisor
  • Delete assets: admin only
  • Change asset status: admin, supervisor, tecnico

Base URL

All API endpoints are prefixed with:
/api/

Asset CRUD

Create, read, update, and delete assets

Maintenance API

Manage maintenance records for assets

Reports API

Create and track failure reports

Build docs developers (and LLMs) love