Connection smoke test
Use the common setup and a key with topology:read. This check makes one request at each stage and stops on the first HTTP or transport failure. It also fails on a degraded health body, even if HTTP liveness returns 200. It does not retry.
#!/usr/bin/env bash
set -euo pipefail
: "${CONSTELLATION_API_BASE:?Set the API base URL}"
: "${CONSTELLATION_API_TOKEN:?Set a key with topology:read}"
base="${CONSTELLATION_API_BASE%/}"
for path in /health /health/telemetry /health/topology; do
printf '\nChecking %s\n' "$path"
curl --fail-with-body --connect-timeout 10 --max-time 30 -sS \
"$base$path" | jq -e '
.status == "ok" and (.checks | type == "object") and
([.checks[] | .ok == true] | all)
'
done
printf '\nChecking authenticated topology access\n'
curl --fail-with-body --connect-timeout 10 --max-time 30 -sS \
-H "x-api-key: $CONSTELLATION_API_TOKEN" \
"$base/topology?freshness_seconds=900" | jq .
Health checks establish reachability and subsystem status. Inspect their response bodies for readiness details. A successful topology request establishes authenticated access. Inspect simulation metadata and verify a known entity and sample to establish telemetry delivery.
On 401 or 403, correct the key or access configuration before rerunning. On 429, follow Errors and limits and wait the full server-provided delay.