Skip to content

Uptime CLI reference

The uptime command lets you manage uptime monitoring checks and view outages.

All uptime commands require --project-id.

Terminal window
hb uptime sites list --project-id 12345

Required flags:

  • --project-id — Project ID

Optional flags:

  • -o, --output — Output format: table or json (default: table)
Terminal window
hb uptime sites get --project-id 12345 --site-id 67890

Required flags:

  • --project-id — Project ID
  • --site-id — Site ID

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb uptime sites create --project-id 12345 --cli-input-json '{
"name": "Production API",
"url": "https://api.example.com/health",
"frequency": 1,
"match_type": "success",
"validate_ssl": true,
"locations": ["us-east", "eu-west"]
}'

Required flags:

  • --project-id — Project ID
  • --cli-input-json — JSON payload (inline string or file://path)

JSON fields:

  • name — Site name
  • url — URL to check
  • frequency — Check frequency in minutes: 1, 5, or 15
  • match_type — How to validate response:
    • success — Any 2xx response
    • exact — Response must exactly match expected string
    • include — Response must contain expected string
    • exclude — Response must not contain expected string
  • locations — Array of check locations
  • validate_ssl — Whether to validate SSL certificates

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb uptime sites update --project-id 12345 --site-id 67890 --cli-input-json '{"frequency": 5}'

Required flags:

  • --project-id — Project ID
  • --site-id — Site ID
  • --cli-input-json — JSON payload with fields to update

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb uptime sites delete --project-id 12345 --site-id 67890

Required flags:

  • --project-id — Project ID
  • --site-id — Site ID

List outages for a site:

Terminal window
hb uptime outages --project-id 12345 --site-id 67890
Terminal window
hb uptime outages --project-id 12345 --site-id 67890 \
--created-after 1704067200 \
--created-before 1706745600 \
--limit 10

Required flags:

  • --project-id — Project ID
  • --site-id — Site ID

Optional flags:

  • --created-after — Unix timestamp for start of range
  • --created-before — Unix timestamp for end of range
  • --limit — Maximum results (default: 25, max: 25)
  • -o, --output — Output format: table or json (default: table)

List recent uptime checks for a site:

Terminal window
hb uptime checks --project-id 12345 --site-id 67890 --limit 25

Required flags:

  • --project-id — Project ID
  • --site-id — Site ID

Optional flags:

  • --created-after — Unix timestamp for start of range
  • --created-before — Unix timestamp for end of range
  • --limit — Maximum results (default: 25, max: 25)
  • -o, --output — Output format: table or json (default: table)