REST API for extracting analytics data from Fadaat Ottera platform
📊 View Progress Monitor/progress
🆕 Real-time progress monitor - View extraction jobs with live updates
/api/health
Check API health status
/api/config
Get current configuration
/api/config
Update configuration
{
"startDate": "2025/05/01",
"endDate": "2025/06/01",
"channelName": "Syria TV - تلفزيون سوريا",
"timezone": "UTC+03",
"headlessMode": true
}
/api/extract
Start analytics extraction with JSON body
/api/extract
🆕 Direct CSV download with query parameters (waits and returns file)
/api/jobs
Get all jobs
/api/jobs/:jobId
Get specific job status (add ?includeLogs=true for logs)
/api/download/:jobId
Download result CSV file
/api/jobs/:jobId
Cancel running job
/api/channels
Get available channels
/api/timezones
Get available timezones
# Direct CSV download (GET - waits and returns file directly)
curl "http://localhost:3000/api/extract?startDate=2025/05/01&endDate=2025/06/01&channelName=Syria TV - تلفزيون سوريا&timezone=UTC+03" -o analytics.csv
# Async job mode (GET with async=true)
curl "http://localhost:3000/api/extract?startDate=2025/05/01&endDate=2025/06/01&async=true"
# Async job mode (POST with JSON)
curl -X POST http://localhost:3000/api/extract \
-H "Content-Type: application/json" \
-d '{
"startDate": "2025/05/01",
"endDate": "2025/06/01",
"channelName": "Syria TV - تلفزيون سوريا",
"timezone": "UTC+03"
}'
# Check job status (for async mode)
curl http://localhost:3000/api/jobs/JOB_ID
# Download result (for async mode)
curl http://localhost:3000/api/download/JOB_ID -o result.csv
📥 NEW: GET requests now return CSV files directly! Just visit the URL:
http://localhost:3000/api/extract?startDate=2025/05/01&endDate=2025/06/01&channelName=Syria TV - تلفزيون سوريا&timezone=UTC+03
✅ File will be downloaded automatically when extraction completes!
🆕 NEW: Real-time progress monitoring with live updates!