3 Replies Latest reply on May 22, 2015 8:17 AM by alasdairlogan

    PI Web API get Recorded Data question

    alasdairlogan

      Hi,

      I am using PI Web API 2015, and using get Recorded data.

      According to the documentation a value of '0' in maxCount means that all of the events within the requested time range will be returned. But I only get an error. Setting maxRow to any number>0 works fine. Any ideas?

       

      Also, does anyone know what the attributes  "Good",   "Questionable" and   "Substituted"  in the Json mean?

       

      Thanks

        • Re: PI Web API get Recorded Data question
          dng

          Hi Alasdair,

           

          In PI Web API 2015, there is a mismatch between the online documentation and actual behavior for GetRecorded regarding the maxCount parameter. Disallowing a value of '0' is intentional, because the idea that some limit exists is a best practice.  Returning a potentially infinite number of items in a single request is a pattern that leads to denial of service, either in the server or on the client.  Especially on the server side, allowing massive requests to proceed from a single consumer can lead to degradation of the service for other consumers.  To that end, we designed and added the limiting scheme that made it into the release.

           

          The development team is aware of this issue and we will make documentation changes in the upcoming release.

           

          Regarding your question about "Good", "Questionable" and "Substituted":

          • "Good" means the the quality of the value is good. As an example, you might have an interface writing "good" data; upon communication failure or data source failure, your interface might write some "bad" values to the PI system (e.g. you will see a system digital state).
          • "Questionable" indicates the quality of the value is questionable. This flag is usually set by the data writer (e.g. SDK, interfaces).
          • "Substituted" means that the value has been substituted by another value at the same timestamp, so the current value differs from the original value recorded. This flag is set by the system during editing. It cannot be directly set or cleared by the user.

           

          For more information, you can refer to KB 3030OSI8.