Uptime CLI reference
The uptime command lets you manage uptime monitoring checks and view outages.
All uptime commands require --project-id.
Managing uptime sites
Section titled “Managing uptime sites”List sites
Section titled “List sites”hb uptime sites list --project-id 12345Required flags:
--project-id— Project ID
Optional flags:
-o, --output— Output format:tableorjson(default:table)
Get site details
Section titled “Get site details”hb uptime sites get --project-id 12345 --site-id 67890Required flags:
--project-id— Project ID--site-id— Site ID
Optional flags:
-o, --output— Output format:textorjson(default:text)
Create a site
Section titled “Create a site”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 orfile://path)
JSON fields:
name— Site nameurl— URL to checkfrequency— Check frequency in minutes:1,5, or15match_type— How to validate response:success— Any 2xx responseexact— Response must exactly match expected stringinclude— Response must contain expected stringexclude— Response must not contain expected string
locations— Array of check locationsvalidate_ssl— Whether to validate SSL certificates
Optional flags:
-o, --output— Output format:textorjson(default:text)
Update a site
Section titled “Update a site”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:textorjson(default:text)
Delete a site
Section titled “Delete a site”hb uptime sites delete --project-id 12345 --site-id 67890Required flags:
--project-id— Project ID--site-id— Site ID
View outages
Section titled “View outages”List outages for a site:
hb uptime outages --project-id 12345 --site-id 67890With time filters
Section titled “With time filters”hb uptime outages --project-id 12345 --site-id 67890 \ --created-after 1704067200 \ --created-before 1706745600 \ --limit 10Required 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:tableorjson(default:table)
View check history
Section titled “View check history”List recent uptime checks for a site:
hb uptime checks --project-id 12345 --site-id 67890 --limit 25Required 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:tableorjson(default:table)