1KEY Developers
API reference

Fleet

Base URL https://api.1keyplatform.dev/v1. Every endpoint below is generated from the OpenAPI contract, which you can download as openapi.yaml.

Log in to send these requests to your organization from this page.

Fleet

Your hubs together, or one site's. What they're connected by now, what needs attention, and how they did over the last 24 hours, 7 days or 30 days.

GET /fleet/hubs/trends

List hubs' trends

Needs the hubs:read scope.

Each named hub's trend over range, in its site's days, ordered by hub ID.

Parameters

Name In Type Description
hub_id required query string 1 to 100 hub IDs, comma-separated.
range optional query "24h" | "7d" | "30d" The trend's range: the last 24 UTC hours (hourly buckets), or the last 7 or 30 days (daily buckets), now included.
measures optional query string Comma-separated measures to include in each trend's buckets and totals (see TrendMeasures). Default: all.

Responses

200 The hubs' trends.

Errors

400 invalid_request The request is malformed or a field is invalid.
401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
404 not_found No such resource, or it is not your organization's.
GET /fleet

Get the fleet

Needs the hubs:read scope.

Your hubs together, or one site's: how many are of each kind now, what needs attention, and the trend over range. Each expand adds a section. Days are the site's for one site and UTC otherwise.

Parameters

Name In Type Description
site_id optional query string Only this site's hubs. Test sites count when named.
include_test optional query boolean, default false true counts test sites' hubs too.
range optional query "24h" | "7d" | "30d" The trend's range: the last 24 UTC hours (hourly buckets), or the last 7 or 30 days (daily buckets), now included.
measures optional query string Comma-separated measures to include in each trend's buckets and totals (see TrendMeasures). Default: all.
expand optional query string Comma-separated sections to add: wifi, backup, firmware, top, events.
kind optional query "conn" | "failover" | "reboot" | "sim" With expand=events, only events of this kind.
limit optional query integer, 1–100, default 6 With expand=events, how many events to list.

Responses

200 The fleet. · returns a Fleet

Errors

400 invalid_request The request is malformed or a field is invalid.
401 unauthenticated Missing, malformed, revoked or unknown API key.
403 insufficient_scope The key lacks the scope this operation needs.
404 not_found No such resource, or it is not your organization's.