poll_http
Fetch JSON data from HTTP endpoints to power live charts and dashboards. Use preset configurations for authenticated APIs or direct URLs for public data sources.
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
TableJSON 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 |