cURL
curl --request GET \ --url https://onlyautomator.com/api/account/test
{ "success": true, "message": "Service operational", "timestamp": "2023-09-15T14:32:45Z", "version": "1.0.2" }
Check if the service is operational
{ "success": false, "message": "Service temporarily unavailable", "timestamp": "2023-09-15T14:32:45Z" }
// Available URLs: // - Local development: http://localhost:3000/api/account/test // - Alternative local: http://localhost:3001/api/account/test // - Production: https://onlyautomator.com/api/account/test // Example: Check the service status const checkServiceStatus = async () => { try { const baseUrl = 'http://localhost:3000'; // or 'https://onlyautomator.com' const response = await fetch(`${baseUrl}/api/account/test`, { method: 'GET', headers: { 'Content-Type': 'application/json' } }); const data = await response.json(); if (data.success) { console.log(`Service operational. Version: ${data.version}`); } else { console.log(`Service unavailable: ${data.message}`); } return data.success; } catch (error) { console.error('Error checking service status:', error); return false; } }; // Usage in a monitoring system const monitorService = () => { // Check every 5 minutes setInterval(async () => { const isOperational = await checkServiceStatus(); if (!isOperational) { // Alert administrator sendAlert('The API service is unavailable!'); } }, 5 * 60 * 1000); };
Service is operational
true
"Service operational"
"2023-09-15T14:32:45Z"
"1.0.2"