Osisoft PI is the most used historian in the Oil&Gas industry. EdgeX needs to be capable to export data to such a platform.
This capability can be implemented by cloning the current EdgeX HTTPS REST export feature and modifying it accordingly to send messages in a format accepted by PI Web API. This is an approach that has been adopted by other IIoT platforms as well.
If the tag already exists, the reply will look like:
{ "TotalHits": 1, "Links": { "Next": "https://mypiwebapi.domain.com/piwebapi/search/query?q=name%3Atagname&scope=pi%3Amypiarchive&count=10&start=10", "First": "https://mypiwebapi.domain.com/piwebapi/search/query?q=name%3Atagname&scope=pi%3Amypiarchive&count=10", "Last": "https://mypiwebapi.domain.com/piwebapi/search/query?q=name%3Atagname&scope=pi%3Amypiarchive&count=10&start=0" }, "Errors": [], "Items": [ { "Name": "tagname", "Description": "Some Description", "MatchedFields": [ { "Field": "name" } ], "ItemType": "pipoint", "AFCategories": [], "UniqueID": "\\\\{044de274-8d72-4cb6-839b-9e415e793dd8}\\?3", "WebId": "P0dOJNBHKNtkyDm55BXnk92AAwAAAAU1JWR0RZUExNT1NJRDAzXENEVDE1OA", "UoM": "deg. c", "DataType": "float32", "Links": { "Self": "https://mypiwebapi.domain.com:443/piwebapi/points/P0dOJNBHKNtkyDm55BXnk92AAwAAAAU1JWR0RZUExNT1NJRDAzXENEVDE1OA" }, "Score": 13.62607 } ] } |
In this case the WebId of the tag must be obtained in order to be used in further iterations. If the tag does not exist, the reply will look something like:
To be updated.
Waiting for Go Export Client & Distribution to support HTTPS REST