TagoIO API v10.3.0

TagoIO API

On this page

Highlights

TagoSQL stored queries

  • New /sql route group to save, manage, and execute TagoSQL queries. Create a query once with POST /sql, then run it with POST /sql/{sqlID}/execute; ad-hoc execution is available at POST /sql/execute and the queryable catalog at GET /sql/tables.
  • Queries accept positional parameters ($1..$N) with saved default values. Values sent at execute time override the saved defaults per key, so one stored query serves many devices, variables, or time windows.
  • Optional per-query result caching (cache_enabled, cache_ttl_seconds) and a per-query rate limit (rate_limit_rpm) let you tune hot dashboard queries. Cached executions are served with served_from_cache: true and do not consume the per-query rate limit.
  • Stored queries are versioned like analyses: every save creates a new version, and older versions can be restored. Version, parameter, and execution limits per plan are exposed in the sql object of GET /profile/{profileID}/limits. See Resource Limits.
  • Execution is available to profile tokens, and to analysis and Run user tokens when an Access Management policy grants the execute action on the new sql resource. This is the path custom widgets in TagoRUN use. Granting execution of a query grants its full result set. See Executing Queries.

AI Dashboards

  • New dashboard type ai: describe the dashboard you want in natural language and the platform discovers your devices and variables, generates the widgets, and renders a ready-to-embed HTML dashboard.
  • POST /dashboard/{dashboardID}/generate creates or refines the dashboard from a prompt, with multi-turn edits supported through the request history. GET /dashboard/{dashboardID}/html serves the rendered dashboard, and POST /dashboard/{dashboardID}/data feeds the widgets with the dashboard's own stored queries; clients never send SQL.
  • Generation uses the platform's AI service by default, or your own key when the profile has a service.ai configuration. AI features respect the profile's AI enablement settings.
  • AI dashboards are versioned alongside their generated HTML, so previous generations can be recovered.

Breaking Changes

  • None

Upgrade Notes

  • To grant TagoRUN users or analyses access to a stored query, create an Access Management policy targeting them with the execute action on the sql resource, scoped by query id or tags. Remember that a granted query returns whatever its SQL selects.
  • To try AI Dashboards, create a dashboard with type: "ai" and call POST /dashboard/{dashboardID}/generate with your prompt using a profile token with write permission.