Examples overview
Each page in this section solves one operational problem against the real platform API contracts, with complete implementations in TypeScript (fetch), Python (requests), Go (net/http), and cURL.
| Example | Problem it solves |
|---|---|
| Ingest telemetry | Push records in batches of at most 1,000 and handle partial rejection correctly. |
| Poll topology | Reconstruct fleet state over time with a stepped as_of_utc poller. |
| Fetch predictions | Read SNR predictions for link ids, handling empty results and 429 backoff. |
| Monitor the platform | Health probes plus an authenticated key check, with exit codes for cron and CI. |
| Connection smoke test | The staged health-then-auth flow the console's connection test runs. |
Common setup
Every example reads two environment variables:
export CONSTELLATION_API_BASE="https://api.constellation.space" # or dev/stage/sandbox
export CONSTELLATION_API_TOKEN="<your tenant API key>"
Base URLs per environment are listed in the API overview; keys are environment-specific (Authentication). All authenticated calls send the key as the x-api-key header. Run these from server-side environments; browser origins are CORS-restricted (API overview).
Language notes:
- TypeScript: uses the built-in
fetch, Node 18 or newer, no dependencies. Run withnpx tsx script.tsor compile withtsc. - Python: uses
requests(pip install requests), Python 3.9 or newer. - Go: standard library only, Go 1.21 or newer.
- cURL: plain
curlplusjqfor JSON handling where needed.