Catalog

TagoIO Snippets

Code samples for Analysis, Payload Parser, and TagoSQL.

Analysis

Analysis scripts run on TagoIO's serverless platform to process device data, send notifications, generate reports, and integrate with external services.

Node.js Legacy

Legacy

ES5/ES6 JavaScript with pre-installed libraries only

Node.js rt2025

Modern

Modern JavaScript with fetch API and improved performance

Deno rt2025

TypeScript

Modern TypeScript/JavaScript with native TS support and URL-based modules

Python Legacy

Legacy

Python 3.x with pre-installed libraries only

Python rt2025

Modern

Latest Python with dynamic package installation (UV) and PyPI access

Payload Parser

Payload parsers transform raw device data into TagoIO's standardized format for storage and visualization.

JavaScript Runtime

Node.js

JavaScript (ES5/ES6+) for processing and transforming device payload data

TagoSQL

Ready-to-use TagoSQL queries for the /sql routes of the TagoIO API, from a simple device read to fleet-wide queries by tag.

SQL

TagoSQL

Read-only SQL over your device and entity data, with positional parameters

Usage examples

Fetch JSON metadata

curl https://snippets.tago.io/analysis/deno-rt2025.json

Download code file

curl https://snippets.tago.io/analysis/deno-rt2025/console.ts

API endpoints

Analysis

JSON: /analysis/{runtime}.json
Files: /analysis/{runtime}/{filename}
Runtimes: node-legacy, node-rt2025, deno-rt2025, python-legacy, python-rt2025

Payload Parser

JSON: /payload-parser/{runtime}.json
Files: /payload-parser/{runtime}/{filename}
Runtimes: javascript

TagoSQL

JSON: /tagosql/sql.json
Files: /tagosql/sql/{filename}