Example dynamic type message
- Last UpdatedSep 04, 2025
- 2 minute read
The following is a sample type request that will create a dynamic OMF Type message. You can copy this sample and modify it for your use.
Note: To bypass the PI Web API CSRF defense setting, add an X-Requested-With header with any value to the OMF HTTP request. For additional headers supported in message specification, see Message headers.
Authorization: {your own value}
Content-Type: application/json
messageformat: json
omfversion: 1.2
messagetype: type
action: create
[
{
"id": "Widget",
"version": "1.0.0.0",
"type": "object",
"classification": "dynamic",
"extrapolation": "none",
"description": "Widgets descriptions and types.",
"name": "My widget type",
"tags": [
"Widget",
"WidgetRelated"
],
"metadata": {
"DataQualitySchema": "OPCUA",
"MetadataKeyOne": "valueOne",
"MetadataKeyTwo": "valueTwo",
"MetadataKeyThree": 1234
},
"properties": {
"Time": {
"type": "string",
"format": "date-time",
"isindex": true
},
"Widgetness": {
"type": "Number",
"format": "float32",
"uom": "count",
"description": "The amount of widgetness this widget has.",
"minimum": 0,
"maximum": 64,
"interpolation": "stepwisecontinuousfollowing"
},
"WidgetMode": {
"type": "Integer",
"format": "int32"
},
"WidgetStatus": {
"type": "Integer",
"format": "uint32",
"isquality": true,
"name": "Device Status"
}
}
}
]
This message creates an AF element template with the following:
-
Name: Widget
-
Internal extended property: _classification and _extrapolation
These properties create the attribute templates shown in the following image.

Simple dynamic type message example
A simple type is a dynamic type that contains only one property and a timestamp. The following is an example simple type message.
{
"id": "simple-dynamic-type1",
"version": "1.0.0.0",
"type": "object",
"classification": "dynamic",
"properties": {
"time": {
"type": "string",
"format": "date-time",
"isindex": true
},
"attribute1": { "type": "string"
}
}
This message creates an AF element template with the following:
-
Name: simple-dynamic-type1
-
Internal extended property: _classification
These properties create the attribute templates shown in the following image.
