Type message example
- Last UpdatedAug 19, 2026
- 2 minute read
In the following type message example, we will create two entity types and one streamingdata type. The entity types define descriptive asset properties, and the streaming data type defines indexed measurement values that can be sent through containers.
The Type definitions define properties for the isindex and isname qualifiers. Their values will be referenced later when defining instance data and creating relationships.
Headers
omfversion = 2.0
messagetype = schema
action = create
messageformat = json
Body
{
"types": [
{
"id": "Plant",
"version": "1.0.0.0",
"type": "object",
"classification": "entity",
"extrapolation": "all",
"properties": {
"PlantId": {
"type": "string",
"isindex": true
},
"PlantName": {
"type": "string",
"isname": true
},
"Address": {
"type": "string"
},
"Contact": {
"type": "string"
}
}
},
{
"id": "Tank",
"version": "1.0.0.0",
"type": "object",
"classification": "entity",
"properties": {
"TankName": {
"type": "string",
"isindex": true,
"isname": true
},
"Serial": {
"type": "string"
},
"Model": {
"type": "string"
}
}
},
{
"id": "TankPressure",
"version": "1.0.0.0",
"type": "object",
"classification": "streamingdata",
"properties": {
"Timestamp": {
"type": "string",
"format": "date-time",
"isindex": true
},
"Pressure": {
"type": "number",
"name": "Tank Pressure",
"description": "Tank Pressure in Pa",
"uom": "pascal",
"interpolation": "continuous",
"maximum": 20,
"minimum": 10
}
}
}
]
}
Reference Example
Properties of a Type definition can reference a previously defined Type using the reftypeid. In this example we include the 'LocationProperties' in the 'TankV2' Type, but cannot create instance data of the 'LocationProperties' Type.
{ "types": [
{
"id": "LocationProperties",
"type": "object",
"properties": {
"Latitude": {
"type": "number",
"format": "float32"
},
"Longitude": {
"type": "number",
"format": "float32"
}
}
},
{
"id": "TankV2",
"type": "object",
"classification": "entity",
"properties": {
"TankName": {
"type": "string",
"isname": true,
"isindex": true
},
"Serial": {
"type": "string"
},
"Model": {
"type": "string"
},
"Location": {
"reftypeid": "LocationProperties"
}
}
}
]
Enum Example
Properties of a Type definition can reference a previously defined enum using the reftypeid keyword. In this example we define data quality on the 'TankPressureV2' object to be of type 'DeviceStatusEnum'.
[
"types": [
{
"id": "DeviceStatusEnum",
"enum": {
"values": [
{
"name": "Device Connected",
"value": 0 },
{
"name": "Device Failure",
"value": 1 },
{
"name": "Uncertain - Out Limits",
"value": 3
}
]
}
},
{
"id": "TankPressureV2",
"type": "object",
"classification": "streamingdata",
"properties": {
"Timestamp": {
"type": "string",
"format": "date-time",
"isindex": true
},
"Pressure": {
"type": "number",
"name": "Tank Pressure",
"description": "Tank Pressure in Pa",
"uom": "pascal",
"interpolation": "continuous",
"maximum": 20,
"minimum": 10
},
"DeviceStatus": {
"reftypeid": "DeviceStatusEnum",
"interpolation": "stepwisecontinuousleading",
"isquality": true
}
}
}
]
}
Array Property Example
In this example we define a property of type array. The type of items contained by the array is specified via the items keyword.
[
{
"id": "MaintenanceSchedule",
"type": "object",
"classification": "entity",
"properties": {
"Name": {
"type": "string",
"isindex": true,
"isname": true
},
"Maintenance Schedule": {
"type": "array",
"items": {
"type": "string",
"format": "date-time"
}
},
"Maintenance Performed By": {
"type": "string"
}
}
}
]
Delete Example
When the action header value is delete only id is required. Any other values provided are ignored.
[
"types": {
{
"id": "Plant"
},
{
"id": "Tank"
},
{
"id": "TankPressure"
}
]
}