Overview
The Dashboard API provides aggregated analytics from the same filtered dataset used in global search, ensuring consistency between tabular and visual data.API Endpoint
POST /centro_consulta/busqueda-global-graficas/
operaciones/views/centro_consulta.py
Request Format
Uses the same filter structure as global search:Dashboard Data Structure
Response Schema
Query Execution
operaciones/views/centro_consulta.py
Batch Processing: Uses
fn_ejecutar_query_sql_lotes() for memory-efficient processing of large datasets.Aggregation Logic
operaciones/views/centro_consulta.py
Dashboard Metrics
Totales Generales (General Totals)
cargados
cargados
Documents with valid file attachments (archivo length > 5)
pendientes
pendientes
Documents without valid file attachments
no_aplica
no_aplica
Documents with status ID 14 or document type “NO APLICA”
Distribución Origenes (Origin Distribution)
Breakdown by data source:- PTE: Technical-economic proposals
- OT: Work orders
- PROD: Production records (monthly reports + GPU)
Rendimiento Lideres (Leader Performance)
For each project leader:- Documents delivered (cargados)
- Documents pending (pendientes)
- Documents not applicable (no_aplica)
Tipos Documentos (Document Types)
Aggregation by document name:- PROPUESTA TECNICA
- CONTRATO
- REPORTE MENSUAL
- etc.
Estatus Clientes (Client Status)
Delivery metrics per client organization.Embudo Estatus (Status Funnel)
Count of records in each workflow status:- EN REVISION
- APROBADO
- RECHAZADO
- etc.
Frentes OT (OT Fronts)
Distribution across operational fronts (OT and PROD only):- PATIO
- EMBARCACION
- PLATAFORMA
Sitios OT (OT Sites)
Distribution across work sites with two modes:- By Front Mode
- Free Mode
Sites grouped by their primary front assignment:
Avance Folios (Folio Progress)
Document completion tracking per work order or PTE folio.Production Information Dashboard
Separate endpoint for production-specific analytics:POST /centro_consulta/busqueda-prod-info/
operaciones/views/centro_consulta.py
Production Dashboard Aggregations
operaciones/views/centro_consulta.py
Production Metrics: Includes financial totals (importe_producido), project counts, and time-series data for trend analysis.
Visualization Recommendations
Pie Chart
distribucion_origenesShow proportion of data from PTE, OT, and PROD sources
Bar Chart
rendimiento_lideres, tipos_documentosCompare performance across leaders or document types with stacked bars (cargados/pendientes/no_aplica)
Funnel Chart
embudo_estatusVisualize workflow progression through status stages
Table/Grid
avance_foliosDetailed per-folio progress tracking
Best Practices
Consistent Filters
Use identical filter payloads for search and dashboard APIs to ensure data consistency.
Special Status Handling
Status ID 14 (“NO APLICA”) has special semantics. Consider displaying separately or with distinct styling.
Related Resources
Global Search
Detailed search with same filter system
Reports & Export
Generate reports from filtered data
Query Center Overview
Architecture and data sources