Status badges
A status badge shows whether checks are up. Badges exist for a whole project, for each tag, and for each check. Badge URLs contain the project's secret badge key and never the checks' ping URLs, so a badge can be published without letting anyone ping your checks.
URLs
| URL | Covers | Label |
|---|---|---|
https://staging.crony.sh/badge/<badge key>.<format> | Every check in the project | crony |
https://staging.crony.sh/badge/<badge key>/<tag>.<format> | The checks with that tag | The tag |
https://staging.crony.sh/badge/<badge key>/-/<unique key>.<format> | One check | The check's name |
<format> is svg, json or shields. The project's settings in the dashboard list the URLs of the project badge and of each tag's badge. The management API lists the same URLs:
curl -H "X-Api-Key: $CRONY_API_KEY" https://staging.crony.sh/api/v1/badges/A check's unique key is the unique_key that a read-only API key returns for it, and the unique_key label in the Prometheus metrics.
States
A badge says down when any check it covers is down, and up otherwise. New and paused checks count as up. Add ?late=1 to show late when no check is down but at least one is late.
Formats
svg is an image for a README or a web page. json is for your own scripts and pages:
{"status": "up", "total": 12, "grace": 1, "down": 0}total is the number of checks the badge covers, grace how many are late and down how many are down. shields is an endpoint for a Shields.io badge, so Shields.io can draw it in its own styles:
{"schemaVersion": 1, "label": "crony", "message": "up", "color": "success"}The color is success when up, important when late and critical when down. Every format is sent uncached and can be read from any origin. An unknown badge key or check answers 404. A tag that no check has gives an up badge covering no checks.