ServiceWatchdog API (v1)

Download OpenAPI specification:Download

Authentication

apikey

API key authentication

Security Scheme Type API Key
Header parameter name: Authorization

Incidents

Get all currently active incidents.

If an incident is currently not marked as resolved, this endpoint will return it.

Responses

Response samples

Content type
No sample

Get all recent incidents.

If an incident occurred in the last 5 days, it is returned by this endpoint.

Responses

Response samples

Content type
No sample

Get a specific incident by id.

All incidents are assigned a unique identifier, and this endpoint allows information about an incident to be retrieved on an incident-by-incident basis.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
No sample

Edit incident properties here. If a property is set to null, it is ignored.

Change display information like the title or severity of an incident here. Note that once an incident state has been marked as resolved, this endpoint will cease to work.

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>
Request Body schema:
title
string Nullable
caused_status
integer <int32> (ServiceStatus)
Enum: 0 1 2

Responses

Request samples

Content type
{
  • "title": "string",
  • "caused_status": 0
}

Response samples

Content type
No sample

Add update information to an incident.

As the state of an incident changes, this endpoint allows updates to be appended to the incident view.

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>
Request Body schema:
message
required
string
state
required
integer <int32> (IncidentState)
Enum: 0 1 2 3

Responses

Request samples

Content type
{
  • "message": "string",
  • "state": 0
}

Response samples

Content type
No sample

Index

<no summary>

Responses

KeyValues

Create or update an entry in KV storage.

This endpoint creates or updates a new key-value association in the KV table.

Authorizations:
apikey (apikey)
Request Body schema:
key
required
string
value
required
string <= 8192 characters

Responses

Request samples

Content type
{
  • "key": "string",
  • "value": "string"
}

Bulk retrieve values from KV storage.

The KV API can be provided with an array of strings to search the values of. Any missing entries will be returned with a null value.

Request Body schema:
Array ()
string

Responses

Request samples

Content type
[
  • "string"
]

Response samples

Content type
No sample

Delete a key-value association from the KV table.

Authorizations:
apikey (apikey)
query Parameters
key
string Nullable

Responses

Metrics

Retrieve entries from a metric by id.

If you have a custom metric, it can be retrieved from this endpoint by id. By default the 60 most recent entries are returned.

path Parameters
id
required
integer <int32>
query Parameters
limit
integer <int32>
Default: 60

Responses

Response samples

Content type
No sample

Delete a metric by id.

Removes a metric and all associated entries.

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>

Responses

Insert a new metric entry and associate it with a metric by id.

Creates a new metric entry and associates it with the provided metric id

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>
Request Body schema:
tag
string Nullable
value
integer <int32>

Responses

Request samples

Content type
{
  • "tag": "string",
  • "value": 0
}

Response samples

Content type
No sample

Delete all entries from a metric.

This endpoint is useful if you've been testing scripts that push to a custom metric, and you'd like to clear the sample entries before deploying.

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
No sample

Services

Get all services that the status page displays.

This endpoint returns limited information about a service, use the specific endpoints to get a service's incident history.

Responses

Response samples

Content type
No sample

Create a new service entry.

Authorizations:
apikey (apikey)
Request Body schema:
slug
required
string
display_name
required
string
description
required
string

Responses

Request samples

Content type
{
  • "slug": "string",
  • "display_name": "string",
  • "description": "string"
}

Response samples

Content type
No sample

Retrieve more detailed information about a service by id.

This endpoint currently returns the entire incident history of a service. This may change in the future.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
No sample

Get all incidents in the last N days by service id.

You can specify how far into the past this endpoint will search as a query parameter.

path Parameters
id
required
integer <int32>
query Parameters
days
integer <int32>
Default: 30

Responses

Response samples

Content type
No sample

Create a new incident and update the status of a service by id.

The status of the service will automatically be changed to that of the "worst" current incident.

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>
Request Body schema:
title
required
string
message
required
string
state
required
integer <int32> (IncidentState)
Enum: 0 1 2 3
caused_status
required
integer <int32> (ServiceStatus)
Enum: 0 1 2

Responses

Request samples

Content type
{
  • "title": "string",
  • "message": "string",
  • "state": 0,
  • "caused_status": 0
}

Response samples

Content type
No sample

Get the uptime metric of a service.

All services automatically have their historic uptime calculated. This operation is expensive for services with a long history, and therefore results returned by this endpoint are cached after the first request.

path Parameters
id
required
integer <int32>
query Parameters
limit
integer <int32>
Default: 60

Responses

Response samples

Content type
No sample

Get shallow information about all custom metrics associated with a service.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
No sample

Add a new custom metric to the service.

Authorizations:
apikey (apikey)
path Parameters
id
required
integer <int32>
Request Body schema:
name
string Nullable

Responses

Request samples

Content type
{
  • "name": "string"
}

Response samples

Content type
No sample