Skip to main content
Technical Preview

Overview

Sight Machine is a Manufacturing Data Platform. It models plant data as machines, cycles, downtime, parts and production lines, and computes KPIs such as OEE, quality and availability. This connector connects the Coreflux broker to the REST API of your Sight Machine tenant, so plant logic on MQTT can read production data, KPI results, recipe recommendations and dashboard values without custom code.
  • SightMachineApi (SightMachineRestApi.lot) is a client connector on https://YOUR_TENANT.sightmachine.io with 24 events.
Sight Machine does not publish its API reference. Each tenant serves it to logged-in users at https://<tenant>.sightmachine.io/#/api-docs. These events come only from public first-party sources: the API Keys and Dashboard API page and the Sight Machine Python SDK (smsdk), which calls these endpoints. Request bodies follow the SDK. Check the response shapes against your tenant’s API reference before you rely on them.
Every path and method was checked on a live Sight Machine tenant. Each event is rejected for an invalid key, while unknown paths return 404 and wrong methods return 405 (see Status).

Tenant host

Each customer gets its own tenant at https://<tenant>.sightmachine.io. Replace YOUR_TENANT in BASE_ADDRESS with your tenant name, with no trailing slash. For a private or dedicated deployment, use the host Sight Machine gave you.

Authentication

The API key and secret act as your Sight Machine user. Keep them in Hub secrets, map them in with GET SECRET, and never publish them on a topic other clients can read.
  1. In your tenant, open User Profile (top right), scroll to Security and click Create API Key. Copy the API key and secret.
  2. Every event takes "api_key_id" and "api_secret" in its MQTT payload. The connector sends them as X-SM-API-Key-Id and X-SM-API-Secret. ListFactories (legacy /api) also sends X-SM-API-Key with the secret, like the SDK does.
Suggested secrets: SIGHTMACHINE_API_KEY_ID and SIGHTMACHINE_API_SECRET. A missing or wrong key returns 401 with {"error":"unauthenticated","description":"Not logged in or invalid API key provided"}.
Edge API keys (the CONNECT menu) are a different credential. FactoryTX uses them to upload data. If your tenant uses workspaces, the SDK selects one with an X-Sm-Workspace-Id header. This template does not send that header, so add it to the events if you need it.

Payload conventions

  • Queries. The /v1/datatab/..., estimate, KPI, Data Viz, line Data Viz and cookbook current-value events are read-only POST queries. Each one sends "body" unchanged. The body is the SDK query object: asset_selection, select, where (name, op, value), order_by, time_selection (relative or absolute), offset, limit and db_mode ("sql"). See the SDK reference for every field.
  • Names. Use system names in queries: machine_source (for example Oven_1), machine_type (Oven), field names from GetMachineTypeFields, and part types from ListPartTypes. ListMachines and ListMachineTypes map display names to system names.
  • Query strings. Events with ?{query} take a pre-encoded query string. Send "" for none. ListMachines takes limit plus where, order_by and select as URL-encoded JSON.
  • Paging. Data table events return up to limit rows (at most 50000) under results. Page with offset.
  • Asynchronous Data Viz. SubmitDataVizTask and SubmitLineVizTask return response.task_id. Poll GetDataVizTask or GetLineVizTask until response.state is SUCCESS, then read response.meta.results. FAILURE and REVOKED mean the query failed.

Assets and metadata

ListMachines (mes/sight-machine/machine/list)
GetMachineTypeFields (mes/sight-machine/machine-type-field/list)

Production data (cycles, downtime, parts, lines, raw data)

QueryCycles (mes/sight-machine/cycle/query)
QueryDowntimes (mes/sight-machine/downtime/query)
QueryRawData (mes/sight-machine/raw-data/query)

Counts

EstimateCycleCount (mes/sight-machine/cycle-count/get)

KPIs and Data Viz

ListKpisForAsset (mes/sight-machine/kpi-asset/list)
SubmitDataVizTask (mes/sight-machine/datavis-task/create)
GetDataVizTask (mes/sight-machine/datavis-task/get)

Cookbooks (recipes)

GetCookbookCurrentValues (mes/sight-machine/cookbook-current-value/get)

Dashboards

GetDashboardValues (mes/sight-machine/dashboard-values/get)
The response has one entry per widget under panels, with id, name, type (single or table), status and data. Only Data Visualization and Single Value widgets set to background loading return data. The others report unsupported type, background loading not enabled or no completed jobs found. The dashboard id is the last part of the dashboard URL.

Sending plant data to Sight Machine

Sight Machine takes plant data in through FactoryTX, its edge data layer, not through a public REST write. Its upload endpoints are not published, so this template has no ingest event. To send Coreflux data to Sight Machine, point a FactoryTX MQTT Data Receiver at the Coreflux broker. Sight Machine documents no webhooks, so this template has no receiver connector either.

Examples

Helper actions (docs-helper-actions.lot): an OEE Data Viz query every 15 minutes with polling of the task, the dashboard values every hour, sent on to a plant topic, and current lever values every 5 minutes.
The helper actions read the key and secret with GET SECRET on every call. Restrict the mes/sight-machine/# request topics with broker ACLs, because the payloads carry the secret.

Writes

Write events: CreateShareLink. CreateShareLink saves a Data Viz chart state on the tenant and returns a share link. Every other event is read-only, including the POST query events. No preset deletes anything.

Not packaged

Data ingest (FactoryTX upload and RDPv3 endpoints are not published), password and SSO login (/auth/password/login sets a browser session cookie, so use API keys), the ODBC / JDBC connector (SQL, not REST), legacy /api cycle, part, machine and downtime endpoints (replaced by /v1), workspace selection (X-Sm-Workspace-Id), and any endpoint that appears only in the tenant’s login-gated API reference.

Status

Technical preview, blocked on the authenticated live test. On the live tenant demo.sightmachine.io, all 24 events return 401 unauthenticated for an invalid key, unknown paths return 404 and wrong methods return 405 before auth. A tenant API key is still needed to check real responses.
Last modified on October 21, 2026