Skip to content

public.servers.list

GET
/servers
curl --request GET \
--url 'https://rest.watchtower15.com/v1/servers?os_type=linux&archived=true&sort=name&direction=asc&include_total=true' \
--header 'Authorization: Bearer <token>'
search
string | null
<= 255 characters
os_type
string | null
Allowed values: linux windows freebsd other
status
Array<string> | null
Allowed values: active pending_approval revoked
health
Array<string> | null
Allowed values: unknown healthy warning critical
connectivity
Array<string> | null
Allowed values: connected delayed unreachable powered_off never_seen rejected catching_up
tag_uuids
Array<string> | null
archived
string | null
Allowed values: true false 1 0
sort
string | null
Allowed values: name hostname agent_status last_seen health_status
direction
string | null
Allowed values: asc desc
limit
integer | null
>= 1 <= 100
cursor
string | null
<= 512 characters
include_total
string | null
Allowed values: true false 1 0

ServersListResource

Media typeapplication/json
object
data
required
Array<object>
object
uuid
required
string
name
required

The display name when one is set, else the hostname.

string
hostname
required
string | null
ip_address
required

The source address of the agent’s last heartbeat.

string | null
os_type
required
string | null
health_status
required

One of unknown, healthy, warning, critical.

string
agent_status
required

One of active, pending_approval, revoked.

string
pending_reason
required

Why a pending_approval server waits: approval or limit.

string | null
connectivity_state
required

Connected, catching up, delayed, unreachable, rejected, powered off or never seen: an open set. Null when no agent reports (pending, revoked, no agent, or monitoring off).

string | null
agent_version
required
string | null
agent_last_seen_at
required

Epoch milliseconds.

integer | null
active
required

Whether monitoring is switched on.

boolean
archived_at
required

Epoch milliseconds; null for a server that is not archived.

integer | null
tags
required
Array<object>
object
uuid
required
string
name
required
string
console_url
required

The server’s page in the console.

string
next_cursor
required
string | null
total

The whole list’s size; present only with include_total=true.

integer

Example generated

{
"data": [
{
"uuid": "example",
"name": "example",
"hostname": "example",
"ip_address": "example",
"os_type": "example",
"health_status": "example",
"agent_status": "example",
"pending_reason": "example",
"connectivity_state": "example",
"agent_version": "example",
"agent_last_seen_at": 1,
"active": true,
"archived_at": 1,
"tags": [
{
"uuid": "example",
"name": "example"
}
],
"console_url": "example"
}
],
"next_cursor": "example",
"total": 1
}

The API key is missing, malformed, expired or revoked.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

The key or its owner does not hold what the operation needs.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

No such record in this organisation (an absent id and another organisation’s answer alike).

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

The request is invalid; errors names the parameters.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

An unexpected error.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}