{
  "$id": "https://schemas.ruter.no/adt/ota/api/v2.1/sensor/telemetry.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Telemetry",
  "type": "object",
  "required": [
    "eventTimestamp",
    "id",
    "payloads"
  ],
  "description": "",
  "additionalProperties": true,
  "properties": {
    "traceId": {
      "$id": "#/properties/traceId",
      "$comment": "Added in version 2.5",
      "type": "string",
      "description": "A unique identifier to be able to trace this message. Also used to detect duplicate messages received."
    },
    "eventTimestamp": {
      "$id": "#/properties/eventTimestamp",
      "type": "string",
      "description": "ISO 8601, UTC."
    },
    "messageNumber": {
      "$id": "#/properties/messageNumber",
      "$comment": "Added in version 2.1",
      "type": "number",
      "description": "Optional. Sequence number, increased by one for each new message. Used to validate consistency in the data stream."
    },
    "id": {
      "$id": "#/properties/id",
      "type": "string",
      "description": "Eight digit hex as defined above."
    },
    "payloads": {
      "$id": "#/properties/payloads",
      "type": "array",
      "description": "If FMS data or accelerometry, one payload per SPN. Else, one payload.",
      "items": {
        "type": "object",
        "required": [
        ],
        "properties": {
          "subid": {
            "type": "string",
            "description": "Optional. Only to be used for SPN."
          },
          "name": {
            "type": "string",
            "description": "Optional."
          },
          "unit": {
            "type": "string",
            "description": "Optional."
          },
          "value": {
            "description": ""
          }
        }
      }
    }
  }
}
