Welcome to the ServiceBench Bot API. Server is running on port 1017
/system_status - Get comprehensive system status
curl http://localhost:1017/system_status
# Response:
{
"status": "success",
"job_processing": {
"status": "stopped",
"queue_size": 0,
"processing_active": false
},
"claim_processing": {
"status": "stopped",
"queue_size": 0,
"processing_active": false
}
}
/unassigned_jobs - Submit unassigned jobs
curl -X POST http://localhost:1017/unassigned_jobs \
-H "Content-Type: application/json" \
-d '{
"jobs": ["SNWT123456", "SNWT789012"],
"workers": 2
}'
/start_processing - Start job processing
curl -X POST http://localhost:1017/start_processing \
-H "Content-Type: application/json" \
-d '{"workers": 2}'
/queue_status - Get queue status
/stop_job_workers - Stop job workers
/close_and_claim - Submit close & claim items
curl -X POST http://localhost:1017/close_and_claim \
-H "Content-Type: application/json" \
-d '{
"items": ["SNWT123456", "CNWT789012"],
"workers": 2
}'
/close_and_claim_status - Get close & claim status
/stop_claim_workers - Stop claim workers
/stop_all_workers - Stop all workers
/calculate_distance - Calculate distance
curl -X POST http://localhost:1017/calculate_distance \
-H "Content-Type: application/json" \
-d '{
"origin": "123 Main St, City, State",
"destination": "456 Oak Ave, City, State"
}'
/distance_health - Distance service health
These endpoints leverage the new enhanced modules for better performance and monitoring.
/enhanced_status - Get comprehensive status with performance metrics
Not yet implemented
# Add to api/server.py:
from automation.job_processing_enhanced import get_job_processing_metrics
from automation.notifications_enhanced import notification_router
from automation.core_enhanced import failed_items_cache_enhanced
@app.route('/enhanced_status')
def enhanced_status():
return jsonify({
'performance': get_job_processing_metrics(),
'notifications': notification_router.get_stats(),
'cache': failed_items_cache_enhanced.get_cache_stats()
})
/performance_metrics - Get detailed performance metrics
Not yet implemented
/notification_stats - Get notification statistics
Not yet implemented
/cache_stats - Get cache statistics with TTL info
Not yet implemented
/test_notification - Test smart notification system
Not yet implemented
curl -X POST http://localhost:1017/test_notification \
-H "Content-Type: application/json" \
-d '{
"message": "Test smart notification",
"severity": "info",
"category": "test"
}'
ENHANCED_FEATURES_GUIDE.md in the project roottest_enhanced_features.py and test_api_enhanced.pyjob_assignments.logServiceBench Bot API v1.0 | Built with Flask | Enhanced with Smart Features