Skip to content

Get the availability report

GET
/reports/availability
curl --request GET \
--url 'https://app.tunnelhq.com/api/v1/reports/availability?month=2026-10&by=tunnel&family=tunnel&sort=availability&dir=asc&format=csv' \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Project-Id: prj_12'

One month’s availability against the project’s target, as the dashboard’s Reports page shows it. Any role in the project can call it.

  • With by=tunnel, the default, there’s one row per monitor: its availability, how far it is above or below the target (gap), its downtime, incidents and longest outage in minutes, and its average latency.
  • With by=group or by=provider, there’s one row per dashboard group or per hosting provider: how many monitors it has, how many are below the target, their average availability, total downtime and incidents, and the worst one. Monitors with no group are in No group, and those with no provider in No provider set. A tunnel’s provider is set in its Settings in the dashboard, under Hosting provider, or with hosting_provider in Update monitor.
  • Availability is the share of the monitored time that wasn’t downtime, as on the monitor’s own page. Only down time counts against it; time a monitor is paused, in maintenance, not yet checked, or has no data is left out. Downtime is the month’s down incidents, counted inside the month, plus any day in which every check failed and no incident was open, for as long as its failed checks cover. A degraded incident isn’t downtime. Incidents and the longest outage come from the down incidents only.
  • A row with no checks that month has null availability and comes last, whatever the order.
  • totals covers every monitor of the family, whatever by is.

Send Accept: text/csv, or format=csv, for the same rows as a CSV file, the file Export CSV gives on the Reports page.

Need an API key? See Getting an API key.

X-Project-Id
required
string

The project, as prj_12 or 12. A workspace key can only reach its own workspace’s projects.

Example
prj_12
month
string
/^\d{4}-\d{2}$/

The month, as YYYY-MM. Left out, last month. This month works too, with complete set to false. Reports go back 13 months.

by
string
default: tunnel
Allowed values: tunnel group provider

One row per tunnel, per group, or per hosting provider.

family
string
default: tunnel
Allowed values: tunnel uptime all

tunnel for VPN tunnels, uptime for Uptime checks, all for both.

sort
string
default: availability

A column of the rows to sort by, such as availability (the default), downtime_minutes, incidents, or name. A name that isn’t a column is refused with 400, which lists the columns.

dir
string
default: asc
Allowed values: asc desc

asc for lowest first, desc for highest first.

format
string
Allowed values: csv

csv for a CSV file, the same as Accept: text/csv.

The report.

object
month
required
string
month_label
required
string
complete
required

false for the month in progress.

boolean
target
required

The project’s availability target

number
by
required
string
Allowed values: tunnel group provider
family
required
string
Allowed values: tunnel uptime all
totals
required

Every monitor of the family, whatever by is.

object
tunnels

Monitors in the report.

integer
measured

Monitors with checks that month.

integer
availability

The average of the measured monitors.

number | null
below_target
integer
incidents
integer
downtime_minutes
integer
rows
required
Array<object>

With by=tunnel: id, name, group, provider, availability, gap, downtime_minutes, incidents, longest_minutes, avg_ms, and checks. With by=group or by=provider: name, tunnels, below_target, availability, gap, downtime_minutes, incidents, and worst.

object
id

By tunnel only.

string
name

The monitor, the group, or the provider.

string
group

By tunnel only. No group when it’s in none.

string
provider

By tunnel only. No provider set when none is set.

string
availability

Percent, to 3 decimals. null with no checks that month.

number | null
gap

Availability minus the target. Below zero missed it.

number | null
downtime_minutes
integer
incidents
integer
longest_minutes

By tunnel only.

integer
avg_ms

By tunnel only: the average latency.

integer | null
checks

By tunnel only: checks that month.

integer
tunnels

By group or provider: monitors in it.

integer
below_target

By group or provider.

integer
worst

By group or provider: the monitor with the lowest availability.

string
Examples

By tunnel

{
"month": "2026-10",
"month_label": "October 2026",
"complete": true,
"target": 99.9,
"by": "tunnel",
"family": "tunnel",
"totals": {
"tunnels": 2,
"measured": 2,
"availability": 99.712,
"below_target": 1,
"incidents": 3,
"downtime_minutes": 129
},
"rows": [
{
"id": "srv_57",
"name": "sg-vless-01",
"group": "Asia",
"provider": "OVH",
"availability": 99.524,
"gap": -0.376,
"downtime_minutes": 124,
"incidents": 2,
"longest_minutes": 98,
"avg_ms": 141,
"checks": 22310
},
{
"id": "srv_42",
"name": "fra-wg-01",
"group": "Europe",
"provider": "No provider set",
"availability": 99.9,
"gap": 0,
"downtime_minutes": 5,
"incidents": 1,
"longest_minutes": 5,
"avg_ms": 157,
"checks": 14880
}
]
}
X-RateLimit-Limit
integer

Requests the workspace’s plan allows per minute.

X-RateLimit-Remaining
integer

Requests left in the current minute.

X-RateLimit-Reset
integer

Unix time, in seconds, when the current minute ends.

An option isn’t one the report takes, or the X-Project-Id header is missing or malformed.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 400,
"message": "month must look like 2026-10"
}

The API key is missing, wrong, expired, switched off, or no longer valid.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 401,
"message": "API key is required. Provide X-API-Key header or Authorization: Bearer <key>"
}

The key can’t reach this project.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Examples
{
"error": true,
"code": 403,
"message": "This API key is scoped to a different organization"
}

The project doesn’t exist, or your role can’t open it.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 404,
"message": "Project not found"
}

A usage limit was reached, or this IP address made too many requests with a wrong key.

Usage limits are per workspace and plan: per minute (Retry-After: 60), per day (Retry-After: 3600), and per month (no Retry-After). They use their own body shape. An IP address may send 10 wrong keys a minute; one more is allowed every 6 seconds. While that allowance is used up, every request from the address is refused, even one with a valid key.

Media typeapplication/json
One of:
object
error
required
string
Allowed values: Rate limit exceeded Daily limit exceeded Monthly limit exceeded
message
required
string
retry_after

Seconds to wait. Absent for the monthly limit.

integer
Examples
{
"error": "Rate limit exceeded",
"message": "Per-minute limit of 60 requests exceeded",
"retry_after": 60
}
Retry-After
integer

Seconds to wait. 60 for the per-minute limit, 3600 for the daily limit, 6 after wrong keys. Absent for the monthly limit.

Something failed on TunnelHQ’s side.

Media typeapplication/json
object
error
required
boolean
code
required

The HTTP status, repeated.

integer
message
required

What went wrong.

string
details

More detail, on some errors.

retry_after

Seconds to wait, on the 429 for wrong keys.

integer
Example
{
"error": true,
"code": 500,
"message": "Internal server error"
}