This project is a PHP-based endpoint that exposes a REST API to retrieve the most recent entries from the fiberprodata
database. It fetches the latest 10 records from the onu_datos
table and returns them in JSON format, allowing easy integration with monitoring systems, dashboards, or other tools.
// PDO database connection
// Query latest 10 records
// Error handling with HTTP status and JSON response
{
"status": "success",
"count": 10,
"data": [
{
"id": "48156200",
"snmpindexonu": "4194340352.14",
"act_susp": "1",
"host": "PTP-17",
"snmpindex": "4194340352",
"slotportonu": "4/14",
"onudesc": "74647113",
"serialonu": null,
"fecha": "2025-06-09 19:04:42",
"onulogico": "14"
}
]
}
``` php rest-api mysql pdo json network-monitoring api-endpoint fiber-network telecom backend data-query snmp dashboard-integration