PTAGIS Data Specification

 

 

Schema 2021-05

 

Schema 2021-05 is based on the 2020-12 draft JSON schema. It was replaced by schema 2022-04 in April 2022.

 

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ptagis.org/content/schemas/interrogation/2021-05/schema.json",
  "type": "object",
  "title": "PTAGIS Interrogation File JSON Schema.",
  "required": [
    "$schema",
    "fileName",
    "siteCode",
    "fileCreated",
    "fileClosed",
    "dataRole",
    "systemDescription",
    "interrogationFieldData"
  ],
  "properties": {
    "$schema":{
"type":"string",
"description":"PTAGIS JSON schema reference"
},
    "fileName": {
      "type": "string",
      "title": "File Name",
      "description": "Unique file name containing interrogation data submitted to PTAGIS",
      "maxLength": 30
    },
    "siteCode": {
      "type": "string",
      "title": "Site Code",
      "description": "Interrogation site code registered with PTAGIS.",
      "maxLength": 3,
      "minLength": 3
    },
    "fileCreated": {
      "type": "string",
      "title": "File Created On",
      "description": "Denotes the date and time when file was opened for data collection using RFC 3339/IS0 8601 date-format.",
      "format": "date-time"
    },
    "fileClosed": {
      "type": "string",
      "title": "File Closed On",
      "description": "Denotes the date and time file was closed for data collection using RFC 3339/IS0 8601 date-format.",
      "format": "date-time"
    },
    "dataRole": {
      "type": "string",
      "title": "Data Role",
      "description": "Designates the type of data within this file and how it should be processed by PTAGIS.",
      "enum": [
        "Primary",
        "Secondary",
        "TestSubmission",
        "Patch",
        "Development"
      ],
      "maxLength": 20
    },
    "systemDescription": {
      "type": "string",
      "title": "System Description",
      "description": "Describes the system that created this file including any version information.",
      "maxLength": 100
    },
    "interrogationFieldData": {
      "type": "array",
      "title": "Data Messages",
      "description": "A list of messages representing field data captured from transceivers, probes and other devices.",
      "maxItems": 500000,
      "items": {
        "type": "object",
        "title": "Field Data Schema",
        "properties": {
          "fieldDataType": {
            "type": "string",
            "title": "Field Data Type",
            "description": "Defines the type of data message and related properties. Should be first property in this object.",
            "enum": [
              "Raw",
              "Tag",
              "SbycTag"
            ],
            "maxLength": 50
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "The local date and time associated with the data within this message using RFC 3339/IS0 8601 date-format.",
            "format": "date-time"
          },
          "fieldData": {
            "type": "string",
            "title": "Field Data",
            "description": "A PIT tag observation, transceiver diagnostic, environmental or system metadata associated with an interrogation site.",
            "maxLength": 500
          },
          "fieldSource": {
            "type": "string",
            "title": "Field Source",
            "description": "Describes the field device or other type of data source.",
            "enum": [
              "Extraneous",
              "Transceiver",
              "PLC",
              "Probe",
              "System"
            ],
            "maxLength": 50
          },
          "systemID": {
            "type": "string",
            "title": "System ID",
            "description": "A unique identifier registered with PTAGIS that identifies a master controller, transceiver unit or probe.",
            "maxLength": 2,
            "minLength": 2
          },
          "subsystemID": {
            "type": "string",
            "title": "Subsystem ID",
            "description": "A unique identifier registered with PTAGIS that identifies an antenna or similar subsystem.",
            "maxLength": 2,
            "minLength": 2
          },
          "tagCode": {
            "type": "string",
            "title": "Tag Code",
            "description": "A real-time tag code to be processed as an observation record.",
            "maxLength": 20,
            "minLength": 10
          },
          "signalLevel": {
            "type": "number",
            "title": "Signal Level",
            "description": "FDX-B tag detection signal level measurement in mV."
          },
          "sbycActionType": {
            "type": "string",
            "title": "SbyC Action",
            "description": "The type of SbyC diversion action taken with this detection.",
            "enum": [
              "None",
              "DefaultIgnore",
              "DefaultNotFound",
              "DefaultAll",
              "Override",
              "DefaultSkip",
              "DefaultNA",
              "Ignore",
              "Duplicate",
              "StandBy",
              "Failed"
            ],
            "maxLength": 25
          },
          "sbycActionCode": {
            "type": "number",
            "title": "SbyC Action Code",
            "description": "Uniquely identifies an SbyC action requested by a project."
          },
          "sbycGateActionType": {
            "type": "string",
            "title": "SbyC Gate Action",
            "description": "The type of diversion gate action.",
            "enum": [
              "NoOp",
              "Open",
              "Close",
              "Center",
              "Left",
              "Right"
            ],
            "maxLength": 25
          },
          "sbycProcessingLatency": {
            "type": "number",
            "title": "SbyC Latency",
            "description": "The overall latency measured in milliseconds to complete the SbyC action from when a tag message is decoded."
          }
        },
        "anyOf": [
          {
            "properties": {
              "fieldDataType": {
                "const": "Raw"
              }
            },
            "required": [
              "fieldDataType",
              "timestamp",
              "fieldData",
              "fieldSource",
              "systemID"
            ]
          },
          {
            "properties": {
              "fieldDataType": {
                "const": "Tag"
              }
            },
            "required": [
              "fieldDataType",
              "timestamp",
              "fieldData",
              "fieldSource",
              "systemID",
              "tagCode"
            ]
          },
          {
            "properties": {
              "fieldDataType": {
                "const": "SbycTag"
              }
            },
            "required": [
              "fieldDataType",
              "timestamp",
              "fieldData",
              "fieldSource",
              "systemID",
              "tagCode",
              "sbycActionType",
              "sbycGateActionType"
            ]
          }
        ],
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}