Skip to content

Uptime

Returns uptime information about:

  • Hub with either one value or per-day granularity,
  • Single group,
  • Single service.

Uptime is calculated according to following rules:

  • UTC timezone is used,
  • 'degraded-performance' is not counted towards downtime. Only 'down' status is treated as time when service was down,
  • If multiple events affect service in the same time, always worst status is being used for uptime calculation,
  • For group uptime, combination of worst statuses of all services in that group is used. For example, if group has three services and:
    • One was up for the whole time,
    • Second was down for the whole first half of the period (50%),
    • Last service was down for the second half of the period (50%), then group uptime is 0% because there was no time when none of its services were down.
  • For Hub uptime, combination of worst statuses of all services of that Hub is being used.

Retrieve Hub uptime value

Request

Returns uptime for a Hub which is based on uptime of all services in that Hub for a given date range.
Hub is considered up if all of its services are not down. Every time frame when at least one of Hub services is down, is considered as downtime for this Hub.
Maximum length of date range is 18 months.

Security
ApiKeyAuth
Path
subdomainstringrequired

Unique subdomain of requested Hub.

Query
start_datestring, (date)

Start date for uptime calculations.
start_date and end_date range can't be bigger than 18 months.

Example:start_date=2025-01-01
end_datestring, (date)

End date for uptime calculations.
start_date and end_date range can't be bigger than 18 months.

Example:end_date=2025-01-01
api_versionstring

Api version

Value:"V3-R1"
curl -i -X GET \
  'https://subdomain-of-your-account.app.statushub.io/api/v3/hubs/{subdomain}/uptime?start_date=2025-01-01&end_date=2025-01-01&api_version=V3-R1' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
uptimenumber, [ 0 .. 1 ]

Uptime value for the requested period. Value is between 0.0 and 1.0, where 0 means no uptime and 1 means 100% uptime.
Uptime value is always rounded down.

Example:0.9995
Response
{ "uptime": 0.9995 }