API OXIPLAY v2 (TVBox + Raspberry)
Integracion para dispositivos con contrato JSON unificado:
ok, status, code, message, data, request_id.
Base y salud
GET /api- Documentacion API (esta pagina)GET /api/index/ping- Healthcheck JSON
TVBox (auto trial 15 dias)
POST /api/tvbox/check- Auto-registro + configPOST /api/tvbox/heartbeat- Estado operativoPOST /api/tvbox/hardware- Reporte hardware
Si el serial no existe, se crea en trial_active por 15 dias.
Raspberry (pending manual)
POST /api/raspberry/check- Si es nuevo: pendingPOST /api/raspberry/heartbeat- Estado operativoPOST /api/raspberry/hardware- Reporte hardware
Si el serial no existe, se registra en unregistered_devices para activacion manual en panel.
Compatibilidad legacy
POST /api/device/check sigue funcionando temporalmente como alias de TVBox.
Ejemplo: TVBox check
{
"serial": "AA:BB:CC:DD:EE:FF",
"kind": "radio",
"name": "TV Sala 1"
}
Respuesta trial creado
{
"ok": true,
"status": "trial_active",
"code": "TVBOX_TRIAL_CREATED",
"message": "TVBox creado en demo 15 dias",
"data": {
"device_id": 10,
"serial": "AA:BB:CC:DD:EE:FF",
"trial_ends_at": "2026-02-26 12:00:00",
"config": {
"mode": "radio",
"player": "exoplayer"
}
},
"request_id": "..."
}
Ejemplo: Raspberry check nuevo
{
"serial": "RPI4-ABC-0001",
"hostname": "rpi-estudio"
}
Respuesta pending
{
"ok": true,
"status": "pending",
"code": "RPI_PENDING",
"message": "Raspberry pendiente de activacion manual",
"data": {
"serial": "RPI4-ABC-0001",
"register_code": "A1B2C3D4E5F6"
},
"request_id": "..."
}