Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Step 2 - Initialization
    • The following steps need to be executed after the client registration or any time the configuration changes.
      • Verify if the tags are already existing in the PI Archive. 
        • For each configured tag, the following query must be executed.
        • GET https://mypiwebapiendpoint/piwebapi/search/query?q=name:tagname&scope=pi:mypiarchive
        • If the tag already exists, the reply will look like:


          {
            "TotalHits": 1,
            "Links": {
              "Next": "https://mypiwebapiendpoint/piwebapi/search/query?q=name%3Atagname&scope=pi%3Amypiarchive&count=10&start=10",
              "First": "https://mypiwebapiendpoint/piwebapi/search/query?q=name%3Atagname&scope=pi%3Amypiarchive&count=10",
              "Last": "https://mypiwebapiendpoint/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://mypiwebapiendpoint:443/piwebapi/points/P0dOJNBHKNtkyDm55BXnk92AAwAAAAU1JWR0RZUExNT1NJRDAzXENEVDE1OA"
                },
                "Score": 13.62607
              }
            ]
          }


          In this case the WebId of the tag must be read and stored in EdgeX in order to be used in further iterations. If the tag does not exist, the reply will look something like:


        • {
            "Links": {
              "Next": "https://srvgdyplmosid03.nov.commypiwebapiendpoint/piwebapi/search/query?q=name%3ACDT15&scope=pi%3Asrvgdyplmosid03&count=10&start=10",
              "First": "https://srvgdyplmosid03.nov.commypiwebapiendpoint/piwebapi/search/query?q=name%3ACDT15&scope=pi%3Asrvgdyplmosid03&count=10",
              "Last": "https://srvgdyplmosid03.nov.commypiwebapiendpoint/piwebapi/search/query?q=name%3ACDT15&scope=pi%3Asrvgdyplmosid03&count=10&start=0"
            },
            "Errors": [],
            "Items": []
          }


        • In this case the tag will have to be created with the following commancommand

        • POST https://mypiwebapiendpoint/piwebapi//{webId}/points where WebId is riferred to the target dataserver. The payload of the POST request should look like the following:


        • {
            "Name": "PointName",
            "Descriptor": "Some description",
            "PointClass": "classic",
            "PointType": "Float32",
            "DigitalSetName": "",
            "EngineeringUnits": "",
            "Step": false,
            "Future": false
          }

...