The PI Web API supports values of the following underlying types:
- Arrays of the above types
- Enumeration values
Attributes marked with one of these value types, as well as attributes of type 'Anything' whose values are of one of these types, are supported by the PI Web API. Other data types will be rejected on input. On output, the type field of attributes marked with an unsupported type will display 'Unsupported', and retrieving values of unsupported type will return status code 501.
Good values (values for which the 'Good' property is set to
are mapped to and from JSON according to the following rules:
- Boolean: JSON boolean
- Byte, Double, Int16, Int32, Int64, Single: JSON number
- DateTime: ISO8601 UTC formatted JSON string
- Guid: hyphenated hexadecimal digits as a JSON string
- String: JSON string
- Array: JSON array of the corresponding type
- Enumeration value: JSON object with 3 properties: Name (string), Value (number), IsSystem (boolean)
Bad or error values (values for which the 'Good' property is set to
may be serialized as one of the above types or, more commonly, as an error
represented as a string, enumeration value, or JSON object containing a single
property, 'Errors', which is a string array containing one or more error messages.
The above discussion applies to default PI System behaviors. Custom data references may produce other behavior.