Production

Devices

Explore the data types and operations available in Devices.

95 operations

listControllersQuery

List controllers with pagination. Requires controller:list permission.

listControllerTokensQuery

List controller tokens with pagination. Requires controller_token:list permission.

listDataChangeEventTopicsQuery

List all valid data change event topics, grouped by resource. Requires authentication.

listDevicesQuery

List devices with pagination. Requires device:list permission.

listDeviceTokensQuery

List device tokens with pagination. Requires device_token:list permission.

listEdgeAppEventsQuery

List edge app events with pagination. Requires edge_app_event:list permission.

listEdgeAppInstallationsQuery

List edge app installations with pagination. Requires edge_app_installation:list permission.

listEdgeAppsQuery

List edge apps with pagination. Requires edge_app:list permission.

listMagicQueriesQuery

Lists every available Magic Query noun with a short description and its options — the discovery entry point.

listMetricsQuery

List metrics with pagination. Requires metric:list permission.

listNetworksQuery

List networks with pagination. Requires network:list permission.

magicQueryQuery

Executes a Magic Query string and returns the predefined query's JSON result. On a bad noun or parameter, returns a structured error whose 'extensions' carry 'code', 'actionable_message', and 'suggestions' for self-correction.

metricCorrelationQuery

Compute statistical correlation between two metrics over a time range. Returns Pearson correlation coefficient, slope, intercept, R-squared, and covariance. Metrics are joined by 1-second time buckets. Uses Toolkit stats_agg() 2D. Requires metric:read permission.

metricHeartbeatQuery

Analyze uptime and downtime for a heartbeat-style metric. Detects gaps where no value was received within the expected interval. Returns total uptime/downtime, uptime percentage, and individual gap periods. Uses Toolkit heartbeat_agg(). Requires metric:read permission.

metricHistogramQuery

Compute a value distribution histogram for a metric over a time range. Range bounds are auto-detected if not specified. Requires metric:read permission.

metricPercentilesQuery

Compute percentile values (e.g. p50, p95, p99) for a metric over a time range. Supports both exact (percentile_cont) and approximate (UddSketch via Toolkit) modes. Approximate mode is faster for large datasets. Useful for SLA analysis and outlier detection. Requires metric:read permission.

metricProjectionQuery

Compute a linear regression over historical data and project forward. Returns slope, R-squared, projected values with confidence intervals, and optionally the estimated time a target value will be reached. Requires metric:read permission.

metricStateDurationQuery

Analyze time spent in each discrete state for a status metric. Returns both a duration breakdown by state and a chronological timeline of state transitions (Gantt-chart-ready). Requires a metric with kind STATUS. Uses Toolkit state_agg(). Requires metric:read permission.

pingQuery

Health check endpoint

publishEdgeAppDraftMutation

Freeze a DRAFT and flip it to PUBLISHED. Auto-deprecates the previously-PUBLISHED row for the same handle. Pushes config.update to every controller running an installation that pinned the newly-published row. Requires edge_app:write.

publishEdgeAppSourceMutation

Publish only the reviewed EdgeApp XML; repeated immutable source is a no-op

recordMetricPointsMutation

Record one or more data points for a metric. Requires metric:write permission.

renderSchemaXMLQuery

Render JSON Schema as native XML without dropping unsupported keywords or changing a saved document.

revokeControllerTokenMutation

Revoke a controller token. Requires controller_token:revoke permission.

revokeDeviceTokenMutation

Revoke a device token. Requires device_token:revoke permission.

saveEdgeAppSourceMutation

Create or update EdgeApp XML and return the authoring view

schemaAuthoringCatalogQuery

Compiler-owned vocabulary for the standalone XML JSON Schema dialect, including native form annotations.

searchHelpQuery

Search human-facing manuals using shared semantic and text retrieval.

updateControllerMutation

Update a controller. Only provided fields are changed. Requires controller:write permission.

updateControllerPolicyMutation

Update a controller policy. Only provided fields are changed. The referenced controller must exist in this tenant. Triggers a config.update push to the controller. Requires controller_policy:write permission.

updateDeviceMutation

Update a device. Only provided fields are changed. Requires device:write permission.

updateEdgeAppMutation

Update an existing DRAFT edge app row. Rejects PUBLISHED/DEPRECATED rows (frozen) and attempts to change `handle` (immutable on an existing draft). Only provided fields are changed. Requires edge_app:write permission.

updateEdgeAppInstallationMutation

Update a edgeApp installation. Only provided fields are changed; `edgeAppId` is immutable (delete and recreate to change it). Re-validates the controller and bot user (if changed) and `variables` against the edgeApp's configSchema. Pushes config.update to the controller. Requires edge_app_installation:write permission.

updateMetricMutation

Update a metric. Only provided fields are changed. Requires metric:write permission.

updateNetworkMutation

Update a network. Only provided fields are changed. Requires network:write permission.

upgradeEdgeAppInstallationMutation

Repoint an installation at a different version of the same edgeApp. Validates the target row exists, belongs to this tenant, shares the installation's current handle, and isn't a DRAFT (only PUBLISHED or DEPRECATED versions can be pinned). Pushes config.update to the controller. The bridge reconciles by `installation.id`+`version`, so the new version triggers a restart with the new content. Requires edge_app_installation:write.

upsertControllerMutation

Create or update a controller. Requires controller:write permission.

upsertControllerPolicyMutation

Create or update the policy for a controller. Idempotent on controllerId (one row per controller). Wholesale-replace on both allowlists. Triggers a config.update push to the controller. Requires controller_policy:write permission.

upsertDeviceMutation

Create or update a device. Requires device:write permission.

upsertEdgeAppMutation

Create or update a DRAFT edge app row. With `input.id`: edits the existing draft (rejects PUBLISHED/DEPRECATED rows — those are frozen). Without `input.id`: creates a new draft for the handle (rejects if a draft already exists). Drafts aren't pushed to controllers; use publishEdgeAppDraft to ship. Requires edge_app:write permission.

upsertEdgeAppInstallationMutation

Create or update a edgeApp installation. Validates `variables` against the edgeApp's configSchema (when set) and pushes config.update to the target controller. Requires edge_app_installation:write permission.

upsertEdgeAppSourceMutation

Compile, validate, and retain an EdgeApp XML document as a DRAFT. Omit id to create; provide a DRAFT id to replace its source.

upsertMetricMutation

Create or update a metric. Requires metric:write permission.

upsertNetworkMutation

Create or update a network. Requires network:write permission.

validateEdgeAppSourceQuery

Type-check edgeApp handler / library / onMessage Lua sources against the bridge's ambient API typedef without persisting anything. Safe to call from editors on every keystroke. Requires edge_app:read permission.