Skip to main content
Technical Preview

Overview

Client-mode REST API connectors for the Canary Historian: browse nodes and tags, read last values, raw history and aggregates, poll live data, annotations and events through the Views Read API, and write MQTT values into Canary through the Store and Forward Write API session (getSessionToken, storeData, keepAlive). This is one of the templates in the Canary Historian REST API app (canary-historian). Deploy it alongside the other connectors of that app when they depend on each other (for example a token connector plus an API connector).
Not yet verified against the live vendor API: Canary Historian is self-hosted (Windows services); there is no public Canary API instance (the Axiom sandbox on canarylabs.com is a gated UI demo, no Views/SaF endpoint) and no Canary URL or API token on the factory box (no CANARY_ variables in env). Connectors checked statically against a curated OpenAPI built 1:1 from Canary’s official Read API 26.5 / Write API 26.4 docs plus the official v25 Postman collections (296/296), every event rendered against a local mock Views + SaF (22/22, write->read-back flow 4/4, 4/4 controls: expired session BadSessionToken, wrong apiToken Errors, missing historians Errors, stale liveDataToken BadLiveDataToken), Canary docs hosts reachable with all 22 methods listed (4/4). This does not clear the gate. Needs: a Canary 24+ system reachable from the test box (Views web API https :55236 and, for writes, SaF web API https :55293; its certificate trusted or CANARY_INSECURE=1), an API token from Identity > Security > API Tokens linked to a Canary user with read permission on the view and write permission on a test DataSet (CANARY_API_TOKEN), the historian name (CANARY_HISTORIAN, default localhost) and a throwaway DataSet name (CANARY_TEST_DATASET, default CorefluxSmoke). Gate: CANARY_READ_URL=https://<host>:55236 CANARY_WRITE_URL=https://<host>:55293 CANARY_API_TOKEN=<token> CANARY_ALLOW_WRITE=1 python3 smoke_canary.py -> BrowseNodes/BrowseTags/GetTagData (last + raw)/GetAggregates statusCode Good, bad token not Good, GetVersion Good, GetSessionToken returns sessionToken, StoreData/KeepAlive/RevokeSessionToken Good, value 42.0 read back with GetTagData; then a broker MQTT round-trip (publish historian/canary-write/tag-data/store and historian/canary/tag-data/get, read /response).

Auth

  • token: Identity API token as apiToken inside the JSON body (payload field body); sessionToken / liveDataToken / userToken for session, live data and Windows-account calls
  • windows: Read API GetUserToken over https with username/password of a Windows account mapped to a Canary user -> userToken (5 min idle expiry). Not available on the v24+ Write API.
  • secret: [“CANARY_API_TOKEN”]
  • unauthenticated: [“GetVersion”]
  • note: No Authorization header is sent; the Read API would also accept ‘Authorization: Bearer <apiToken>’ but the Write API documents only the body field, so both connectors use the body for consistency. Canary services typically use a self-signed certificate; the broker host must trust it.

Template parameters

BASE_ADDRESS default: https://YOUR_CANARY_HOST:55293.

Events

Deploy

Get the template card (JSON with template and metadata) from the broker, then deploy the connector:
The deployable connector from the REST API app, with BASE_ADDRESS already filled in:
Deploy it with -addRoute (do not include ADD METADATA).

Usage example

Call GetVersion by publishing a JSON payload to its request topic, and read the reply on the response topic:
Last modified on October 21, 2026