You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Complete field reference for JSON-based configuration import and export.
ReferenceSolutionDevOps → Git Integration | JSON Specification

JSON Import/Export Specification (Reference): Detailed field-level documentation for programmatic configuration of all object types via JSON files. Essential for MCP tools, CI/CD pipelines, and external integrations.


Overview

This specification documents the JSON format used for:

  • Git export/import operations
  • MCP (Model Context Protocol) tool integration
  • CI/CD pipeline automation
  • External system integration
  • Bulk configuration management

Key Principle: Import and Export use the same JSON format. The only difference is that import ignores metadata sections.


JSON Structure

Standard Format

Every JSON file follows this four-section structure:

json

{
  "ObjectIdentification": {
    "Module": "Uns",
    "TableType": "UnsTags",
    "TableGroup": "Objects"
  },
  "VersionInfo": {
    "TableVersionID": 15,
    "SolutionVersionID": 245,
    "SolutionName": "MyProject"
  },
  "ExportMetadata": {
    "ExportDate": "2026-01-16T10:30:00Z",
    "ExportUser": "john.doe",
    "ExportProduct": "Designer",
    "ExportProductVersion": "10.1.1.1011",
    "ExportFormat": "1.0"
  },
  "Data": [
    { /* object 1 */ },
    { /* object 2 */ }
  ]
}

Section Details


SectionRequired for ImportDescription
ObjectIdentificationNoModule and table identification
VersionInfoNoVersion tracking metadata
ExportMetadataNoExport audit information
DataYesArray of configuration objects

Minimal Import Format

For import operations, only the Data array is required:

json

{
  "Data": [
    { "Name": "Tag1", "Type": 153 }
  ]
}

Import Behavior

Fields Ignored on Import

These fields are auto-generated and ignored during import:

FieldReason
IDAuto-assigned unique identifier
VersionIDAuto-incremented on change
DateCreatedSet to import timestamp
DateModifiedSet to import timestamp
XRefInfoCross-reference data rebuilt
LockStateLock status reset
ContentsRunRuntime counter reset
BuildRequiredBuild flag reset
BuildNumberBuild identifier reset


Import Rules


ScenarioBehavior
Name doesn't existObject created
Name already existsSkipped (no error)
Pre-defined objectSkipped (cannot modify)
Missing required fieldError
Invalid referenceError
Invalid enum valueError

Pre-defined Objects (Cannot Import)

These system objects cannot be created or modified via import:

ModulePre-defined Objects
DevicesAll Protocols, AccessTypes (Read, Write, ReadWrite)
AlarmsGroups (Critical, Warning, AuditTrail)
HistorianStorageLocation (Default), HistorianTable (Table1)
DatasetsDBs (TagHistorian, AlarmHistorian, RuntimeUsers, Retentive)
SecurityUsers (Administrator, Guest), Permissions (24 built-in)


Import Order Dependencies

When importing related objects, order matters:

  1. Independent objects first: Tags, Channels, AlarmGroups, StorageLocations, DatasetDBs
  2. Dependent objects after: Nodes→Channels, Points→Nodes+Tags, AlarmItems→Tags+Groups, HistorianTags→Tags+Tables

Tag Types Reference

Built-in Type IDs


Type NameType ID.NET TypeRange/Notes
Digital151Int320 or 1
Integer152Int32±2,147,483,647
Double153Double±1.79×10³??
Text154StringUnicode, 2GB max
DateTime155DateTimeOffsetYear 0001-9999
Long156Int64±9.2×10¹?
Decimal157Decimal28-29 significant digits
TimeSpan158TimeSpanDays to milliseconds
Timer162Int32Multiple timer modes
Counter163Int32Up/down counting
DataTable164DataTableIn-memory table
Image165Byte[]Binary content
Guid166Guid128-bit unique ID
Json167StringJSON with parsing
Reference170DynamicTag reference

UserType IDs

UserType references use IDs starting at 201:

  • First UserType created: ID 201
  • Second UserType: ID 202
  • And so on...

To reference a UserType in JSON: "Type": 201


TableType Reference

Valid TableType values for the ObjectIdentification section:

UNS Module


TableTypeObjectDescription
UnsTagsTagProcess variables
UnsUserTypesUserTypeData structure templates
UnsEnumerationsEnumerationValue-to-text mappings
UnsTagProvidersTagProviderExternal data connections
UnsAssetTreeAssetFolderFolder organization

Devices Module


TableTypeObjectDescription
DevicesProtocolsProtocolBuilt-in drivers (read-only)
DevicesChannelsChannelProtocol instances
DevicesNodesNodeDevice addresses
DevicesPointsPointTag-to-address mappings
DevicesAccessTypesAccessTypeRead/write behavior

Alarms Module


TableTypeObjectDescription
AlarmsGroupsAlarmGroupAlarm behavior settings
AlarmsItemsAlarmItemAlarm definitions
AlarmsAreasAlarmAreaHierarchy organization

Historian Module


TableTypeObjectDescription
HistorianStorageLocationsStorageLocationDatabase connections
HistorianTablesHistorianTableStorage rules
HistorianTagsHistorianTagTag assignments

Datasets Module


TableTypeObjectDescription
DatasetsDBsDatasetDBDatabase connections
DatasetsQueriesDatasetQuerySQL statements
DatasetsTablesDatasetTableDirect table mappings
DatasetsFilesDatasetFileFile I/O definitions

Scripts Module


TableTypeObjectDescription
ScriptsTasksScriptTaskTriggered code blocks
ScriptsClassesScriptClassReusable libraries
ScriptsExpressionsScriptExpressionOne-line calculations
ScriptsReferencesScriptReferenceExternal DLL references

Reports Module


TableTypeObjectDescription
ReportsFormsReportFormDocument templates
ReportsWebDataWebDataJSON/XML data objects

Security Module


TableTypeObjectDescription
SecurityUsersSecurityUserUser accounts
SecurityPermissionsSecurityPermissionPermission flags
SecurityPoliciesSecurityPolicyLogin/session rules
SecuritySecretsSecuritySecretProtected credentials

Displays Module


TableTypeObjectDescription
DisplaysDisplayUI screens
LayoutsLayoutFrame organization
ImagesImageImported graphics
SymbolsSymbolReusable components

Object Reference Formats

When JSON fields reference other objects, use these formats:

Reference ToFormatExample
Tag (root)Tag.{name}"Tag.Temperature"
Tag (nested)Tag.{path}.{name}"Tag.Line1.Tank1.Level"
ChannelChannel.{name}"Channel.ModbusPLC1"
NodeNode.{name}"Node.PLC1"
AccessTypeAccessType.{name}"AccessType.Read"
AlarmGroupAlarm.Group.{name}"Alarm.Group.Critical"
AlarmAreaAlarm.Area.{name}"Alarm.Area.Plant1"
HistorianTableHistorian.Table.{name}"Historian.Table.Table1"
StorageLocationHistorian.StorageLocation.{name}"Historian.StorageLocation.Default"
DatasetDBDB.{name}"DB.TagHistorian"



UNS Objects

Tag (UnsTags)

json

{
  "Data": [
    {
      "Name": "Temperature",
      "Type": 153,
      "Path": "\\Line1\\Tank1",
      "Description": "Tank temperature sensor",
      "Array": 0,
      "StartValue": "25.0",
      "Min": "0",
      "Max": "100",
      "Units": "°C",
      "Format": "N1",
      "Domain": 0,
      "Visibility": 2,
      "Retentive": 0
    }
  ]
}


FieldRequiredTypeDescription
NameYesstringUnique tag name
TypeYesintType ID (see Tag Types Reference)
PathNostringFolder path (backslash-separated)
DescriptionNostringDocumentation (max 1024 chars)
ArrayNointArray size (0=scalar, N=array[0..N])
StartValueNostringInitial value at startup
MinNostringMinimum allowed value
MaxNostringMaximum allowed value
UnitsNostringEngineering units label
FormatNostringDisplay format (N0, N2, etc.)
DomainNoint0=Server, 1=Client
VisibilityNoint0=Private, 1=Protected, 2=Public
RetentiveNoint0=None, 1=ValueOnly, 2=Properties, 3=PropertiesOnly

AssetFolder (UnsAssetTree)

json

{
  "Data": [
    {
      "Name": "Line1",
      "Path": "",
      "LinkedProvider": "",
      "Alias": "",
      "Visibility": 2
    },
    {
      "Name": "Tank1",
      "Path": "\\Line1",
      "LinkedProvider": "",
      "Alias": "Primary Tank",
      "Visibility": 2
    }
  ]
}


FieldRequiredTypeDescription
NameYesstringFolder name
PathNostringParent path (empty=root)
LinkedProviderNostringTagProvider link
AliasNostringDisplay name override
VisibilityNoint0=Private, 1=Protected, 2=Public

Devices Objects

Channel (DevicesChannels)

json

{
  "Data": [
    {
      "Name": "ModbusPLC1",
      "Protocol": "Modbus",
      "PrimaryStation": "192.168.1.10:502",
      "BackupStation": "",
      "Timeout": 3000,
      "Retries": 3,
      "Enabled": true,
      "Description": "Main Modbus PLC"
    }
  ]
}


FieldRequiredTypeDescription
NameYesstringChannel name
ProtocolYesstringProtocol name (Modbus, OPCUA, etc.)
PrimaryStationYesstringConnection string
BackupStationNostringRedundant connection
TimeoutNointTimeout in milliseconds
RetriesNointRetry count
EnabledNoboolActive state
DescriptionNostringDocumentation

PrimaryStation Formats by Protocol:

ProtocolFormatExample
Modbus TCPIP:Port192.168.1.10:502
Modbus RTUCOM:Baud:Parity:Data:StopCOM1:9600:N:8:1
OPC UAopc.tcp://host:portopc.tcp://server:4840
MQTTmqtt://host:portmqtt://broker:1883
Siemens S7IP:Rack:Slot192.168.1.20:0:1
AB ControlLogixIP:Slot192.168.1.30:0


Node (DevicesNodes)

json

{
  "Data": [
    {
      "Name": "PLC1",
      "Channel": "Channel.ModbusPLC1",
      "PrimaryStation": "1",
      "BackupStation": "",
      "Enabled": true,
      "Description": "Main PLC unit 1"
    }
  ]
}


FieldRequiredTypeDescription
NameYesstringNode name
ChannelYesstringParent channel reference
PrimaryStationYesstringDevice address
BackupStationNostringRedundant address
EnabledNoboolActive state
DescriptionNostringDocumentation

Point (DevicesPoints)

json

{
  "Data": [
    {
      "Node": "Node.PLC1",
      "Tag": "Tag.Line1.Tank1.Temperature",
      "Address": "HR100",
      "AccessType": "AccessType.Read",
      "Enabled": true
    }
  ]
}


FieldRequiredTypeDescription
NodeYesstringParent node reference
TagYesstringTag reference
AddressYesstringDevice address
AccessTypeNostringDefault: Read
EnabledNoboolActive state

Address Formats by Protocol:

ProtocolFormatExamples
ModbusType+OffsetHR100, IR50, C10, DI200
OPC UANodeIdns=2;s=Tag1, ns=2;i=1001
Siemens S7DB.Offset.TypeDB1.DBD0, DB1.DBX0.0
AB ControlLogixTagNameProgram:MainProgram.Tag1



Alarms Objects

AlarmItem (AlarmsItems)

json

{
  "Data": [
    {
      "Tag": "Tag.Line1.Tank1.Temperature",
      "Group": "Alarm.Group.Critical",
      "Area": "Alarm.Area.Plant1",
      "Condition": ">90",
      "Message": "Tank temperature high: {0}°C",
      "Priority": 800,
      "Enabled": true
    }
  ]
}


FieldRequiredTypeDescription
TagYesstringMonitored tag reference
GroupYesstringAlarm group reference
ConditionYesstringTrigger condition
MessageYesstringAlarm message ({0}=tag value)
AreaNostringAlarm area reference
PriorityNointPriority override
EnabledNoboolActive state

Condition Syntax:

ConditionTriggers When
>90Value greater than 90
<10Value less than 10
>=100Value greater or equal to 100
==1Value equals 1
!=0Value not equal to 0
HI:90High limit at 90
LO:10Low limit at 10
HIHI:95High-high limit at 95
LOLO:5Low-low limit at 5



Historian Objects

HistorianTag (HistorianTags)

json

{
  "Data": [
    {
      "Tag": "Tag.Line1.Tank1.Temperature",
      "HistorianTable": "Historian.Table.Table1",
      "Deadband": "0.5",
      "Enabled": true
    }
  ]
}


FieldRequiredTypeDescription
TagYesstringTag to historize
HistorianTableYesstringStorage table reference
DeadbandNostringLogging deadband
EnabledNoboolActive state

Scripts Objects

ScriptTask (ScriptsTasks)

json

{
  "Data": [
    {
      "Name": "ServerStartup",
      "Code": 2,
      "WhileRunning": false,
      "Execution": 1,
      "Contents": "// C# startup code\n@Info.Trace(\"Server started\");"
    }
  ]
}


FieldRequiredTypeDescription
NameYesstringTask name
CodeYesintLanguage: 0=VB.NET, 2=C#, 4=Python
WhileRunningNoboolRun in loop
ExecutionNoint0=Server, 1=Client
ContentsYesstringScript code

ScriptExpression (ScriptsExpressions)

json

{
  "Data": [
    {
      "Name": "TotalFlow",
      "Expression": "Tag.Flow1 + Tag.Flow2 + Tag.Flow3",
      "TargetTag": "Tag.TotalFlow",
      "TriggerTag": "Tag.Flow1",
      "Enabled": true
    }
  ]
}


FieldRequiredTypeDescription
NameYesstringExpression name
ExpressionYesstringCalculation formula
TargetTagYesstringResult destination tag
TriggerTagNostringTag that triggers recalculation
EnabledNoboolActive state

Common Patterns

Creating a Complete Device Communication Setup

Import order matters - create objects in dependency order:

Step 1: Create Tags

json

{ "Data": [{ "Name": "TankLevel", "Type": 153, "Path": "\\Process" }] }

Step 2: Create Channel

json

{ "Data": [{ "Name": "ModbusCh1", "Protocol": "Modbus", "PrimaryStation": "192.168.1.10:502" }] }

Step 3: Create Node

json

{ "Data": [{ "Name": "PLC1", "Channel": "Channel.ModbusCh1", "PrimaryStation": "1" }] }

Step 4: Create Point

json

{ "Data": [{ "Node": "Node.PLC1", "Tag": "Tag.Process.TankLevel", "Address": "HR100" }] }

Bulk Tag Creation

json

{
  "Data": [
    { "Name": "Motor1_Speed", "Type": 153, "Path": "\\Motors", "Units": "RPM" },
    { "Name": "Motor1_Current", "Type": 153, "Path": "\\Motors", "Units": "A" },
    { "Name": "Motor1_Running", "Type": 151, "Path": "\\Motors" },
    { "Name": "Motor2_Speed", "Type": 153, "Path": "\\Motors", "Units": "RPM" },
    { "Name": "Motor2_Current", "Type": 153, "Path": "\\Motors", "Units": "A" },
    { "Name": "Motor2_Running", "Type": 151, "Path": "\\Motors" }
  ]
}

Validation Rules

Name Validation

  • Must be unique within object type
  • Alphanumeric plus underscore
  • Cannot start with number
  • Max length: 256 characters
  • Case-sensitive

Required Fields by Object


ObjectRequired Fields
TagName, Type
ChannelName, Protocol, PrimaryStation
NodeName, Channel, PrimaryStation
PointNode, Tag, Address
AlarmItemTag, Group, Condition, Message
HistorianTagTag, HistorianTable
DatasetQueryName, DatasetDB, Contents
ScriptTaskName, Code, Contents

See Also


  • No labels