GET /api/components/export/view
Retrieves paginated tracking data for viewing. This endpoint is designed for administrative interfaces and dashboards where you need to display tracking records with pagination.Endpoint
Headers
Bearer token for authenticationFormat:
Bearer <jwt_token>Obtain the token from /api/auth/login or /api/auth/register endpoints (see Authentication)Query Parameters
Page number to retrieve
- Minimum value: 1
- Invalid values are coerced to 1
- Used to navigate through paginated results
Number of records per page
- Minimum value: 1
- Maximum value: 25
- Default: 10
- Values outside this range are coerced to the nearest valid value
Response Fields
Indicates if the export was retrieved successfully
Array of tracking records for the current page
Pagination metadata
Response Example
200 - Success
Example Requests
Error Codes
| Code | Message | Cause |
|---|---|---|
401 | Token no proporcionado | Authorization header is missing |
401 | Token inválido | JWT token is expired or malformed |
500 | Error interno del servidor | Database error or query failure |
GET /api/components/export
Retrieves all tracking data without pagination. This endpoint is designed for full data exports, analytics processing, or backup purposes.Endpoint
Headers
Bearer token for authenticationFormat:
Bearer <jwt_token>Obtain the token from /api/auth/login or /api/auth/register endpoints (see Authentication)Response Fields
Indicates if the export was retrieved successfully
Array of all tracking records (sorted by timestamp, newest first)
Response Example
200 - Success
Example Request
Error Codes
| Code | Message | Cause |
|---|---|---|
401 | Token no proporcionado | Authorization header is missing |
401 | Token inválido | JWT token is expired or malformed |
500 | Error interno del servidor | Database error or query failure |
Performance Considerations
Use Cases
Export View (Paginated)
- Admin Dashboards: Display tracking data in tables with pagination controls
- Real-time Monitoring: View recent interactions with manageable page sizes
- Data Exploration: Navigate through records interactively
- UI Components: Integrate with data tables and list components
Export (Full)
- Data Backup: Export complete dataset for archival purposes
- Analytics Processing: Download all data for analysis in external tools
- Reporting: Generate comprehensive reports across all tracking data
- Data Migration: Transfer data between systems or environments
- Machine Learning: Export datasets for training or analysis
Implementation Details
- Records are sorted by timestamp in descending order (most recent first)
- The paginated view populates only the user’s name (tracking.service.ts:82)
- The full export populates user name and email (tracking.service.ts:113)
- Maximum page size is capped at 25 records to prevent abuse (components.controller.ts:49)
- Invalid page/limit values are automatically corrected (components.controller.ts:48-49)