Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

OMF with PI Web API

Example static type message

  • Last UpdatedSep 04, 2025
  • 2 minute read

The following is a sample type request that will create a static 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": "WidgetFactory",

"classification": "static",

"type": "object",

"name": "My widget factory type",

"description": "It is a typical widget factory.",

"tags": [

"WidgetRelated",

"Factory"

],

"metadata": {

"MetadataKeyOne": "valueOne",

"MetadataKeyTwo": "valueTwo",

"MetadataKeyThree": 1234

},

"extrapolation": "all",

"properties": {

"FactoryId": {

"type": "string",

"isindex": true,

"name": "Factory Index"

},

"FactoryName": {

"type": "string",

"isname": true,

"name": "Factory Name"

},

"Address": {

"type": "string"

},

"Contact": {

"type": "string"

},

"WidgetLevel": {

"type": "number",

"format": "float64",

"name": "Widget Level",

"description": "The level of widgets that the factory produces.",

"uom": "count",

"minimum": 0,

"maximum": 64,

"interpolation": "discrete"

}

}

}

]

The properties keyword in a type message corresponds to attribute templates on the element template. Each property becomes a separate attribute template. The properties keyword has its own keywords, which are detailed in Properties keywords reference.

These properties create the attribute templates shown in the following image:

Related Links
TitleResults for “How to create a CRG?”Also Available in