Collect a one-shot diagnostics report from the device. Dispatches a
synchronous collect_diagnostics job (fulfillImmediately: true) and
returns the typed DiagnosticsReport plus collection metadata.
A gateway and a serving device populate different sub-objects of the
same envelope (see DiagnosticsReport); include selects which
categories to gather (all expands to every category valid for the
device type).
Optionalopts: RequestOptionsRegister a device record.
Optionalopts: RequestOptionsMint a session token for programmatic access to the device's telemetry
app (sent as the X-Session-Token header).
Optionalopts: RequestOptionsFetch a device by id.
Optionalopts: RequestOptionsWS-H — the device's AGENT journal (edgible-agent unit only), collected
on demand over the diagnostics jobs channel (GET /devices/{id}/logs).
Authz: org OWNER on the device's org; platform admin for managed devices.
An offline device yields offline: true; a dispatched-but-failed
collection yields collectionError (never conflated).
Optionalopts: RequestOptionsDesired target-version vector for a device (CP-2.5 fast poll). Returns only the per-application target release versions and the desired pool config hash, so an agent can cheaply detect drift between polls and trigger a scoped reconcile on mismatch. The full reconcile stays the deep backstop.
Optionalopts: RequestOptionsThe latest published agent release for a device type (gateway or
serving) — the exact version DevicesClient.updateAgent resolves
latest to. Read-only; does not touch any device. Unwrapped from the
{ success, release } envelope to the bare AgentReleaseInfo.
Optionalopts: RequestOptionsDevice lifecycle event history (newest-first, backend default limit 100).
Typed with the vendored LifecycleEvent — the legacy client returned
events: any[].
Optionalopts: RequestOptionsPre-signed metric/log files for a device. Times are unix-ms. Response
shape comes from the backend getDeviceLogsFilesHandler (a
LogFilesResponse), which the legacy client re-declared inline.
Optionalopts: RequestOptionsDisconnect the device from VPN/tunnel networks; returns the updated device.
Optionalopts: RequestOptionsApplications assigned to this device.
Optionalopts: RequestOptionsPools that contain this device. The backend returns the bare array.
Optionalopts: RequestOptionsIdempotently (re)provision the device's ingest application (A7). No-op when
the ingest app is already healthy; otherwise recreates, adopts, or creates
it. Backs edgible device repair.
Gateway assignment is deferred (not failed) when no healthy managed gateway exists — inspect RepairDeviceResult.gatewayDeferred.
Optionalopts: RequestOptionsRestore the device's VPN/tunnel network access; returns the updated device.
Optionalopts: RequestOptionsUpdate a device; returns the updated row.
Optionalopts: RequestOptionsUpdate the device's agent to the latest published release for its device
type. Latest-only by design — there is no target-version parameter; the
backend resolves the newest gateway/serving release (see
DevicesClient.getLatestAgentRelease) and enqueues an
agent_self_update job (202 Accepted). Returns the created job id plus the
resolved targetVersion and the device's current fromVersion (null if
the device never reported one).
The agent reports the terminal disposition as the result of the returned
job — restarting | noop | blocked | rolled_back | failed
(AgentSelfUpdateResult) — pollable via sdk.jobs.get(jobId); the
job output is an AgentSelfUpdateOutput. A gateway device without an
active maintenance window reports blocked with reason
'gateway-maintenance-window' rather than restarting in place.
Optionalopts: RequestOptionsAuthorizationError (403 MANAGED_DEVICE) for platform-managed
devices, whose agent the platform updates on your behalf.
Device CRUD, network isolation, telemetry sessions, and per-device reads.