REST API reference
Core’s REST API is generated from its tRPC procedures by trpc-to-openapi, so it always matches what the web UI uses. Every running core serves its own spec:
http://seedypod.local:3000/api/openapi.jsonThe reference below is rendered from a snapshot of that spec (download openapi.json), taken by building seedypod/core at commit a2f6b4c and booting the server with CI=1. When in doubt, the spec from your own unit wins.
Base URL and transport
- REST:
http://seedypod.local:3000/api/*, JSON in and out. - tRPC:
/api/trpc, used by the web UI. - Live events: tRPC subscription
events.onChangeover SSE, or the read-only WebSocket at/api/ws. - MCP:
POST /api/mcp(MCP for agents).
Authentication
There is no authentication by default. Core trusts your LAN. Do not port-forward or publicly reverse-proxy it.
If an API key is set in Settings → API access, requests from anything other than the unit itself must send Authorization: Bearer YOUR_KEY or x-api-key: YOUR_KEY. The spec declares this as a bearer scheme.
Examples
Read every sensor:
curl --fail http://seedypod.local:3000/api/sensorsSet the grow light to 70 %:
curl --fail -X POST http://seedypod.local:3000/api/light \
-H 'Content-Type: application/json' \
-d '{"on":true,"level":70}'Water for two minutes. The pump is real hardware: the daemon clamps the run to its maximum and refuses it if the tank is low or a fault is latched, returning the reason as an error.
curl --fail -X POST http://seedypod.local:3000/api/pump/run-once \
-H 'Content-Type: application/json' \
-d '{"durationS":120}'Endpoints
system
GET/api/systemIdentity, HAL model, limits and core version
Response 200
| Field | Type | Constraints |
|---|---|---|
coreVersion | string | |
halOnline | boolean | |
system | { contract, unitId, model, halVersion, caps, limits } | null |
GET/api/healthcheck
Response 200
| Field | Type | Constraints |
|---|---|---|
ok | boolean | |
ts | string |
settings
GET/api/settings
Response 200
| Field | Type | Constraints |
|---|---|---|
unitName | string | |
timezone | string | |
temperatureUnit | "C" | "F" | |
waterFullCm | number | 0–100 |
waterEmptyCm | number | 0–100 |
tankCapacityL | number | > 0 |
thinningReminderDays | integer | ≥ 0 |
rootCheckReminderDays | integer | ≥ 0 |
harvestReminderDays | integer | ≥ 0 |
nutrientReminderDays | integer | ≥ 0 |
mqttUrl | string | null | |
mqttUsername | string | null | |
mqttTlsEnabled | boolean | |
mqttTlsInsecure | boolean | |
captureIntervalMin | integer | ≥ 0 |
primaryAnalyzer | string | |
analysisArtifacts | boolean | |
mirrorEndpoint | string | null | |
mirrorBucket | string | null | |
mirrorRegion | string | |
mirrorPrefix | string | |
mirrorAccessKeyId | string | null | |
autopilotEnabled | boolean | |
setupComplete | boolean | |
updatedAt | string | |
hasApiKey | boolean | |
hasMqttPassword | boolean | |
hasAnalysisIngestToken | boolean | |
hasMirrorSecret | boolean |
PATCH/api/settings
Request body
| Field | Type | Constraints |
|---|---|---|
unitName? | string | |
timezone? | string | |
temperatureUnit? | "C" | "F" | |
waterFullCm? | number | 0–100 |
waterEmptyCm? | number | 0–100 |
tankCapacityL? | number | > 0 |
thinningReminderDays? | integer | ≥ 0 |
rootCheckReminderDays? | integer | ≥ 0 |
harvestReminderDays? | integer | ≥ 0 |
nutrientReminderDays? | integer | ≥ 0 |
apiKey? | string | |
mqttUrl? | string | null | |
mqttUsername? | string | null | |
mqttPassword? | string | null | |
mqttTlsEnabled? | boolean | |
mqttTlsInsecure? | boolean | |
captureIntervalMin? | integer | ≥ 0 |
primaryAnalyzer? | string | |
analysisArtifacts? | boolean | |
analysisIngestToken? | string | |
mirrorEndpoint? | string | null | |
mirrorBucket? | string | null | |
mirrorRegion? | string | |
mirrorPrefix? | string | |
mirrorAccessKeyId? | string | null | |
mirrorSecretAccessKey? | string | null | |
autopilotEnabled? | boolean | |
setupComplete? | boolean |
Response 200
| Field | Type | Constraints |
|---|---|---|
unitName | string | |
timezone | string | |
temperatureUnit | "C" | "F" | |
waterFullCm | number | 0–100 |
waterEmptyCm | number | 0–100 |
tankCapacityL | number | > 0 |
thinningReminderDays | integer | ≥ 0 |
rootCheckReminderDays | integer | ≥ 0 |
harvestReminderDays | integer | ≥ 0 |
nutrientReminderDays | integer | ≥ 0 |
mqttUrl | string | null | |
mqttUsername | string | null | |
mqttTlsEnabled | boolean | |
mqttTlsInsecure | boolean | |
captureIntervalMin | integer | ≥ 0 |
primaryAnalyzer | string | |
analysisArtifacts | boolean | |
mirrorEndpoint | string | null | |
mirrorBucket | string | null | |
mirrorRegion | string | |
mirrorPrefix | string | |
mirrorAccessKeyId | string | null | |
autopilotEnabled | boolean | |
setupComplete | boolean | |
updatedAt | string | |
hasApiKey | boolean | |
hasMqttPassword | boolean | |
hasAnalysisIngestToken | boolean | |
hasMirrorSecret | boolean |
network
GET/api/network/wifiWi-Fi mode (client/setup/offline), network, address, and the setup hotspot if it is up
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
mode | "client" | "setup" | "offline" | |
ssid | string | null | |
ip | string | null | |
setup | { ssid, url, until } | null | |
lastError | string | null |
GET/api/network/wifi/networksNetworks in range, strongest first
Response 200
| Field | Type | Constraints |
|---|---|---|
ssid | string | |
signal | number | |
secure | boolean | |
inUse | boolean |
Returns an array of these objects.
POST/api/network/wifi/setupOpen the setup hotspot (closes itself after `minutes`)
Request body
| Field | Type | Constraints |
|---|---|---|
minutes? | integer | 1–60, default 15 |
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
mode | "client" | "setup" | "offline" | |
ssid | string | null | |
ip | string | null | |
setup | { ssid, url, until } | null | |
lastError | string | null |
DELETE/api/network/wifi/setupClose the setup hotspot and rejoin the saved network
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
mode | "client" | "setup" | "offline" | |
ssid | string | null | |
ip | string | null | |
setup | { ssid, url, until } | null | |
lastError | string | null |
POST/api/network/wifi/connectSave a network and switch to it a moment after replying
Request body
| Field | Type | Constraints |
|---|---|---|
ssid | string | |
password? | string |
Response 200
| Field | Type | Constraints |
|---|---|---|
ok | boolean | |
detail | string |
sensors
GET/api/sensorsLatest reading for every sensor
Response 200
object
GET/api/sensors/{id}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | "air_temp" | "humidity" | "pcb_temp" | "water_distance" | "water_level_pct" | "pump_v" | "pump_a" | "pump_w" | "ph" | "ec" | "water_temp" |
Response 200
| Field | Type | Constraints |
|---|---|---|
ts | string | date-time |
value | number | |
unit | string | |
quality | "good" | "stale" | "suspect" | default "good" |
POST/api/sensors/{id}/calibrateStore a calibration point on a pH, EC or RTD probe (EZO)
pH: `mid` first, then optional `low`/`high`. EC: `dry`, then `single` or `low`+`high`. RTD: `single`. `clear` wipes stored points. `value` is the reference solution in the reported unit (pH, mS/cm, °C).
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | "air_temp" | "humidity" | "pcb_temp" | "water_distance" | "water_level_pct" | "pump_v" | "pump_a" | "pump_w" | "ph" | "ec" | "water_temp" |
Request body
| Field | Type | Constraints |
|---|---|---|
point | "mid" | "low" | "high" | "dry" | "single" | "clear" | |
value? | number |
Response 200
| Field | Type | Constraints |
|---|---|---|
ts | string | date-time |
point | "mid" | "low" | "high" | "dry" | "single" | "clear" | |
ok | boolean | |
points | integer | null | |
detail | string | default "" |
GET/api/telemetry/{sensor}Downsampled history for a sensor
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
sensor | path | "air_temp" | "humidity" | "pcb_temp" | "water_distance" | "water_level_pct" | "pump_v" | "pump_a" | "pump_w" | "ph" | "ec" | "water_temp" | |
hours? | query | number | 1–2160, default 24 |
maxPoints? | query | integer | 10–2000, default 300 |
Response 200
| Field | Type | Constraints |
|---|---|---|
ts | string | |
value | number |
Returns an array of these objects.
GET/api/telemetry/light-hoursCumulative grow-light hours (LED aging)
Response 200
| Field | Type | Constraints |
|---|---|---|
hours | number | |
ratedHours | number | |
pctUsed | number |
devices
GET/api/devicesConfigured sensor devices (with probe status) and the kinds that can be added
Response 200
| Field | Type | Constraints |
|---|---|---|
sensors | { kind, label, addr, ids, source, status, detail }[] | |
addable | { kind, label, description, ids, bus, defaultAddr, calibration }[] |
POST/api/devices/sensorsAdd a probe of an addable kind at an I²C address; it goes live without a restart
Refused (412) when the kind is not addable, the address is outside 0x08–0x77 or already used, the quantity is already installed, or the probe does not answer.
Request body
| Field | Type | Constraints |
|---|---|---|
kind | string | |
addr | integer | 0–127 |
Response 200
| Field | Type | Constraints |
|---|---|---|
requestId | string | |
ok | boolean | |
detail | string |
DELETE/api/devices/sensors/{kind}/{addr}Remove a probe that was added from the app (sensors from hal.toml are refused)
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
kind | path | string | |
addr | path | integer | 0–127 |
Response 200
| Field | Type | Constraints |
|---|---|---|
requestId | string | |
ok | boolean | |
detail | string |
light
GET/api/light
Response 200
| Field | Type | Constraints |
|---|---|---|
on | boolean | |
level | number | 0–100 |
since | string | date-time |
fault | string | null | default null |
remainingS | integer | null | default null |
POST/api/lightTurn the grow light on/off and set brightness 0–100
Request body
| Field | Type | Constraints |
|---|---|---|
on? | boolean | |
level? | number | 0–100 |
Response 200
| Field | Type | Constraints |
|---|---|---|
on | boolean | |
level | number | 0–100 |
since | string | date-time |
fault | string | null | default null |
remainingS | integer | null | default null |
GET/api/light/ownerWho controls the light now: manual hold, Autopilot or the schedule
Response 200
| Field | Type | Constraints |
|---|---|---|
source | "manual" | "autopilot" | "schedule" | null | |
level | number | null | |
leaseId | string | null | |
manualUntil | string | null | |
schedule | number | null |
POST/api/light/resumeEnd a manual hold and hand the light back to Autopilot or the schedule
Response 200
| Field | Type | Constraints |
|---|---|---|
source | "manual" | "autopilot" | "schedule" | null | |
level | number | null | |
leaseId | string | null | |
manualUntil | string | null | |
schedule | number | null |
pump
GET/api/pump
Response 200
| Field | Type | Constraints |
|---|---|---|
on | boolean | |
level | number | 0–100 |
since | string | date-time |
fault | string | null | default null |
remainingS | integer | null | default null |
POST/api/pumpRun the pump; every run is bounded by the HAL max-run limit and the dry-run interlock
Request body
| Field | Type | Constraints |
|---|---|---|
on? | boolean | |
level? | number | 0–100 |
durationS? | integer | > 0 |
Response 200
| Field | Type | Constraints |
|---|---|---|
on | boolean | |
level | number | 0–100 |
since | string | date-time |
fault | string | null | default null |
remainingS | integer | null | default null |
POST/api/pump/run-onceRun the pump for N seconds at a speed
Request body
| Field | Type | Constraints |
|---|---|---|
durationS | integer | > 0 |
level? | number | 1–100 |
Response 200
| Field | Type | Constraints |
|---|---|---|
on | boolean | |
level | number | 0–100 |
since | string | date-time |
fault | string | null | default null |
remainingS | integer | null | default null |
POST/api/pump/stop
Response 200
| Field | Type | Constraints |
|---|---|---|
on | boolean | |
level | number | 0–100 |
since | string | date-time |
fault | string | null | default null |
remainingS | integer | null | default null |
schedules
GET/api/schedules
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
kind | "light" | "pump" | |
name | string | |
enabled | boolean | |
days | number | |
spec | { setpoints } | { minute, durationS, level } | |
createdAt | string | |
updatedAt | string |
Returns an array of these objects.
PUT/api/schedules/{id}Create or replace a light curve or pump cycle
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | string |
Request body
| Field | Type | Constraints |
|---|---|---|
kind | "light" | "pump" | |
name | string | |
enabled | boolean | |
days | integer | 0–127 |
spec | { setpoints } | { minute, durationS, level } |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
kind | "light" | "pump" | |
name | string | |
enabled | boolean | |
days | number | |
spec | { setpoints } | { minute, durationS, level } | |
createdAt | string | |
updatedAt | string |
DELETE/api/schedules/{id}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | string |
Response 200
| Field | Type | Constraints |
|---|---|---|
removed | boolean |
GET/api/schedules/runs
Response 200
| Field | Type | Constraints |
|---|---|---|
scheduleId | string | |
key | string | |
firedAt | string | |
result | string |
Returns an array of these objects.
autopilot
GET/api/automations/signalsSignals rules can read, with units; liveOnly ones are unknown in a backtest
Response 200
| Field | Type | Constraints |
|---|---|---|
key | string | |
label | string | |
unit | string | |
group | string | |
liveOnly | boolean |
Returns an array of these objects.
GET/api/automations
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
name | string | |
enabled | boolean | |
dryRun | boolean | |
priority | number | |
cooldownMin | number | null | |
trigger | object | |
conditions | __schema2 | |
actions | object[] | |
createdAt | string | |
updatedAt | string | |
lastRun | { id, automationId, firedAt, outcome, detail } | null |
Returns an array of these objects.
POST/api/automationsCreate a rule. New rules start in dry-run unless dryRun is false.
Request body
| Field | Type | Constraints |
|---|---|---|
name | string | |
enabled? | boolean | default true |
dryRun? | boolean | default true |
priority? | integer | 0–100, default 50 |
cooldownMin? | integer | null | default null |
trigger | object | |
conditions | __schema0 | |
actions | object[] | max 10 items |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
name | string | |
enabled | boolean | |
dryRun | boolean | |
priority | number | |
cooldownMin | number | null | |
trigger | object | |
conditions | __schema2 | |
actions | object[] | |
createdAt | string | |
updatedAt | string |
GET/api/automations/statusKill switch, last tick, live light leases and per-rule state
Response 200
| Field | Type | Constraints |
|---|---|---|
enabled | boolean | |
lastTickAt | string | null | |
leases | { id, level, expiresAt }[] | |
rules | { id, condition, lastFiredAt, actionsLastHour, cooldownUntil }[] | |
light | { source, level, leaseId, manualUntil, schedule } |
GET/api/automations/runsThe audit log, newest first: every evaluation where a rule's trigger was active
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
automationId? | query | integer | ≥ -9007199254740991 |
limit? | query | integer | 1–1000, default 100 |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
automationId | number | |
firedAt | string | |
outcome | "fired" | "skipped" | "clamped" | "dry_run" | "refused" | "error" | |
detail | unknown |
Returns an array of these objects.
GET/api/automations/{id}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | integer | ≥ -9007199254740991 |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
name | string | |
enabled | boolean | |
dryRun | boolean | |
priority | number | |
cooldownMin | number | null | |
trigger | object | |
conditions | __schema2 | |
actions | object[] | |
createdAt | string | |
updatedAt | string |
PUT/api/automations/{id}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | integer | ≥ -9007199254740991 |
Request body
| Field | Type | Constraints |
|---|---|---|
name? | string | |
enabled? | boolean | default true |
dryRun? | boolean | default true |
priority? | integer | 0–100, default 50 |
cooldownMin? | integer | null | default null |
trigger? | object | |
conditions? | __schema0 | |
actions? | object[] | max 10 items |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
name | string | |
enabled | boolean | |
dryRun | boolean | |
priority | number | |
cooldownMin | number | null | |
trigger | object | |
conditions | __schema2 | |
actions | object[] | |
createdAt | string | |
updatedAt | string |
DELETE/api/automations/{id}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | integer | ≥ -9007199254740991 |
Response 200
| Field | Type | Constraints |
|---|---|---|
removed | boolean |
PUT/api/autopilot/enabledThe kill switch: off stops every rule and releases the light
Request body
| Field | Type | Constraints |
|---|---|---|
enabled | boolean |
Response 200
| Field | Type | Constraints |
|---|---|---|
enabled | boolean |
POST/api/automations/backtestReplay a saved rule (id) or a draft (rule) over recorded history without touching hardware
Request body
| Field | Type | Constraints |
|---|---|---|
id? | integer | ≥ -9007199254740991 |
rule? | { name, enabled, dryRun, priority, cooldownMin, trigger, conditions, actions } | |
hours? | integer | 1–336, default 24 |
stepMin? | integer | 1–60, default 5 |
Response 200
| Field | Type | Constraints |
|---|---|---|
from | string | |
to | string | |
stepMin | number | |
times | string[] | |
traces | { key, label, unit, values }[] | |
liveOnly | string[] | |
fires | { at, outcome, actions }[] | |
suppressed | { at, reason }[] | |
summary | { fires, suppressed, unknownSteps, disabledAt } |
grow
GET/api/grow
Response 200
| Field | Type | Constraints |
|---|---|---|
cycle | { id, startedAt, endedAt, stage, notes, issued } | null | |
day | number | null |
POST/api/grow/startStart a new grow cycle (ends any open one)
Request body
| Field | Type | Constraints |
|---|---|---|
notes? | string | default "" |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
startedAt | string | |
endedAt | string | null | |
stage | "germination" | "seedling" | "vegetative" | "harvest" | "ended" | |
notes | string | |
issued | string[] |
POST/api/grow/stage
Request body
| Field | Type | Constraints |
|---|---|---|
stage | "germination" | "seedling" | "vegetative" | "harvest" | "ended" |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
startedAt | string | |
endedAt | string | null | |
stage | "germination" | "seedling" | "vegetative" | "harvest" | "ended" | |
notes | string | |
issued | string[] |
POST/api/grow/end
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
startedAt | string | |
endedAt | string | null | |
stage | "germination" | "seedling" | "vegetative" | "harvest" | "ended" | |
notes | string | |
issued | string[] |
GET/api/grow/history
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
startedAt | string | |
endedAt | string | null | |
stage | "germination" | "seedling" | "vegetative" | "harvest" | "ended" | |
notes | string | |
issued | string[] |
Returns an array of these objects.
GET/api/pods
Response 200
| Field | Type | Constraints |
|---|---|---|
slot | number | |
plant | string | null | |
plantedAt | string | null | |
status | "empty" | "seeded" | "growing" | "harvest" | "attention" | |
notes | string | |
updatedAt | string |
Returns an array of these objects.
PATCH/api/pods/{slot}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
slot | path | integer | 1–60 |
Request body
| Field | Type | Constraints |
|---|---|---|
plant? | string | null | |
plantedAt? | string | null | |
status? | "empty" | "seeded" | "growing" | "harvest" | "attention" | |
notes? | string |
Response 200
| Field | Type | Constraints |
|---|---|---|
slot | number | |
plant | string | null | |
plantedAt | string | null | |
status | "empty" | "seeded" | "growing" | "harvest" | "attention" | |
notes | string | |
updatedAt | string |
camera
GET/api/captures
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
camera? | query | "upper" | "lower" | |
limit? | query | integer | 1–1000, default 100 |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
camera | "upper" | "lower" | |
ts | string | |
path | string | |
bytes | number | |
url | string |
Returns an array of these objects.
POST/api/camera/{camera}/captureTake a still now
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
camera | path | "upper" | "lower" |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
camera | "upper" | "lower" | |
ts | string | |
path | string | |
bytes | number | |
url | string |
vision
GET/api/vision/podsPer-pod green-area trend from the primary analyser
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
analyzer? | query | string |
Response 200
| Field | Type | Constraints |
|---|---|---|
slot | number | |
green | number | null | |
verdict | "growing" | "stalled" | "declining" | "unknown" | |
slope | number | |
samples | number |
Returns an array of these objects.
GET/api/vision/pods/{slot}
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
slot | path | integer | 1–60 |
Response 200
| Field | Type | Constraints |
|---|---|---|
ts | string | |
green | number | |
captureId | string |
Returns an array of these objects.
GET/api/vision/analyzersAnalysers on the unit and any that posted results, with row counts and which is primary
Response 200
| Field | Type | Constraints |
|---|---|---|
id | string | |
version | number | |
label | string | |
description | string | |
metrics | { name, label, unit, description }[] | |
runsOn | "device" | "remote"[] | |
source | "device" | "remote" | |
primary | boolean | |
rows | number | |
captures | number | |
firstTs | string | null | |
lastTs | string | null |
Returns an array of these objects.
GET/api/vision/statusAnalysis queue: running, waiting, dropped, failed, re-run progress
Response 200
| Field | Type | Constraints |
|---|---|---|
running | string | null | |
waiting | string[] | |
dropped | number | |
failed | number | |
backfill | { analyzer, done, total } | null |
GET/api/vision/compare/{slot}One pod's series from every analyser@version, for side-by-side comparison
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
slot | path | integer | 1–60 |
metric? | query | string | default "green_fraction" |
limit? | query | integer | 1–1000, default 200 |
Response 200
| Field | Type | Constraints |
|---|---|---|
analyzer | string | |
version | number | |
source | "device" | "remote" | |
points | { ts, value, captureId }[] |
Returns an array of these objects.
GET/api/vision/captures/{captureId}Every analyser's results for one capture
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
captureId | path | string |
Response 200
| Field | Type | Constraints |
|---|---|---|
captureId | string | |
ts | string | |
camera | "upper" | "lower" | |
analyzer | string | |
version | number | |
source | "device" | "remote" | |
slot | number | |
metric | string | |
value | number | |
detail | object | null | |
artifact | string | null |
Returns an array of these objects.
PUT/api/vision/primaryChoose the analyser that drives pod trends
Request body
| Field | Type | Constraints |
|---|---|---|
analyzer | string |
Response 200
| Field | Type | Constraints |
|---|---|---|
analyzer | string |
POST/api/vision/analyzers/{analyzer}/rerunRe-score stored captures with one on-device analyser, in the background
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
analyzer | path | string |
Request body
| Field | Type | Constraints |
|---|---|---|
limit? | integer | 1–5000, default 2000 |
Response 200
| Field | Type | Constraints |
|---|---|---|
captures | number |
datasets
GET/api/datasets/summaryWhat a dataset export of this window would contain (download it from GET /api/datasets/export)
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
from? | query | string | |
to? | query | string | |
images? | query | boolean |
Response 200
| Field | Type | Constraints |
|---|---|---|
from | string | |
to | string | |
images | boolean | |
captures | number | |
analyses | number | |
telemetry | number | |
imageBytes | number |
storage
GET/api/storage/flashSD card writes: bytes per day (7-day average, or since boot until a day of samples exists), written since boot, card size
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
device | string | null | |
cardBytes | number | null | |
sinceBootBytes | number | null | |
uptimeS | number | null | |
bytesPerDay | number | null | |
basis | "history" | "boot" | null | |
windowDays | number | null | |
lastSampleAt | string | null |
GET/api/storage/mirrorOff-device mirror status: enabled, uploads pending/done/failed, last error
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
enabled | boolean | |
pending | number | |
uploaded | number | |
failed | number | |
lastError | string | null | |
lastUploadAt | string | null |
POST/api/storage/mirror/testWrite, read back and delete a probe object with the saved mirror settings
Response 200
| Field | Type | Constraints |
|---|---|---|
ok | boolean | |
detail | string |
POST/api/storage/mirror/syncCopy the stills and artifacts already on the unit to the mirror
Response 200
| Field | Type | Constraints |
|---|---|---|
queued | number |
backup
GET/api/backupLast off-card backup, nightly bucket uploads, and whether backup_stale is raised
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
lastSuccess | { id, ts, destination, name, bytes, ok, detail } | null | |
lastBucketAttempt | { id, ts, destination, name, bytes, ok, detail } | null | |
nightly | { enabled, hour, keep } | |
staleAfterDays | number | |
stale | boolean | |
recent | { id, ts, destination, name, bytes, ok, detail }[] |
POST/api/backup/runBack up to the mirror's bucket now (the nightly upload, early)
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
ts | string | |
destination | "download" | "bucket" | |
name | string | |
bytes | number | |
ok | boolean | |
detail | string |
GET/api/backup/bucketBackups in the mirror's bucket (backups/), newest first
Response 200
| Field | Type | Constraints |
|---|---|---|
key | string | |
name | string | |
unit | string | null | |
createdAt | string | |
size | number |
Returns an array of these objects.
POST/api/backup/browseList the backups in a bucket that isn't saved yet (Welcome → Restore); the saved mirror when config is omitted
Request body
| Field | Type | Constraints |
|---|---|---|
config? | { endpoint, bucket, region, prefix, accessKeyId, secretAccessKey } |
Response 200
| Field | Type | Constraints |
|---|---|---|
key | string | |
name | string | |
unit | string | null | |
createdAt | string | |
size | number |
Returns an array of these objects.
GET/api/backup/restoreWhether restore is installed, the last restore or undo, and what an undo would put back
Response 200
| Field | Type | Constraints |
|---|---|---|
available | boolean | |
status | { op, state, at, error, code, bundle, undone } | null | |
undo | { restoredAt, bundle, undoneAt } | null |
POST/api/backup/restore-from-bucketRestore a backup from the bucket. The bundle is checked first; then the unit restarts on it (upload a file with POST /api/backup/restore)
Request body
| Field | Type | Constraints |
|---|---|---|
key | string | |
config? | { endpoint, bucket, region, prefix, accessKeyId, secretAccessKey } |
Response 200
| Field | Type | Constraints |
|---|---|---|
restarting | boolean | |
bundle | { createdAt, unit, core, schema, photos } | null |
POST/api/backup/undoPut back what the last restore replaced; again to redo it. The unit restarts
Response 200
| Field | Type | Constraints |
|---|---|---|
restarting | boolean |
alerts
GET/api/alerts
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
activeOnly? | query | boolean | default true |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
kind | string | |
active | boolean | |
detail | string | |
raisedAt | string | |
clearedAt | string | null | |
acknowledgedAt | string | null | |
dismissedAt | string | null |
Returns an array of these objects.
POST/api/alerts/{id}/acknowledgeAcknowledge an alert; clears a latched hardware fault so the actuator may re-enable
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | integer | ≥ -9007199254740991 |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
kind | string | |
active | boolean | |
detail | string | |
raisedAt | string | |
clearedAt | string | null | |
acknowledgedAt | string | null | |
dismissedAt | string | null |
POST/api/alerts/{id}/dismiss
Parameters
| Name | In | Type | Constraints |
|---|---|---|---|
id | path | integer | ≥ -9007199254740991 |
Response 200
| Field | Type | Constraints |
|---|---|---|
id | number | |
kind | string | |
active | boolean | |
detail | string | |
raisedAt | string | |
clearedAt | string | null | |
acknowledgedAt | string | null | |
dismissedAt | string | null |