Hosts

List hosts

Returns the team's hosts, newest first unless you sort.

get/hosts

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Query parameters

pageinteger

Page number, from 1.

per_pageinteger

Hosts per page, 1 to 100.

filter[state]'up' | 'stale' | 'pending'

Whether a host's agent reports.

up <br/> Reported in the last 15 minutes.
stale <br/> Reported before, but not in the last 15 minutes.
pending <br/> The agent never reported.

Only hosts in this state.

filter[project_id]string uuid

Only hosts of this project.

filter[search]string

Case-insensitive text in the label, host info (hostname, platform, architecture) or agent version.

sortstring

Sort by label, last_seen_at or created_at. Prefix - for descending. Default -created_at.

Response

Paginated set of Host

current_pageinteger required
first_page_urlstring nullable required
frominteger nullable required
last_page_urlstring nullable required
last_pageinteger required
next_page_urlstring nullable required
pathstring nullable required

Base path for paginator generated URLs.

per_pageinteger required

Number of items shown per page.

prev_page_urlstring nullable required
tointeger nullable required

Number of the last item in the slice.

totalinteger required

Total number of items being paginated.

Example response

{
  "data": [
    {
      "label": "web-1",
      "agent_version": "2.0.3",
      "no_data_alert_minutes": 10,
      "escalation_paths": [
        {
          "name": "On-call engineers"
        }
      ],
      "health": [
        {
          "detail": "nginx.service failed"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.