Health & Status
Endpoints for checking the health and status of various services in the FYI Automation Tool.
Health Check
GET /api/health
Returns the overall health status of the backend server.
Response:
{
"status": "ok",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 123.45,
"version": "1.0.0"
}
AI Services Health
GET /api/automation/health
Checks the health of automation services (automation, NLP pool stub, vision).
Response:
{
"success": true,
"health": {
"status": "ok",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 123.45,
"services": {
"automation": true,
"nlp": true,
"vision": true
}
},
"message": "All automation services are healthy"
}
GET /api/automation/status
Gets the current automation status (LLM-based analysis removed).
Response:
{
"success": true,
"status": {
"ready": true,
"moonDream": true,
"deviceConnected": true,
"errors": [],
"timestamp": "2024-01-01T00:00:00.000Z",
"version": "1.0.0"
},
"message": "Automation system is ready"
}
GET /api/automation/validate
Validates automation readiness (vision + device connectivity).
Response:
{
"success": true,
"validation": {
"ready": true,
"moonDream": true,
"deviceConnected": true,
"errors": []
},
"message": "All automation services are available"
}
GET /api/automation/validate/:service
Validates a specific automation service.
Parameters:
service:nlporvision
Response:
{
"success": true,
"service": "vision",
"available": true,
"info": {
"available": true,
"endpoint": "http://localhost:20200"
},
"message": "VISION service is available"
}
Screen Mirroring Health
GET /api/scrcpy/health
Checks the health of the screen mirroring service.
Response:
{
"status": "ok",
"scrcpy": {
"version": "2.0",
"available": true
}
}