Production

Devices

Explore the data types and operations available in Devices.

95 operations

aggregateMetricPointsQuery

Aggregate metric data points into time buckets with configurable statistics. Automatically routes to pre-computed continuous aggregates for HOUR/DAY/WEEK/MONTH intervals. Supports gap-filling (LOCF/interpolation), time-weighted averages, and counter delta/rate via Toolkit. For counter metrics, computes delta (last-first) per bucket instead of average. Requires metric:read permission.

analyzeEdgeAppSourceQuery

Validate complete EdgeApp XML without saving; returns compiler catalog and original source ranges.

compareMetricsQuery

Compare multiple metrics side-by-side over the same time range and interval. Returns time-bucketed aggregates and summary statistics for each metric. Supports 2-10 metrics per request. Requires metric:read permission.

compileSchemaXMLQuery

Compile standalone XML schema syntax into JSON Schema without persisting it; host restrictions apply when embedded.

controllerConnectionStatusQuery

Check whether a controller has an active bridge connection. Requires controller:read permission.

controllerStatusQuery

Latest discovery and health snapshot, with platform receipt time and freshness

createControllerMutation

Create a new controller. Requires controller:write permission.

createControllerPolicyMutation

Create a new controller policy. The referenced controller must exist in this tenant. Triggers a config.update push to the controller. Requires controller_policy:write permission.

createControllerTokenMutation

Create a new controller token. Returns the signed token value. Requires controller_token:write permission.

createDeviceMutation

Create a new device. Requires device:write permission.

createDeviceTokenMutation

Create a new device token. Returns the signed token value. Requires device_token:write permission.

createEdgeAppMutation

Create a new DRAFT edge app row for `input.handle`. Rejects if a draft already exists for the handle (finish or delete it first). Drafts aren't pushed to controllers; use publishEdgeAppDraft to ship. Requires edge_app:write permission.

createEdgeAppInstallationMutation

Create a edgeApp installation. Validates the edgeApp exists in this tenant and isn't DRAFT, that the controller exists, that an optional bot user exists, and `variables` against the edgeApp's configSchema (when set); pushes config.update to the target controller. Requires edge_app_installation:write permission.

createMetricMutation

Create a new metric. Requires metric:write permission.

createNetworkMutation

Create a new network. Requires network:write permission.

dataChangeEventsSubscription

Subscribe to real-time data change events. Requires read permission on each requested resource. Task topics are the exception: a signed-in user without task:read receives the events of their own tasks only (assigned to them, claimed by them, unclaimed on their teams).

deleteControllerMutation

Delete a controller. Requires controller:delete permission.

deleteControllerPolicyMutation

Delete a controller's policy. The controller falls back to default-deny on the next config.update push. Requires controller_policy:delete permission.

deleteDeviceMutation

Delete a device. Requires device:delete permission.

deleteEdgeAppMutation

Delete a edge app row. Cascades to all installations pinning this row and pushes config.update to each affected controller. Use deprecateEdgeApp instead to retire a PUBLISHED row without losing installation history.

deleteEdgeAppInstallationMutation

Delete a edgeApp installation. Triggers a config.update push to the controller.

deleteMetricMutation

Delete a metric and all its data points. Requires metric:delete permission.

deleteNetworkMutation

Delete a network. Requires network:delete permission.

deprecateEdgeAppMutation

Mark a PUBLISHED row as DEPRECATED. Used to retire an app without a replacement. Existing installations stay pinned and keep working until upgraded or uninstalled. Idempotent on already-DEPRECATED rows; rejects DRAFT rows (delete them instead). Requires edge_app:write permission.

downsampleMetricPointsQuery

Downsample metric data points for efficient visualization. Uses the Largest Triangle Three Buckets (LTTB) algorithm to preserve the visual shape of the time series while reducing point count. Optionally preserves gaps in data via gp_lttb(). Uses Toolkit lttb() / gp_lttb(). Requires metric:read permission.

edgeAppLogStreamSubscription

Stream new LOG-kind edgeApp events as they arrive for a single installation. Requires edge_app_event:read.

exportEdgeAppMutation

Export an edge app to YAML or JSON. Requires edge_app:read permission.

generateDefaultDataQueryQuery

Generate a default GraphQL data query for an event topic. Returns a query string with all scalar fields for the resource, or null if the topic has no matching query. The query uses $id as the variable for the resource ID.

getControllerQuery

Fetch a single controller by ID. Requires controller:read permission.

getControllerPolicyQuery

Fetch a controller policy by its ID. Requires controller_policy:read permission.

getControllerPolicyByControllerQuery

Fetch a controller's policy by the controller ID (the natural key). Returns null if no policy is configured (default-deny).

getDeviceQuery

Fetch a single device by ID. Requires device:read permission.

getEdgeAppQuery

Fetch a edge app by ID. Requires edge_app:read permission.

getEdgeAppEventQuery

Fetch a edge app event by ID. Requires edge_app_event:read permission.

getEdgeAppInstallationQuery

Fetch a edge app installation by ID. Requires edge_app_installation:read permission.

getEdgeAppSourceQuery

Read exact EdgeApp XML for authoring. Requires edge_app:write permission.

getMagicQueryGraphQLQuery

Resolves a Magic Query string to the real GraphQL operation and variables it runs, so consumers can graduate from the façade to raw GraphQL. Does not execute.

getMagicQuerySchemaQuery

Returns the input JSON Schema and output introspection for a Magic Query noun, so consumers (especially LLMs) can learn its contract before calling magicQuery.

getMetricQuery

Fetch a single metric by ID. Requires metric:read permission.

getMetricPointsQuery

Query time-series data points for a metric. Returns a flat array ordered by timestamp, with summary stats. Requires metric:read permission.

getNetworkQuery

Fetch a single network by ID. Requires network:read permission.

helpChapterQuery

Read a chapter of the current published manual edition.

helpChaptersQuery

List human-facing manual chapters from the running deployment.

iacGuidesQuery

Every authoring guide, for a tool that syncs them to a folder. Intended for `schema pull` to call once and write to disk, not for an agent to call while authoring — a file can be grepped and re-read in part, where a response arrives whole.

iacSchemaQuery

The infrastructure-only view of this schema, for declarative tooling. Contains only annotated resources and the types they reach.

iacSchemaDocumentQuery

Fetch the JSON Schema document a SCHEMA-kind validator references, for declarative tooling.

iacValidateQuery

Validate an infrastructure artifact. Pure and side-effect free; safe to alias many times in one document.

importEdgeAppMutation

Import an edge app from YAML or JSON, landing it as a DRAFT (replaces an existing DRAFT for the handle, or allocates the next version). Requires edge_app:write permission.

invokeEdgeAppMutation

Invoke a edgeApp's onMessage export by name on a specific controller (the edgeApp must be installed on it). Forwards to the bridge and returns the function's JSON return value. Requires edge_app:invoke permission.

listControllerPoliciesQuery

List controller policies with pagination. Requires controller_policy:list permission.