3 Replies Latest reply on Jul 11, 2016 9:34 PM by ray

    PI Web API 2016 syntax changes?


      I recently updated to PI Web API 2016 (from 2015 R2) .  I have a simple Streams UpdateValue message that now returns a 400 error: "Properties [Value] are required but were not supplied."  


      POST https://servername/piwebapi/streams/A0EgN2mNZXN-ECJeVrprWGNWA_lUWziGO5BGAvAAVXQF4BgqAmtA6gXOVE3CDFDLDc0GQUElWTVxVU0VSREJcRkFDSUxJVFlcSE9NRVxQT1dFUnxJTlNUQU5UQU5FT1VT/value HTTP/1.1

      Accept: application/json

      Content-Type: application/json; charset=utf-8






      HTTP/1.1 400 Bad Request

      Content-Length: 69

      Content-Type: application/json; charset=utf-8

      Server: Microsoft-HTTPAPI/2.0

      Date: Wed, 06 Jul 2016 15:28:17 GMT


      {"Errors":["Properties [Value] are required but were not supplied."]}


      I looked in the help for both version and did not see any changes to the call.  Am I missing something simple here?




        • Re: PI Web API 2016 syntax changes?

          Hi Joey,


          The parameters "Timestamp" and "Value" are case sensitive.  Could you try changing their capitalization and seeing if that works?



            • Re: PI Web API 2016 syntax changes?

              Paul - Thanks! That fixed it.



                • Re: PI Web API 2016 syntax changes?

                  The PI Web API team rewrote the Json payload processing in 2015 in order to improve performance. The product became case-sensitive as a side-effect of that work. As a result, PI Web API 2015 R3 and 2016 are case-sensitive, while PI Web API 2015 R2 and earlier are case-insensitive. We do feel, however, that it should have been case-sensitive all along. Processing text in a case-sensitive manner is faster. It also avoids some errors caused by malformed Json, some of which might represent a deliberate attach. XML is also case-sensitive.

                  1 of 1 people found this helpful