poll_http
Retrieve JSON data via HTTP GET or POST to feed live charts. Supports authenticated presets and public URLs without exposing credentials.
Instructions
Fetch JSON from an HTTP endpoint. Used by render_live_chart to poll external APIs. No presets configured. Use "preset" for authenticated APIs (credentials stored server-side in env vars, never exposed). Use "url" only for public APIs that need no authentication. NEVER pass API keys or tokens in the "headers" argument - configure a preset instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preset | No | Named preset that maps to a pre-configured URL + auth headers. No presets configured. Configure via env vars: POLL_PRESET_<NAME>_URL and POLL_PRESET_<NAME>_HEADERS (JSON object). | |
| url | No | Direct URL to fetch (public APIs only - no auth needed) | |
| headers | No | Extra HTTP headers (public APIs only - NEVER put API keys here) | |
| method | No | HTTP method. Default: GET | |
| body | No | Request body for POST requests |