{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/viam/refs/heads/main/json-schema/viam-tabular-data-schema.json",
  "title": "Viam Tabular Data Point",
  "description": "A single tabular data point captured from a sensor or movement-sensor component and synced to the Viam cloud.",
  "type": "object",
  "required": ["part_id", "resource_name", "method_name", "time_captured", "data"],
  "properties": {
    "part_id": { "type": "string", "description": "Machine part id." },
    "resource_name": { "type": "string", "description": "Component name on the machine." },
    "resource_subtype": { "type": "string", "description": "e.g. rdk:component:sensor." },
    "method_name": { "type": "string", "description": "Capture method (e.g. Readings, Position)." },
    "method_parameters": { "type": "object" },
    "tags": { "type": "array", "items": { "type": "string" } },
    "time_captured": { "type": "string", "format": "date-time" },
    "time_received": { "type": "string", "format": "date-time" },
    "organization_id": { "type": "string" },
    "location_id": { "type": "string" },
    "robot_id": { "type": "string" },
    "data": { "type": "object", "description": "Captured payload — schema depends on method_name." }
  }
}
