← All Foundational Objects/Prefix: dev_16 Fields
AI-Agent-First Documentation
/SKILL.md
Prompt your Agent: "Query and mutate records on the 'device' table (ID prefix 'dev_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."

Device (device)

Devices are the hardware that you have connected to the Valstorm ecosystem

Python SDK & PlatformContext Example
# 1. Query device via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM device ORDER BY created_date DESC LIMIT 25")

# 2. Create device record (Generates 'dev_...' Base62 ID)
created = await platform.records.create("device", [
    {"name": "Example Device"}
])
Field API NameType / FormatLookup TargetFlagsDescription
idstring—Id
namestring—Name
created_datestringdate-time—Created Date
modified_datestringdate-time—Modified Date
created_bystringlookup→ user (string ID)Created By
modified_bystringlookup→ user (string ID)Modified By
ownerstringlookup→ user (string ID)Owner
shared_withlistsharing—systemShared With
device_typestringenum→ unnamed (string ID)requiredDevice Type
operating_systemstring—requiredImportant for the backend to know how to format OS-specific shell commands.
connection_statusstringenum—requiredConnection Status
last_activestringdate-time—The UTC timestamp of the device's last successful WebSocket heartbeat
app_versionstring—The version of the Valstorm Desktop/Mobile app currently installed on the device (e.g., `0.1.2`)
push_tokenstring—FCM/APNs token used to send background wake-up notifications if the device WebSocket drops.
capabilitieslist—An array of strings denoting what this hardware supports.
hardware_specificationjsonjson—Optional metadata dictionary containing RAM, CPU cores, or GPU model to help the routing engine decide if a task is too heavy for the device.