Skip to main content
This endpoint requires authentication. Include a valid Bearer token in the Authorization header.

Request

GET /api/tickets/dashboard-metricas No request body or query parameters. The response is automatically filtered based on the role and area stored in your JWT token. This endpoint returns richer data than the ticket dashboard, including full requester details, SLA timestamps, and subcategory information. It is intended for reporting and analytics use cases.

Role-based filtering

RoleTickets returned
ADMINAll tickets across all areas.
MESAAll tickets across all areas.
AREAOnly tickets assigned to your area.
Results are sourced from the database function fn_dashboard_metricas_filtrado.

Response

Returns a 200 OK with an array of detailed ticket metric objects.
uuid
string
required
Internal UUID of the ticket.
ticket_label
string
required
Human-readable ticket reference (e.g. TKT-2026-00042).
solicitante_nombre
string
required
Full name of the requester.
solicitante_email
string
required
Email address of the requester.
tipo_solicitud
string
required
Request type (e.g. INCIDENTE, PETICION).
categoria
string
required
Category the ticket was filed under.
subcategoria
string
Subcategory for finer-grained classification, if provided.
asunto
string
Short subject line of the ticket, if provided.
area_asignada
string
required
Name of the area the ticket is currently assigned to.
prioridad
string
required
Priority level name (e.g. ALTA, MEDIA, BAJA).
sla_horas
number
required
Total SLA hours allocated to this ticket based on its priority.
estado
string
required
Current status of the ticket (e.g. ABIERTO, EN_PROCESO, CERRADO).
creado_en
string
required
ISO 8601 timestamp of when the ticket was created.
actualizado_en
string
required
ISO 8601 timestamp of the last update to the ticket.
fecha_limite_sla
string
required
ISO 8601 timestamp of the SLA deadline.
horas_restantes_sla
number
required
Floating-point number of hours remaining before the SLA deadline. Negative values indicate an overdue ticket.
sla_vencido
boolean
required
true if the SLA deadline has passed, false otherwise.

Error codes

StatusDescription
401Missing or invalid authentication token.
curl --request GET \
  --url https://api.example.com/api/tickets/dashboard-metricas \
  --header 'Authorization: Bearer <your_token>'
[
  {
    "uuid": "e3b2c1d4-5a6f-7890-abcd-ef1234567890",
    "ticket_label": "TKT-2026-00042",
    "solicitante_nombre": "Ana García",
    "solicitante_email": "[email protected]",
    "tipo_solicitud": "INCIDENTE",
    "categoria": "Sistemas",
    "subcategoria": "Correo electrónico",
    "asunto": "No puedo acceder al correo corporativo",
    "area_asignada": "TECNOLOGIA",
    "prioridad": "ALTA",
    "sla_horas": 4,
    "estado": "EN_PROCESO",
    "creado_en": "2026-03-24T09:15:00Z",
    "actualizado_en": "2026-03-24T10:30:00Z",
    "fecha_limite_sla": "2026-03-24T13:15:00Z",
    "horas_restantes_sla": 2.75,
    "sla_vencido": false
  }
]

Build docs developers (and LLMs) love