🤖 ServiceBench Bot API Documentation Checking...

Welcome to the ServiceBench Bot API. Server is running on port 1017

🔍 System Status

GET /system_status - Get comprehensive system status
View Example
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
  }
}

📋 Job Processing

POST /unassigned_jobs - Submit unassigned jobs
View Example
curl -X POST http://localhost:1017/unassigned_jobs \
  -H "Content-Type: application/json" \
  -d '{
    "jobs": ["SNWT123456", "SNWT789012"],
    "workers": 2
  }'
POST /start_processing - Start job processing
View Example
curl -X POST http://localhost:1017/start_processing \
  -H "Content-Type: application/json" \
  -d '{"workers": 2}'
GET /queue_status - Get queue status
POST /stop_job_workers - Stop job workers

💰 Close & Claim

POST /close_and_claim - Submit close & claim items
View Example
curl -X POST http://localhost:1017/close_and_claim \
  -H "Content-Type: application/json" \
  -d '{
    "items": ["SNWT123456", "CNWT789012"],
    "workers": 2
  }'
GET /close_and_claim_status - Get close & claim status
POST /stop_claim_workers - Stop claim workers

🎛️ Control

POST /stop_all_workers - Stop all workers

📍 Distance Service

POST /calculate_distance - Calculate distance
View Example
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"
  }'
GET /distance_health - Distance service health

✨ Enhanced Features New

These endpoints leverage the new enhanced modules for better performance and monitoring.

GET /enhanced_status - Get comprehensive status with performance metrics Not yet implemented
Implementation Guide
# 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()
    })
GET /performance_metrics - Get detailed performance metrics Not yet implemented
GET /notification_stats - Get notification statistics Not yet implemented
GET /cache_stats - Get cache statistics with TTL info Not yet implemented
POST /test_notification - Test smart notification system Not yet implemented
View Example
curl -X POST http://localhost:1017/test_notification \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Test smart notification",
    "severity": "info",
    "category": "test"
  }'

📚 Additional Resources

ServiceBench Bot API v1.0 | Built with Flask | Enhanced with Smart Features