Skip to content

Get a server incident

GET
/hosts/incidents/{id}
curl --request GET \
--url https://app.tunnelhq.com/api/v1/hosts/incidents/hin_12 \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Project-Id: prj_12'

One server incident, as its page on Incidents shows it: its servers, who acknowledged it, and its timeline, with when servers joined, where its messages went, notes, and who resolved it. For users from a country gone, it also has each server’s users before and when they left, who still has those users, what our tests saw, the hosting providers, and last week’s users at this hour. A count under 11 is never given: it reads “under 11”.

Any role in the project can call it. The timeline names a channel for a role that can edit monitors, and gives only its kind, such as Slack, to other roles.

Need an API key? See Getting an API key.

id
required
string

The server incident, as hin_12 or 12, from List server incidents.

Example
hin_12
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

The incident.

Media typeapplication/json
object
incident
required

One server incident as its page shows it.

object
id
string
kind

offline: it stopped reporting. service: a service stopped. resource: CPU, memory or disk above its level. country: users from one country gone. cert: its certificate expires soon. watch: a watch someone set. internet: its internet keeps breaking.

string
Allowed values: offline service resource country cert watch internet
subject

The service, metric (cpu, memory, disk) or country code, when the kind has one.

string | null
state
string
Allowed values: open resolved
opened_at
string | null format: date-time
sent_at

When its message went. Servers failing together share one message.

string | null format: date-time
resolved_at
string | null format: date-time
acknowledged
boolean
acknowledged_at
string | null format: date-time
acknowledged_by

The email of who acknowledged it.

string | null
servers
Array<object>
object
id
string
name
string
back
boolean
detail

What the message was built from, such as a certificate’s expiry and names.

object
still_have

Country incidents only: the servers that still have users from the country, 11 or more each.

Array<object>
object
id
string
name
string
users
integer
tests

Country incidents only: what our tests of the servers saw, in a sentence.

string | null
acknowledgement_note
string | null
resolved_by

The email of who resolved it by hand. null when it closed by itself.

string | null
silenced

Nobody was told: a shutdown, or every alert switched off.

boolean
shutdown

Every server with users from the country lost them at once, at two or more hosting providers: a shutdown, not a block.

boolean
can_resolve

true for an open country incident: only those can be resolved by hand.

boolean
last_report_at

The newest report from any of its servers.

string | null format: date-time
servers
Array<object>
object
id
string
name
string
back
boolean
back_at
string | null format: date-time
joined_at
string | null format: date-time
before

Country incidents only: its users from the country before they left, 30 or more.

integer | null
left_at

Country incidents only: when they left.

string | null format: date-time
provider

Country incidents only: its hosting provider, from its linked tunnels.

string | null
under

Country incidents only: counts below this are never given.

integer
Allowed value: 11
hosting

Country incidents only: the hosting providers, in a sentence, such as “All 6 are at OVH.”

string | null
last_week

Country incidents only: the users from the country on these servers at this hour last week.

object
users
integer
servers
integer
checked_every_seconds

Country incidents only: how often the country check runs.

integer
timeline

Oldest first: when servers joined and came back, where its messages went, acknowledgements, notes, and how it closed.

Array<object>
object
at
string format: date-time
kind
string
Allowed values: down degraded up alerted failed ack note status
title
string
aside
string
detail
string | null
note

The note, on an acknowledgement or a note.

string | null
actor
string | null
channels
Array<object>
object
name
string
kind
string | null
at
string
Example
{
"incident": {
"id": "hin_3",
"kind": "offline",
"state": "open",
"servers": [
{
"id": "hst_7"
}
],
"under": 11,
"checked_every_seconds": 300,
"timeline": [
{
"kind": "down",
"title": "Alerted 2 channels",
"aside": "both delivered"
}
]
}
}
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.

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 project has no such server incident, or the project doesn’t exist.

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": 404,
"message": "No such server incident in this project."
}

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"
}