Skip to content

Add /api/intelligence/status endpoint for adapter configuration visibility#5

Open
railway-app[bot] wants to merge 1 commit intohosting-railwayfrom
railway/code-change-aqWKVl
Open

Add /api/intelligence/status endpoint for adapter configuration visibility#5
railway-app[bot] wants to merge 1 commit intohosting-railwayfrom
railway/code-change-aqWKVl

Conversation

@railway-app
Copy link
Copy Markdown

@railway-app railway-app Bot commented Apr 28, 2026

Summary

Adds a new GET /api/intelligence/status endpoint that returns detailed operational status for every intelligence adapter rail (news, conflict, flights, health, stocks, commodities, mood, weather, currency). Each adapter entry includes a machine-readable status token ("active", "missing_key", "rate_limited", "error", "unavailable"), a human-readable message ("Live", "Missing API key", "Rate limited — try again later", etc.), the last error string, last successful poll timestamp, and event count from the most recent cycle. The response also probes Postgres and Redis connectivity so the frontend can distinguish infrastructure failures from adapter-level issues. The shared _adapter_status_message helper is also wired into the existing /health endpoint so its AdapterHealthModel gains the same message field, keeping both endpoints consistent.

Changes

  • Modified backend/app/intelligence/routes/intelligence.py

Generated by Railway

@railway-app railway-app Bot temporarily deployed to pacific-grace / production April 28, 2026 04:03 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants