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

OMF with PI Web API

Step 2 - Define OMF type and send it in OMF Type message

Step 2 - Define OMF type and send it in OMF Type message

  • Last UpdatedSep 04, 2025
  • 1 minute read

Your application starts by defining the shape of the data we want to store. To do this, you will create a dynamic type. Send an HTTP request with the following properties:

Headers


omfversion = 1.2
messagetype = type
messageformat = json
action = create

Body

[

{

"id": "DataType",

"classification": "dynamic",

"type": "object",

"properties": {

"timestamp": {

"type": "string",

"format": "date-time",

"isindex": true

},

"value": {

"type": "number"

}

}

}

]

This creates an AF Element Template in the AF Database that the PI Web API has been configured for. You can use PI System Explorer to check the AF Element Template has been created by navigating to the Library tab. Open PI System Explorer, navigate to the AF Database the PI Web API has been configured to use, and select the Library tab at the bottom-left. Expand the Templates item, then expand the Element Templates item. If the request was successful, an Element Template named DataType should exist.

In This Topic
TitleResults for “How to create a CRG?”Also Available in